pub trait PrefixMap {
// Required methods
fn get_namespace<'s>(&'s self, prefix: &str) -> Option<Iri<&'s str>>;
fn get_checked_prefixed_pair<'s, T, F>(
&'s self,
iri: T,
suffix_check: F,
) -> Option<(Prefix<&'s str>, MownStr<'s>)>
where T: IsIri + 's,
F: Fn(&str) -> bool;
fn iter<'s>(
&'s self,
) -> Box<dyn Iterator<Item = (Prefix<&'s str>, Iri<&'s str>)> + 's>;
// Provided methods
fn get_prefixed_pair<'s, T: IsIri + 's>(
&'s self,
iri: T,
) -> Option<(Prefix<&'s str>, MownStr<'s>)> { ... }
fn to_vec(&self) -> Vec<PrefixMapPair> { ... }
}
Expand description
A prefix map associates prefixes to namespaces.
Required Methods§
Sourcefn get_namespace<'s>(&'s self, prefix: &str) -> Option<Iri<&'s str>>
fn get_namespace<'s>(&'s self, prefix: &str) -> Option<Iri<&'s str>>
Return the IRI associated to this prefix, if any.
Provided Methods§
Sourcefn get_prefixed_pair<'s, T: IsIri + 's>(
&'s self,
iri: T,
) -> Option<(Prefix<&'s str>, MownStr<'s>)>
fn get_prefixed_pair<'s, T: IsIri + 's>( &'s self, iri: T, ) -> Option<(Prefix<&'s str>, MownStr<'s>)>
Return a prefix-suffix pair describing the given IRI, if any.
Sourcefn to_vec(&self) -> Vec<PrefixMapPair>
fn to_vec(&self) -> Vec<PrefixMapPair>
Copies this prefix map as a self-sufficient vector
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.