[−][src]Struct sophia_term::iri::resolve::IriParsed
Keeps track of the different components of an IRI reference.
NB: this type does not store the actual text of the IRI reference,
it borrows it from one (or possibly several) external str
s.
Implementations
impl<'a> IriParsed<'a>
[src]
pub fn new(txt: &'a str) -> Result<IriParsed<'a>, InvalidIri>
[src]
Parse the given str
as an IRI reference,
and return its inner structure (or fail with a TermError
).
pub fn is_absolute(&self) -> bool
[src]
Return true
if this IRI reference is absolute.
pub fn join(&self, other: &IriParsed<'a>) -> IriParsed<'a>
[src]
Resolve other
using this IRI reference as the base.
NB: the resulting IriParsed
may borrow parts from both parts.
Trait Implementations
impl<'a> Clone for IriParsed<'a>
[src]
impl<'a> Debug for IriParsed<'a>
[src]
impl<'a> Default for IriParsed<'a>
[src]
impl<'_> Display for IriParsed<'_>
[src]
impl<'a> Eq for IriParsed<'a>
[src]
impl<'a> PartialEq<IriParsed<'a>> for IriParsed<'a>
[src]
impl<'a, 'b, TD> Resolve<&'a Iri<TD>, Iri<MownStr<'a>>> for IriParsed<'b> where
TD: TermData,
[src]
TD: TermData,
impl<'a> Resolve<&'a IriParsed<'a>, IriParsed<'a>> for IriParsed<'a>
[src]
impl<'a, 'b, TD> Resolve<&'a Literal<TD>, Literal<MownStr<'a>>> for IriParsed<'b> where
TD: TermData,
[src]
TD: TermData,
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.
impl<'a, 'b, T> Resolve<&'a Namespace<T>, Namespace<MownStr<'a>>> for IriParsed<'b> where
T: AsRef<str>,
[src]
T: AsRef<str>,
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]
TD: TermData,
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> 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]
Auto Trait Implementations
impl<'a> RefUnwindSafe for IriParsed<'a>
impl<'a> Send for IriParsed<'a>
impl<'a> Sync for IriParsed<'a>
impl<'a> Unpin for IriParsed<'a>
impl<'a> UnwindSafe for IriParsed<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,