pub trait StringValueData: Clone {
type Error: Error + Send + Sync + 'static;
// Required methods
fn parse_from_str(s: &str) -> Result<Self, Self::Error>
where Self: Sized;
fn to_raw_value(&self) -> Box<str>;
}Expand description
Trait for data types that can be used with StringValue, defines how to parse and serialize the value.
Required Associated Types§
Required Methods§
Sourcefn parse_from_str(s: &str) -> Result<Self, Self::Error>where
Self: Sized,
fn parse_from_str(s: &str) -> Result<Self, Self::Error>where
Self: Sized,
Parse the value from a string.
Sourcefn to_raw_value(&self) -> Box<str>
fn to_raw_value(&self) -> Box<str>
Convert the value to its raw string representation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".