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

Method parse

backend/src/git/search.rs:50–63  ·  view source on GitHub ↗
(input: &str)

Source from the content-addressed store, hash-verified

48 }
49
50 fn parse(input: &str) -> Result<Self> {
51 use std::str::FromStr;
52
53 let parts: Vec<String> = input.trim().split(':').map(str::to_string).collect();
54 if !parts.len() == 2 {
55 return Err(Error::Parse(format!("invalid topic spec: {input}")));
56 }
57
58 let op = TopicSpecOperation::from_str(&parts[0])?;
59 Ok(Self {
60 op,
61 id: ExternalId::try_from(&parts[1])?,
62 })
63 }
64}
65
66#[derive(Clone, Debug, Eq, PartialEq)]

Callers

nothing calls this directly

Calls 5

from_strFunction · 0.85
parseFunction · 0.85
insertMethod · 0.80
tokensMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected