FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    StyledPropertyMetadata

    struct · ferroui-base · v0.5.0

    struct StyledPropertyMetadata<T>
    

    Metadata for styled properties.

    View source

    Members

    new

    fn new(default_value: Option<T>) -> Self
    

    Creates metadata. A default_value of None inherits the default value of the base metadata when merged.

    Source

    with_default_binding_mode

    fn with_default_binding_mode(self: Self, mode: BindingMode) -> Self
    

    Source

    with_coerce

    fn with_coerce(self: Self, coerce: impl Fn(&FerroObject, T) -> T + 'static) -> Self
    

    Source

    with_enable_data_validation

    fn with_enable_data_validation(self: Self, enable: bool) -> Self
    

    Source

    default_value

    fn default_value(self: &Self) -> &T
    

    The default value of the property. Panics if the metadata has not been merged with a base that provides one.

    Source

    coerce_value

    fn coerce_value(self: &Self) -> Option<&CoerceValueCallback<T>>
    

    The value coercion callback, if any.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Receiver
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Deref

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.