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) -> String;
}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) -> String
fn to_raw_value(&self) -> String
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", so this trait is not object safe.