MCPcopy Index your code
hub / github.com/emwalker/digraph / topic

Function topic

backend/src/git/testing.rs:17–39  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

15}
16
17pub fn topic(name: &str) -> RepoTopic {
18 let added = chrono::Utc::now();
19 // Some unique path
20 let id: ExternalId = sha256_base64(name).try_into().unwrap();
21 RepoTopic {
22 api_version: API_VERSION.to_owned(),
23 metadata: RepoTopicMetadata {
24 added,
25 id: id.to_owned(),
26 details: Some(RepoTopicDetails {
27 root: false,
28 timerange: None,
29 synonyms: Vec::from([Synonym {
30 name: name.to_owned(),
31 locale: Locale::EN,
32 added,
33 }]),
34 }),
35 },
36 parent_topics: BTreeSet::from([ParentTopic { id }]),
37 children: BTreeSet::new(),
38 }
39}
40
41pub fn link(title: &str, url: &str) -> RepoLink {
42 let added = chrono::Utc::now();

Callers 15

topic_display_nameFunction · 0.85
delete_linkFunction · 0.85
delete_topicFunction · 0.85
simple_caseFunction · 0.85
pathsFunction · 0.85
added_and_removedFunction · 0.85
removedFunction · 0.85
reorderedFunction · 0.85
parent_topicsFunction · 0.85
updated_titleFunction · 0.85
start_year_formatFunction · 0.85

Calls 2

sha256_base64Function · 0.85
try_intoMethod · 0.45

Tested by

no test coverage detected