pub trait FromProps<'kv> {
// Required method
fn from_props<P>(props: &'kv P) -> Self
where P: Props + ?Sized;
}Expand description
A type that can be constructed from Props.
This trait is like the standard library’s FromIterator, but for Props instead of Iterator.
Required Methods§
Sourcefn from_props<P>(props: &'kv P) -> Self
fn from_props<P>(props: &'kv P) -> Self
Convert from P.
Implementors of this method may re-order or deduplicate key-values in props.
If any deduplication occurs, it must take the first value seen for a given key.
If props is empty, this method should return a default, empty Self.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<'kv, 'a, C> FromProps<'kv> for Arc<C>where
C: FromProps<'kv> + 'a,
Available on crate feature alloc only.
impl<'kv, 'a, C> FromProps<'kv> for Arc<C>where
C: FromProps<'kv> + 'a,
Available on crate feature
alloc only.Source§impl<'kv, 'a, C> FromProps<'kv> for Box<C>where
C: FromProps<'kv> + 'a,
Available on crate feature alloc only.
impl<'kv, 'a, C> FromProps<'kv> for Box<C>where
C: FromProps<'kv> + 'a,
Available on crate feature
alloc only.