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§
Sourcefn as_str_lossy(&self) -> Cow<'_, str>
fn as_str_lossy(&self) -> Cow<'_, str>
Get the value as a raw string in lossless fashion, before actual parsing.
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.