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§
Sourcefn from_property(property: PropertyValue) -> Result<Self, Error>
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.