Trait PropType
pub trait PropType: Sized {
// Required methods
fn ty() -> Type;
fn from_value(value: &Value) -> Result<Self, String>;
// Provided method
fn read(value: &Value, source: &mut dyn Source) -> Result<Self, String> { ... }
}Expand description
Required Methods§
fn ty() -> Type
fn from_value(value: &Value) -> Result<Self, String>
fn from_value(value: &Value) -> Result<Self, String>
§Errors
The value is of another type.
Provided Methods§
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§
Implementors§
impl PropType for ContentKind
impl PropType for EntryKind
impl PropType for TextKind
impl PropType for TextRole
impl PropType for Icon
impl PropType for Feel
impl PropType for ChromeMaterial
impl PropType for Align
impl PropType for Distribute
impl PropType for ActivityArtifact
impl PropType for BannerKind
impl PropType for ButtonRole
impl PropType for CardWidth
impl PropType for ChromeEdge
impl PropType for ChromeShape
impl PropType for ControlSize
impl PropType for DeliveryState
impl PropType for IconSize
impl PropType for ImageFit
impl PropType for Ink
impl PropType for Language
impl PropType for Meaning
impl PropType for MediaAspect
impl PropType for MediaSize
impl PropType for PictureKind
impl PropType for PopoverSide
impl PropType for ProgressRingSize
impl PropType for RowLeadingShape
impl PropType for RowStatus<'static>
impl PropType for RunAxis
impl PropType for RunGroup
impl PropType for Shape
impl PropType for SignalLevel
impl PropType for SkeletonForm
impl PropType for Tone
impl PropType for TransportRepeat
impl PropType for TreeTone
impl PropType for Trend
impl PropType for Weight
impl PropType for PictureSource
A picture as a prop: Type::Picture holding tilo_ui_graph::component::Picture.