PropertyValue

Trait PropertyValue 

Source
pub trait PropertyValue: Sized {
    type Err;

    const MAYBE_UNSET: bool;

    // Required method
    fn parse(value: &RawValue) -> Result<Self, Self::Err>;
}
Expand description

Trait for types that be parsed out of RawValues.

Types that implement this trait should also implement Into<RawValue>.

Required Associated Constants§

Source

const MAYBE_UNSET: bool

Indicates whether a value that is case-insensitively equal to “unset” should NOT be treated as if the value is unset.

This will typically be false for non-string properties.

Required Associated Types§

Source

type Err

The type of value returned on a failed parse.

Required Methods§

Source

fn parse(value: &RawValue) -> Result<Self, Self::Err>

Parses a value from a not-unset RawValue.

This usually shouldn’t be called directly. See crate::Properties or RawValue::parse.

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.

Implementors§