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

Function canonical_uid

atomic-core/src/kg/iri.rs:147–153  ·  view source on GitHub ↗
(uid: &str)

Source from the content-addressed store, hash-verified

145}
146
147fn canonical_uid(uid: &str) -> Result<(), IriError> {
148 let parsed = ulid::Ulid::from_string(uid).map_err(|_| IriError(uid.into()))?;
149 if parsed.to_string() != uid {
150 return Err(IriError(uid.into()));
151 }
152 Ok(())
153}
154
155pub fn mint_intent(project: &ProjectId, uid: &str) -> Result<String, IriError> {
156 canonical_uid(uid)?;

Callers 3

mint_intentFunction · 0.85
parse_intentFunction · 0.85
parse_childFunction · 0.85

Calls 1

IriErrorClass · 0.85

Tested by

no test coverage detected