MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / mint_child

Function mint_child

atomic-core/src/kg/iri.rs:182–194  ·  view source on GitHub ↗
(
    project: &ProjectId,
    uid: &str,
    kind: ChildKind,
    child: &str,
)

Source from the content-addressed store, hash-verified

180 }
181}
182pub fn mint_child(
183 project: &ProjectId,
184 uid: &str,
185 kind: ChildKind,
186 child: &str,
187) -> Result<String, IriError> {
188 Ok(format!(
189 "{}:{}:{}",
190 mint_intent(project, uid)?,
191 kind.segment(),
192 encode(&child.to_uppercase(), false)
193 ))
194}
195pub fn parse_child(iri: &str) -> Result<(ProjectId, String, ChildKind, String), IriError> {
196 let (project, rest) = parse_qualified(iri, "intent")?;
197 let mut parts = rest.split(':');

Calls

no outgoing calls