[][src]Struct json_ld::object::node::Node

pub struct Node<T: Id = IriBuf> { /* fields omitted */ }

A node object.

Methods

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

pub fn new() -> Node<T>[src]

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

pub fn has_key(&self, key: &Term<T>) -> bool[src]

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

pub fn has_type<U>(&self, ty: &U) -> bool where
    Lenient<Reference<T>>: PartialEq<U>, 
[src]

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

Test if the node is empty.

It is empty is every field except for @id is empty.

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

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

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

pub fn get<'a, Q: ToReference<T>>(&self, prop: Q) -> Objects<T> where
    T: 'a, 
[src]

pub fn insert(&mut self, prop: Reference<T>, value: Indexed<Object<T>>)[src]

pub fn insert_all<Objects: Iterator<Item = Indexed<Object<T>>>>(
    &mut self,
    prop: Reference<T>,
    values: Objects
)
[src]

pub fn insert_reverse(
    &mut self,
    reverse_prop: Reference<T>,
    reverse_value: Indexed<Node<T>>
)
[src]

pub fn insert_all_reverse<Nodes: Iterator<Item = Indexed<Node<T>>>>(
    &mut self,
    reverse_prop: Reference<T>,
    reverse_values: Nodes
)
[src]

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

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

Trait Implementations

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

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

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

impl<T: Id> Hash for Node<T>[src]

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

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

impl<T: Id> StructuralPartialEq for Node<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 Node<T> where
    T: RefUnwindSafe

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

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

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

impl<T> UnwindSafe for Node<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.