Trait mz_adapter::session::vars::Value
source · pub trait Value: ToOwned + Send + Sync {
const TYPE_NAME: &'static str;
fn parse(input: VarInput<'_>) -> Result<Self::Owned, ()>;
fn format(&self) -> String;
}
Expand description
A value that can be stored in a session or server variable.
Required Associated Constants§
Required Methods§
sourcefn parse(input: VarInput<'_>) -> Result<Self::Owned, ()>
fn parse(input: VarInput<'_>) -> Result<Self::Owned, ()>
Parses a value of this type from a VarInput
.
sourcefn format(&self) -> String
fn format(&self) -> String
Formats this value as a flattened string.
The resulting string is guaranteed to be parsable if provided to
Value::parse
as a VarInput::Flat
.