pub trait Literal:
Debug
+ Clone
+ Display
+ PartialEq
+ Eq
+ Hash {
// Required methods
fn lexical_form(&self) -> &str;
fn lang(&self) -> Option<&str>;
fn datatype(&self) -> &str;
// Provided methods
fn as_bool(&self) -> Option<bool> { ... }
fn as_integer(&self) -> Option<isize> { ... }
fn as_double(&self) -> Option<f64> { ... }
fn as_decimal(&self) -> Option<Decimal> { ... }
fn as_literal(&self) -> SRDFLiteral { ... }
}
Required Methods§
fn lexical_form(&self) -> &str
fn lang(&self) -> Option<&str>
fn datatype(&self) -> &str
Provided Methods§
fn as_bool(&self) -> Option<bool>
fn as_integer(&self) -> Option<isize>
fn as_double(&self) -> Option<f64>
fn as_decimal(&self) -> Option<Decimal>
fn as_literal(&self) -> SRDFLiteral
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.