[−][src]Trait rome::graph::LiteralPtr
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
type DatatypePtr: DatatypePtr<'g> + PartialEq
The type of pointer for the datatype of the literal.
Required Methods
fn as_str(&self) -> &str
Get the value of the literal (without datattype or language)
fn datatype(&self) -> Self::DatatypePtr
Get the datatype of the literal.
fn datatype_str(&self) -> &str
Get the datatype of the literal as a string.
fn language(&self) -> Option<&str>
Get the language of the literal.
Provided Methods
fn to_resource<B, I>(&self) -> Resource<'g, B, I, Self> where
Self: Clone,
B: BlankNodePtr<'g>,
I: IRIPtr<'g>,
Self: Clone,
B: BlankNodePtr<'g>,
I: IRIPtr<'g>,
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 &'g str
type DatatypePtr = &'g str
fn as_str(&self) -> &str
[src]
fn as_str(&self) -> &str
fn datatype(&self) -> &'g str
[src]
fn datatype(&self) -> &'g str
fn datatype_str(&self) -> &str
[src]
fn datatype_str(&self) -> &str
fn language(&self) -> Option<&str>
[src]
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>,
[src]
fn to_resource<B, I>(&self) -> Resource<'g, B, I, Self> where
Self: Clone,
B: BlankNodePtr<'g>,
I: IRIPtr<'g>,
impl<'g> LiteralPtr<'g> for String
[src]
impl<'g> LiteralPtr<'g> for String
type DatatypePtr = &'g str
fn as_str(&self) -> &str
[src]
fn as_str(&self) -> &str
fn datatype(&self) -> &'g str
[src]
fn datatype(&self) -> &'g str
fn datatype_str(&self) -> &str
[src]
fn datatype_str(&self) -> &str
fn language(&self) -> Option<&str>
[src]
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>,
[src]
fn to_resource<B, I>(&self) -> Resource<'g, B, I, Self> where
Self: Clone,
B: BlankNodePtr<'g>,
I: IRIPtr<'g>,