StyledPropertyOptions
struct · ferroui-base · v0.5.0
struct StyledPropertyOptions<T>
Options for registering a styled or attached property.
Members
new
fn new(default_value: T) -> Self
inherits
fn inherits(self: Self, inherits: bool) -> Self
Whether the property inherits its value from the parent object.
default_binding_mode
fn default_binding_mode(self: Self, mode: BindingMode) -> Self
The default binding mode for the property.
validate
fn validate(self: Self, validate: impl Fn(&T) -> bool + 'static) -> Self
A value validation callback. Setting a value for which it returns false is rejected.
coerce
fn coerce(self: Self, coerce: impl Fn(&FerroObject, T) -> T + 'static) -> Self
A value coercion callback.
enable_data_validation
fn enable_data_validation(self: Self, enable: bool) -> Self
Whether the property is interested in data validation.
assign_binding
fn assign_binding(self: Self, assign_binding: bool) -> Self
Whether a binding given for the property in markup is assigned to the
property instead of bound to it; see FerroProperty::assign_binding.
notifying
fn notifying(self: Self, notifying: impl Fn(&FerroObject, bool) -> () + 'static) -> Self
A callback invoked before and after change notifications are raised.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.