Trait FromProperty

Source
pub trait FromProperty: Sized {
    // Required method
    fn from_property(property: PropertyValue) -> Result<Self, Error>;
}
Expand description

Trait for conversion of properties into actual types.

Required Methods§

Source

fn from_property(property: PropertyValue) -> Result<Self, Error>

Try to convert the property value into Self.

§Errors

Causes an error if the value is not properly convertible.

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.

Implementations on Foreign Types§

Source§

impl FromProperty for Style

Source§

impl FromProperty for bool

Source§

impl FromProperty for String

Source§

impl<T: FromProperty> FromProperty for Result<T, Error>

Implementors§