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

Return the lexical form of this literal.

Returns this literal’s data type, if present.

Return this literal’s language tag, if present.

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

Returns true if this literal has a specified data type, else false.

Returns true if this literal has a specified language, else false.

Trait Implementations

Formats the value using the given formatter. Read more

Returns true if other is equivalent to self, else false.

Returns true if other is not equivalent to self, else false.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Implementors