Trait Literal

Source
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§

Source

fn lexical_form(&self) -> &str

Source

fn lang(&self) -> Option<&str>

Source

fn datatype(&self) -> &str

Provided Methods§

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.

Implementations on Foreign Types§

Source§

impl Literal for Literal

Source§

fn lexical_form(&self) -> &str

Source§

fn lang(&self) -> Option<&str>

Source§

fn datatype(&self) -> &str

Implementors§