Trait rdftk_core::model::literal::Literal [−][src]
pub trait Literal: Debug { fn lexical_form(&self) -> &String; fn data_type(&self) -> Option<&DataType>; fn language(&self) -> Option<&LanguageTag>; fn factory(&self) -> LiteralFactoryRef; fn has_data_type(&self) -> bool { ... } fn has_language(&self) -> bool { ... } }
Expand description
This trait describes an RDF literal which may be the object of a statement.
Required methods
fn lexical_form(&self) -> &String
[src]
fn lexical_form(&self) -> &String
[src]Return the lexical form of this literal.
fn language(&self) -> Option<&LanguageTag>
[src]
fn language(&self) -> Option<&LanguageTag>
[src]Return this literal’s language tag, if present.
fn factory(&self) -> LiteralFactoryRef
[src]
fn factory(&self) -> LiteralFactoryRef
[src]Return the factory that creates literals using the same provider as self
.
Note that this uses Arc as a reference as factories are explicitly intended for cross-thread usage.
Provided methods
fn has_data_type(&self) -> bool
[src]
fn has_data_type(&self) -> bool
[src]Returns true
if this literal has a specified data type, else false
.
fn has_language(&self) -> bool
[src]
fn has_language(&self) -> bool
[src]Returns true
if this literal has a specified language, else false
.