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.
Members
newnew_falliblewith_boxed_accessorsread_only_fallibleread_write_fallibleread_onlyread_writeread_write_validated
new
fn new(name: &str, getter: Option<PropertyGetter>, setter: Option<PropertySetter>, property_type: ValueType) -> Self
Creates a property description from untyped accessors.
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.
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).
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.
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.
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.
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.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherIPropertyInfoMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.