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

Function parse_project

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

Source from the content-addressed store, hash-verified

48 project.to_urn()
49}
50pub fn parse_project(iri: &str) -> Result<ProjectId, IriError> {
51 ProjectId::from_base32(
52 iri.strip_prefix("urn:atomic:project:")
53 .ok_or_else(|| IriError(iri.into()))?,
54 )
55 .map_err(|_| IriError(iri.into()))
56}
57
58macro_rules! global {
59 ($mint:ident, $parse:ident, $kind:literal) => {

Callers

nothing calls this directly

Calls 1

IriErrorClass · 0.85

Tested by

no test coverage detected