MCPcopy Create free account
hub / github.com/emwalker/digraph / add

Method add

backend/src/git/index.rs:217–226  ·  view source on GitHub ↗
(&mut self, topic_id: &ExternalId, phrase: Phrase, name: &str)

Source from the content-addressed store, hash-verified

215 }
216
217 pub fn add(&mut self, topic_id: &ExternalId, phrase: Phrase, name: &str) -> Result<()> {
218 let paths = self.index.synonyms.entry(phrase).or_default();
219
220 paths.insert(SynonymEntry {
221 name: name.to_owned(),
222 id: topic_id.to_owned(),
223 });
224
225 Ok(())
226 }
227
228 pub fn full_matches(&self, phrase: &Phrase) -> Result<BTreeSet<SynonymEntry>> {
229 Ok(self.index.full_matches(phrase))

Callers 3

add_changeMethod · 0.45
updateMethod · 0.45
update_synonymsMethod · 0.45

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected