[][src]Enum json_ld::object::Object

pub enum Object<T: Id = IriBuf> {
    Value(Value<T>),
    Node(Node<T>),
    List(Vec<Indexed<Object<T>>>),
}

Object descriptor.

Variants

Value(Value<T>)

Value object.

Node(Node<T>)

Node object.

List(Vec<Indexed<Object<T>>>)

List object.

Methods

impl<T: Id> Object<T>[src]

pub fn id(&self) -> Option<&Lenient<Reference<T>>>[src]

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

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

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

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

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

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

pub fn into_unnamed_graph(
    self: Indexed<Self>
) -> Result<HashSet<Indexed<Object<T>>>, Indexed<Self>>
[src]

Try to convert this object into an unnamed graph.

Trait Implementations

impl<T: Id> AsJson for Object<T>[src]

impl<T: Id> Debug for Object<T>[src]

impl<T: Eq + Id> Eq for Object<T>[src]

impl<T: Id> From<Node<T>> for Object<T>[src]

impl<T: Id> From<Value<T>> for Object<T>[src]

impl<T: Hash + Id> Hash for Object<T>[src]

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

impl<T: Id> StructuralEq for Object<T>[src]

impl<T: Id> StructuralPartialEq for Object<T>[src]

impl<T: Id> TryFrom<Object<T>> for Node<T>[src]

type Error = Object<T>

The type returned in the event of a conversion error.

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for Object<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<T> for T[src]

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

impl<T> ToOwned for T[src]

type Owned = T

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.