[][src]Enum json_ld::Lenient

pub enum Lenient<T> {
    Ok(T),
    Unknown(String),
}

Wrapper for string data that may be malformed.

This is usually used with Term, or Type to allow for terms/types that are not IRIs or blanck nodes, etc. but must be kept in the data structure.

Variants

Ok(T)
Unknown(String)

Methods

impl<T> Lenient<T>[src]

pub fn cast<U>(self) -> Lenient<U> where
    U: From<T>, 
[src]

pub fn try_cast<U>(self) -> Result<Lenient<U>, U::Error> where
    U: TryFrom<T>, 
[src]

impl<T: TermLike> Lenient<T>[src]

pub fn as_iri(&self) -> Option<Iri>[src]

pub fn as_str(&self) -> &str[src]

Trait Implementations

impl<T: AsJson> AsJson for Lenient<T>[src]

impl<T: Clone> Clone for Lenient<T>[src]

impl<T: Display> Display for Lenient<T>[src]

impl<T: Eq> Eq for Lenient<T>[src]

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

impl<T: Hash> Hash for Lenient<T>[src]

impl<T: PartialEq> PartialEq<Lenient<T>> for Lenient<T>[src]

impl<T: Id + PartialEq> PartialEq<T> for Lenient<Reference<T>>[src]

impl<T: PartialEq> PartialEq<T> for Lenient<T>[src]

impl<V: Vocab> PartialEq<V> for Lenient<Reference<Lexicon<V>>>[src]

impl<T> StructuralEq for Lenient<T>[src]

impl<T> StructuralPartialEq for Lenient<T>[src]

Auto Trait Implementations

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

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

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

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

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

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<!> for T[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> ToOwned for T[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[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.