[][src]Struct sophia_api::term::RawValue

pub struct RawValue<'a>(pub &'a str, pub Option<&'a str>);

A raw value is a string possibly split into two parts.

The second part of the raw value is intended for some implementations of IRIs, storing both a "namespace" and a "suffix". For other kinds of term, the second part must be None.

Implementations

impl<'a> RawValue<'a>[src]

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

If this represents an IRI, check if its an absolute one.

Note: This function merely checks that the resulting string starts with an IRI scheme. It does not further check the validity of the full IRI, which is supposed to be done by the TTerm implementation.

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

Iterator over all bytes of the raw value.

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

Returns the length of the string, including the length of the second if present.

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

Trait Implementations

impl<'a> Clone for RawValue<'a>[src]

impl<'a> Copy for RawValue<'a>[src]

impl<'a> Debug for RawValue<'a>[src]

impl<'a> Eq for RawValue<'a>[src]

impl<'a> From<&'a str> for RawValue<'a>[src]

impl<'a> From<(&'a str, Option<&'a str>)> for RawValue<'a>[src]

impl<'a> From<RawValue<'a>> for MownStr<'a>[src]

impl<'a> Hash for RawValue<'a>[src]

impl<'a> PartialEq<RawValue<'a>> for RawValue<'a>[src]

impl<'a> StructuralEq for RawValue<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for RawValue<'a>

impl<'a> Send for RawValue<'a>

impl<'a> Sync for RawValue<'a>

impl<'a> Unpin for RawValue<'a>

impl<'a> UnwindSafe for RawValue<'a>

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.