pub trait ValueConverter: Send + Sync {
// Required methods
fn convert(&self, value: &str) -> Result<String, ConversionError>;
fn convert_back(&self, value: &str) -> Result<String, ConversionError>;
}Expand description
Converts values between different types for binding.
Required Methods§
Sourcefn convert(&self, value: &str) -> Result<String, ConversionError>
fn convert(&self, value: &str) -> Result<String, ConversionError>
Convert from source type to target type.
Sourcefn convert_back(&self, value: &str) -> Result<String, ConversionError>
fn convert_back(&self, value: &str) -> Result<String, ConversionError>
Convert back from target type to source type.