pub trait DataType<T>: Display + TryInto<T> {
    // Required methods
    fn value(&self) -> Result<T>;
    fn as_str(&self) -> Result<&str>;
    fn as_str_lossy(&self) -> Cow<'_, str>;
    fn raw(&self) -> &[u8] ;
}

Required Methods§

source

fn value(&self) -> Result<T>

Get the actual value that the inner byte slice is representing.

source

fn as_str(&self) -> Result<&str>

Get the value as a raw string, before actual parsing.

source

fn as_str_lossy(&self) -> Cow<'_, str>

Get the value as a raw string in lossless fashion, before actual parsing.

source

fn raw(&self) -> &[u8]

The raw slice that represents the data.

Implementors§