FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IPropertyInfo

    trait · ferroui-base · v0.5.0

    trait IPropertyInfo
    

    Describes a property of an object that is not a registered property: its name, type and untyped accessors.

    View source

    Members

    name

    fn name(self: &Self) -> &str
    

    The name of the property.

    Source

    get

    fn get(self: &Self, target: &dyn AnyValue) -> Option<BoxedValue>
    

    Reads the property from target. Null is None.

    Source

    try_get

    fn try_get(self: &Self, target: &dyn AnyValue) -> Result<Option<BoxedValue>, BindingError>
    

    Reads the property from target. An Err is the equivalent of the getter throwing, for example because target is not of the type that declares the property.

    Source

    set

    fn set(self: &Self, target: &dyn AnyValue, value: Option<&BoxedValue>) -> Result<(), BindingError>
    

    Writes the property on target. An Err is the equivalent of the setter throwing.

    Source

    can_set

    fn can_set(self: &Self) -> bool
    

    Source

    can_get

    fn can_get(self: &Self) -> bool
    

    Source

    property_type

    fn property_type(self: &Self) -> ValueType
    

    The type of the property's value.

    Source

    as_any

    fn as_any(self: &Self) -> Option<&dyn std::any::Any>
    

    The implementing value, for casting to its concrete type (as_any()?.downcast_ref::<T>()): the equivalent of is/as on the contract. None for an implementation that does not expose itself.

    Source

    get_boxed

    fn get_boxed(self: &Self, target: &BoxedValue) -> Option<BoxedValue>
    

    get for an owner known as an untyped handle. The accessors of binding paths read through the boxed forms, so that a property description whose accessors need the handle of the owner (not only a view of it) can override them; the defaults forward to the forms taking a view. Override the three boxed forms together.

    Source

    try_get_boxed

    fn try_get_boxed(self: &Self, target: &BoxedValue) -> Result<Option<BoxedValue>, BindingError>
    

    try_get for an owner known as an untyped handle.

    Source

    set_boxed

    fn set_boxed(self: &Self, target: &BoxedValue, value: Option<&BoxedValue>) -> Result<(), BindingError>
    

    set for an owner known as an untyped handle.

    Source

    as_ferro_property

    fn as_ferro_property(self: &Self) -> Option<&'static FerroProperty>
    

    The registered property this description is, if it is one (the cast of a property description back to the registered property class).

    Source

    Trait implementations

    Availability

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