[][src]Trait rome::graph::LiteralPtr

pub trait LiteralPtr<'g> {
    type DatatypePtr: DatatypePtr<'g> + PartialEq;
    fn as_str(&self) -> &str;
fn datatype(&self) -> Self::DatatypePtr;
fn datatype_str(&self) -> &str;
fn language(&self) -> Option<&str>; fn to_resource<B, I>(&self) -> Resource<'g, B, I, Self>
    where
        Self: Clone,
        B: BlankNodePtr<'g>,
        I: IRIPtr<'g>
, { ... } }

A trait for a pointers to literals in graphs.

The lifetime of iterals is tied to the graph to which they belong. A literal always has a datatype. It has an optional language.

Associated Types

The type of pointer for the datatype of the literal.

Required Methods

Get the value of the literal (without datattype or language)

Get the datatype of the literal.

Get the datatype of the literal as a string.

Get the language of the literal.

Provided Methods

Wrap the literal in a Resource. This is convenient when passing the literal as an object in a triple.

Implementations on Foreign Types

impl<'g> LiteralPtr<'g> for &'g str
[src]

impl<'g> LiteralPtr<'g> for String
[src]

Implementors