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§
Sourceconst MAYBE_UNSET: bool
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§
Required Methods§
Sourcefn parse(value: &RawValue) -> Result<Self, Self::Err>
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§
Source§impl PropertyValue for Charset
impl PropertyValue for Charset
const MAYBE_UNSET: bool = false
type Err = UnknownValueError
Source§impl PropertyValue for EndOfLine
impl PropertyValue for EndOfLine
const MAYBE_UNSET: bool = false
type Err = UnknownValueError
Source§impl PropertyValue for FinalNewline
impl PropertyValue for FinalNewline
const MAYBE_UNSET: bool = false
type Err = UnknownValueError
Source§impl PropertyValue for IndentSize
impl PropertyValue for IndentSize
const MAYBE_UNSET: bool = false
type Err = UnknownValueError
Source§impl PropertyValue for IndentStyle
impl PropertyValue for IndentStyle
const MAYBE_UNSET: bool = false
type Err = UnknownValueError
Source§impl PropertyValue for MaxLineLen
impl PropertyValue for MaxLineLen
const MAYBE_UNSET: bool = false
type Err = UnknownValueError
Source§impl PropertyValue for SpellingLanguage
Available on crate feature language-tags only.
impl PropertyValue for SpellingLanguage
Available on crate feature
language-tags only.