Trait rdftk_core::model::literal::LiteralFactory[][src]

pub trait LiteralFactory: Debug + Provided {
Show methods fn literal(&self, v: &str) -> LiteralRef;
fn with_language(&self, v: &str, lang: LanguageTag) -> LiteralRef;
fn with_data_type(&self, v: &str, data_type: DataType) -> LiteralRef; fn with_language_str(&self, v: &str, lang: &str) -> Result<LiteralRef> { ... }
fn string(&self, v: &str) -> LiteralRef { ... }
fn qname(&self, v: &str) -> LiteralRef { ... }
fn uri(&self, v: &IRIRef) -> LiteralRef { ... }
fn boolean(&self, v: bool) -> LiteralRef { ... }
fn float(&self, v: f32) -> LiteralRef { ... }
fn double(&self, v: f64) -> LiteralRef { ... }
fn long(&self, v: i64) -> LiteralRef { ... }
fn int(&self, v: i32) -> LiteralRef { ... }
fn short(&self, v: i16) -> LiteralRef { ... }
fn byte(&self, v: i8) -> LiteralRef { ... }
fn unsigned_long(&self, v: u64) -> LiteralRef { ... }
fn unsigned_int(&self, v: u32) -> LiteralRef { ... }
fn unsigned_short(&self, v: u16) -> LiteralRef { ... }
fn unsigned_byte(&self, v: u8) -> LiteralRef { ... }
fn duration(&self, v: Duration) -> LiteralRef { ... }
fn chrono_duration(&self, v: Duration) -> LiteralRef { ... }
}
Expand description

A value factory can be used to provide previously cached values rather than creating duplicates within a graph. Such a factory may only be retrieved using the Graph::literal_factory method.

Required methods

Returns a cached untyped literal value with the provided string.

Returns a cached literal value with the provided string and language.

Returns a cached literal value with the provided string and data type.

Provided methods

Returns a cached literal value with the provided string and language.

Returns a cached literal value with the provided string.

Returns a cached literal value with the provided QName.

Returns a cached literal value with the provided IRI.

Returns a cached literal value with the provided boolean.

Returns a cached literal value with the provided float.

Returns a cached literal value with the provided double.

Returns a cached literal value with the provided long.

Returns a cached literal value with the provided int.

Returns a cached literal value with the provided short.

Returns a cached literal value with the provided byte.

Returns a cached literal value with the provided unsigned long.

Returns a cached literal value with the provided unsigned int.

Returns a cached literal value with the provided unsigned short.

Returns a cached literal value with the provided unsigned byte.

Returns a cached literal value with the provided duration.

Returns a cached literal value with the provided duration.

Implementors