[][src]Trait sophia_term::iri::resolve::Resolve

pub trait Resolve<S, T> {
    fn resolve(&self, other: S) -> T;
}

Resolve some kind of IRI with self as the base.

Required methods

fn resolve(&self, other: S) -> T

Resolve relative IRI(s) somewhat contained in other with self as the base IRI.

Loading content...

Implementors

impl<'a> Resolve<&'a IriParsed<'a>, IriParsed<'a>> for IriParsed<'a>[src]

fn resolve(&self, other: &'a IriParsed<'a>) -> IriParsed<'a>[src]

Just a call to IriParsed::join()

impl<'a, 'b> Resolve<&'a str, Result<MownStr<'a>, InvalidIri>> for IriParsed<'b>[src]

fn resolve(&self, other: &'a str) -> Result<MownStr<'a>, InvalidIri>[src]

Resolve an IRI given as String.

Fails if other is not a valid IRI.

impl<'a, 'b> Resolve<Iri<&'a str>, Iri<MownStr<'a>>> for IriParsed<'b>[src]

fn resolve(&self, other: Iri<&'a str>) -> Iri<MownStr<'a>>[src]

Resolve the given IRI.

Performance

May allocate an intermediate IRI if other is suffixed.

impl<'a, 'b, T> Resolve<&'a Namespace<T>, Namespace<MownStr<'a>>> for IriParsed<'b> where
    T: AsRef<str>, 
[src]

fn resolve(&self, other: &'a Namespace<T>) -> Namespace<MownStr<'a>>[src]

Resolve the IRI of the given Namespace.

impl<'a, 'b, TD> Resolve<&'a Term<TD>, Term<MownStr<'a>>> for IriParsed<'b> where
    TD: TermData
[src]

fn resolve(&self, other: &'a Term<TD>) -> MownTerm<'a>[src]

Resolve IRIs and the IRIs of typed literals.

Performance

May allocate an intermediate IRI if an IRI is suffixed.

impl<'a, 'b, TD> Resolve<&'a Iri<TD>, Iri<MownStr<'a>>> for IriParsed<'b> where
    TD: TermData
[src]

fn resolve(&self, other: &'a Iri<TD>) -> Iri<MownStr<'a>>[src]

Resolve the given IRI.

Performance

May allocate an intermediate IRI if other is suffixed.

impl<'a, 'b, TD> Resolve<&'a Literal<TD>, Literal<MownStr<'a>>> for IriParsed<'b> where
    TD: TermData
[src]

fn resolve(&self, other: &'a Literal<TD>) -> Literal<MownStr<'a>>[src]

Resolve the data type's IRI if it is relative.

Note that this only affects datatyped literals; language-tagged literals are absolute by construction.

Performance

May allocate an intermediate IRI if other.dt() is suffixed.

Loading content...