FerroObjectExtensions
trait · ferroui-base · v0.5.0
trait FerroObjectExtensions
Extension members for FerroObject.
Members
get_observableget_observable_withget_observable_untypedget_observable_untyped_withget_binding_observableget_binding_observable_withget_binding_observable_untypedget_binding_observable_untyped_withget_property_changed_observablebind_typedbind_typed_valueget_typed_valueget_typed_base_valueget_base_value_untyped
get_observable
fn get_observable<P: TypedProperty>(self: &Self, property: &'static P) -> Rc<dyn IObservable<<P as >::Value>>
Gets an observable for a property.
The observable fires with the current value of the property on the object immediately upon subscription, and then every time the value changes. It holds a weak reference to the object.
get_observable_with
fn get_observable_with<P: TypedProperty, TResult: PropertyValue>(self: &Self, property: &'static P, converter: impl Fn(<P as >::Value) -> TResult + 'static) -> Rc<dyn IObservable<TResult>>
Gets an observable for a property, projecting each value with
converter.
get_observable_untyped
fn get_observable_untyped(self: &Self, property: &'static FerroProperty) -> Rc<dyn IObservable<BoxedValue>>
Gets an observable of untyped values for a property.
get_observable_untyped_with
fn get_observable_untyped_with<TResult: PropertyValue>(self: &Self, property: &'static FerroProperty, converter: impl Fn(BoxedValue) -> TResult + 'static) -> Rc<dyn IObservable<TResult>>
Gets an observable of untyped values for a property, projecting each
value with converter.
get_binding_observable
fn get_binding_observable<P: TypedProperty>(self: &Self, property: &'static P) -> Rc<dyn IObservable<BindingValue<<P as >::Value>>>
Gets an observable of binding values for a property.
get_binding_observable_with
fn get_binding_observable_with<P: TypedProperty, TResult: PropertyValue>(self: &Self, property: &'static P, converter: impl Fn(<P as >::Value) -> TResult + 'static) -> Rc<dyn IObservable<BindingValue<TResult>>>
Gets an observable of binding values for a property, projecting each
value with converter.
get_binding_observable_untyped
fn get_binding_observable_untyped(self: &Self, property: &'static FerroProperty) -> Rc<dyn IObservable<BindingValue<BoxedValue>>>
Gets an observable of untyped binding values for a property.
get_binding_observable_untyped_with
fn get_binding_observable_untyped_with<TResult: PropertyValue>(self: &Self, property: &'static FerroProperty, converter: impl Fn(BoxedValue) -> TResult + 'static) -> Rc<dyn IObservable<BindingValue<TResult>>>
Gets an observable of untyped binding values for a property,
projecting each value with converter.
get_property_changed_observable
fn get_property_changed_observable(self: &Self, property: &'static FerroProperty) -> ObjectPropertyChangedObservable
Gets an observable that listens for property changed events of a property on this object. It fires each time the property changes and does not fire with the current value on subscription.
bind_typed
fn bind_typed<P: TypedProperty>(self: &Self, property: &'static P, source: Rc<dyn IObservable<<P as >::Value>>, priority: BindingPriority) -> Rc<dyn IDisposable>
Binds a typed property of any kind to an observable. The priority is ignored for direct properties.
bind_typed_value
fn bind_typed_value<P: TypedProperty>(self: &Self, property: &'static P, source: Rc<dyn IObservable<BindingValue<<P as >::Value>>>, priority: BindingPriority) -> Rc<dyn IDisposable>
Binds a typed property of any kind to an observable of binding values. The priority is ignored for direct properties.
get_typed_value
fn get_typed_value<P: TypedProperty>(self: &Self, property: &'static P) -> <P as >::Value
Gets the value of a typed property of any kind.
get_typed_base_value
fn get_typed_base_value<P: TypedProperty>(self: &Self, property: &'static P) -> Option<<P as >::Value>
Gets the base value of a typed property of any kind: the value excluding animated values. For direct properties this is the value.
get_base_value_untyped
fn get_base_value_untyped(self: &Self, property: &'static FerroProperty) -> BoxedValue
Gets the base value of a property as an untyped value; the unset marker when there is none.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.