[−][src]Struct sophia::term::IriData
Internal representation of an IRI.
May be encountered when pattern-matching on Term
s
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
withto_string
;
See module documentation for more detail.
Methods
impl<T> IriData<T> where
T: AsRef<str>,
[src]
T: AsRef<str>,
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]
W: Write,
Write this IRI to w
.
Trait Implementations
impl<T: Clone + AsRef<str>> Clone for IriData<T>
[src]
fn clone(&self) -> 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]
T: AsRef<str>,
U: AsRef<str>,
fn eq(&self, other: &IriData<U>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'a, T> PartialEq<&'a str> for IriData<T> where
T: AsRef<str>,
[src]
T: AsRef<str>,
fn eq(&self, other: &&'a str) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T, U> PartialEq<Term<U>> for IriData<T> where
T: AsRef<str>,
U: TermData,
[src]
T: AsRef<str>,
U: TermData,
fn eq(&self, other: &Term<U>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T, U> PartialEq<IriData<U>> for Term<T> where
T: TermData,
U: TermData,
[src]
T: TermData,
U: TermData,
fn eq(&self, other: &IriData<U>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.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]
T: AsRef<str>,
Auto Trait Implementations
impl<T> Sync for IriData<T> where
T: Sync,
T: Sync,
impl<T> Send for IriData<T> where
T: Send,
T: Send,
impl<T> Unpin for IriData<T> where
T: Unpin,
T: Unpin,
impl<T> RefUnwindSafe for IriData<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> UnwindSafe for IriData<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,