[][src]Struct sophia::term::IriData

pub struct IriData<T: AsRef<str>> { /* fields omitted */ }

Internal representation of an IRI.

May be encountered when pattern-matching on Terms of the Iri variant. For that purpose, note that IriData

  • can be directly compared to a &str with the == operator;
  • can be directly compared to a Term with the == operator;
  • provides some identical methods to what &str provides (see below);
  • can otherwise be converted to a String with to_string;

See module documentation for more detail.

Methods

impl<T> IriData<T> where
    T: AsRef<str>, 
[src]

pub fn len(&self) -> usize[src]

The length of this IRI.

pub fn is_empty(&self) -> bool[src]

pub fn bytes<'a>(&'a self) -> impl Iterator<Item = u8> + 'a[src]

Iterate over the bytes representing this IRI.

pub fn chars<'a>(&'a self) -> impl Iterator<Item = char> + 'a[src]

Iterate over the characters representing this IRI.

pub fn to_string(&self) -> String[src]

Construct a copy of this IRI as a String.

pub fn is_absolute(&self) -> bool[src]

Whether this IRI is absolute or relative.

pub fn write_to<W>(&self, w: &mut W) -> IoResult<()> where
    W: Write
[src]

Write this IRI to w.

Trait Implementations

impl<T: Clone + AsRef<str>> Clone for IriData<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T, U> PartialEq<IriData<U>> for IriData<T> where
    T: AsRef<str>,
    U: AsRef<str>, 
[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<'a, T> PartialEq<&'a str> for IriData<T> where
    T: AsRef<str>, 
[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<T, U> PartialEq<Term<U>> for IriData<T> where
    T: AsRef<str>,
    U: TermData
[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<T, U> PartialEq<IriData<U>> for Term<T> where
    T: TermData,
    U: TermData
[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<T: Copy + AsRef<str>> Copy for IriData<T>[src]

impl<T: Eq + AsRef<str>> Eq for IriData<T>[src]

impl<T: Debug + AsRef<str>> Debug for IriData<T>[src]

impl<T> Hash for IriData<T> where
    T: AsRef<str>, 
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<T> Sync for IriData<T> where
    T: Sync

impl<T> Send for IriData<T> where
    T: Send

impl<T> Unpin for IriData<T> where
    T: Unpin

impl<T> RefUnwindSafe for IriData<T> where
    T: RefUnwindSafe

impl<T> UnwindSafe for IriData<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]