FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ClrPropertyInfo

    struct · ferroui-base · v0.5.0

    struct ClrPropertyInfo
    

    A property description built from accessor closures. This is what compiled bindings use to read and write plain properties.

    View source

    Members

    new

    fn new(name: &str, getter: Option<PropertyGetter>, setter: Option<PropertySetter>, property_type: ValueType) -> Self
    

    Creates a property description from untyped accessors.

    Source

    new_fallible

    fn new_fallible(name: &str, getter: Option<FalliblePropertyGetter>, setter: Option<PropertySetter>, property_type: ValueType) -> Self
    

    Creates a property description from untyped accessors, with a getter that can fail.

    Source

    with_boxed_accessors

    fn with_boxed_accessors(self: Self, getter: Option<BoxedPropertyGetter>, setter: Option<BoxedPropertySetter>) -> Self
    

    Adds accessors that take the owner as an untyped handle. A property description built over accessors that need the handle of the owner and not only a view of it (the invokers of markup metadata) is read and written through them by the boxed forms of the contract (IPropertyInfo::get_boxed, IPropertyInfo::try_get_boxed, IPropertyInfo::set_boxed).

    Source

    read_only_fallible

    fn read_only_fallible<O: 'static, K: PropertyKind>(name: &str, get: impl Fn(&O) -> Result<<K as >::Typed, BindingError> + 'static) -> Self
    

    A read-only property of owner type O whose getter can fail, the way the getter of an indexer throws for a bad index or key.

    Source

    read_write_fallible

    fn read_write_fallible<O: 'static, K: PropertyKind>(name: &str, get: impl Fn(&O) -> Result<<K as >::Typed, BindingError> + 'static, set: impl Fn(&O, <K as >::Typed) -> Result<(), BindingError> + 'static) -> Self
    

    A read-write property of owner type O whose getter and setter can fail.

    Source

    read_only

    fn read_only<O: 'static, K: PropertyKind>(name: &str, get: impl Fn(&O) -> <K as >::Typed + 'static) -> Self
    

    A read-only property of owner type O, from a typed getter.

    Source

    read_write

    fn read_write<O: 'static, K: PropertyKind>(name: &str, get: impl Fn(&O) -> <K as >::Typed + 'static, set: impl Fn(&O, <K as >::Typed) -> () + 'static) -> Self
    

    A read-write property of owner type O, from typed accessors.

    Source

    read_write_validated

    fn read_write_validated<O: 'static, K: PropertyKind>(name: &str, get: impl Fn(&O) -> <K as >::Typed + 'static, set: impl Fn(&O, <K as >::Typed) -> Result<(), BindingError> + 'static) -> Self
    

    A read-write property whose setter can reject values.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • IPropertyInfo
    • MarkupTyped

    Availability

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