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

Method visit_topic

backend/src/bin/show.rs:20–40  ·  view source on GitHub ↗
(&mut self, topic: &RepoTopic)

Source from the content-addressed store, hash-verified

18
19impl<'r> Visitor for &mut ConsoleOutput<'r> {
20 fn visit_topic(&mut self, topic: &RepoTopic) -> Result<()> {
21 let meta = &topic.metadata;
22 let s = format! {r#"
23Topic: [{}]({})
24Parent topics:
25"#,
26 meta.name(Locale::EN), meta.id};
27 self.buf.push_str(&s);
28
29 for topic in &topic.parent_topics {
30 self.visit_parent_topic(topic)?;
31 }
32
33 self.buf.push_str("Children:\n");
34
35 for child in &topic.children {
36 self.visit_topic_child(child)?;
37 }
38
39 Ok(())
40 }
41
42 fn visit_link(&mut self, link: &RepoLink) -> Result<()> {
43 let s = format! {r#"

Callers 1

acceptMethod · 0.80

Calls 2

visit_parent_topicMethod · 0.80
visit_topic_childMethod · 0.80

Tested by

no test coverage detected