DirectProperty
struct · ferroui-base · v0.5.0
struct DirectProperty<TOwner: ObjectType, T: PropertyValue>
A direct property: a property whose value is stored in a field of its owner and accessed through a getter and an optional setter.
Members
getter
fn getter(self: &Self) -> fn(&TOwner) -> T
The getter function.
setter
fn setter(self: &Self) -> Option<fn(&TOwner, T) -> ()>
The setter function, if the property is writable.
add_owner
fn add_owner<TNewOwner: ObjectType>(self: &'static Self, getter: fn(&TNewOwner) -> T, setter: Option<fn(&TNewOwner, T) -> ()>, metadata: Option<DirectPropertyMetadata<T>>) -> &'static DirectProperty<TNewOwner, T>
Registers the direct property on another class, with accessors for that class. The new property shares the identity of this one.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyErasedDestructorIntoEitherDerefTypedPropertyRegistrable
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.