Skip to main content

FerroObjectExtensions

Trait FerroObjectExtensions 

Source
pub trait FerroObjectExtensions {
Show 14 methods // Required methods fn get_observable<P: TypedProperty>( &self, property: &'static P, ) -> Rc<dyn IObservable<P::Value>>; fn get_observable_with<P: TypedProperty, TResult: PropertyValue>( &self, property: &'static P, converter: impl Fn(P::Value) -> TResult + 'static, ) -> Rc<dyn IObservable<TResult>>; fn get_observable_untyped( &self, property: &'static FerroProperty, ) -> Rc<dyn IObservable<BoxedValue>>; fn get_observable_untyped_with<TResult: PropertyValue>( &self, property: &'static FerroProperty, converter: impl Fn(BoxedValue) -> TResult + 'static, ) -> Rc<dyn IObservable<TResult>>; fn get_binding_observable<P: TypedProperty>( &self, property: &'static P, ) -> Rc<dyn IObservable<BindingValue<P::Value>>>; fn get_binding_observable_with<P: TypedProperty, TResult: PropertyValue>( &self, property: &'static P, converter: impl Fn(P::Value) -> TResult + 'static, ) -> Rc<dyn IObservable<BindingValue<TResult>>>; fn get_binding_observable_untyped( &self, property: &'static FerroProperty, ) -> Rc<dyn IObservable<BindingValue<BoxedValue>>>; fn get_binding_observable_untyped_with<TResult: PropertyValue>( &self, property: &'static FerroProperty, converter: impl Fn(BoxedValue) -> TResult + 'static, ) -> Rc<dyn IObservable<BindingValue<TResult>>>; fn get_property_changed_observable( &self, property: &'static FerroProperty, ) -> ObjectPropertyChangedObservable; fn bind_typed<P: TypedProperty>( &self, property: &'static P, source: Rc<dyn IObservable<P::Value>>, priority: BindingPriority, ) -> Rc<dyn IDisposable>; fn bind_typed_value<P: TypedProperty>( &self, property: &'static P, source: Rc<dyn IObservable<BindingValue<P::Value>>>, priority: BindingPriority, ) -> Rc<dyn IDisposable>; fn get_typed_value<P: TypedProperty>( &self, property: &'static P, ) -> P::Value; fn get_typed_base_value<P: TypedProperty>( &self, property: &'static P, ) -> Option<P::Value>; fn get_base_value_untyped( &self, property: &'static FerroProperty, ) -> BoxedValue;
}
Expand description

Extension members for FerroObject.

Required Methods§

Source

fn get_observable<P: TypedProperty>( &self, property: &'static P, ) -> Rc<dyn IObservable<P::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.

Source

fn get_observable_with<P: TypedProperty, TResult: PropertyValue>( &self, property: &'static P, converter: impl Fn(P::Value) -> TResult + 'static, ) -> Rc<dyn IObservable<TResult>>

Gets an observable for a property, projecting each value with converter.

Source

fn get_observable_untyped( &self, property: &'static FerroProperty, ) -> Rc<dyn IObservable<BoxedValue>>

Gets an observable of untyped values for a property.

Source

fn get_observable_untyped_with<TResult: PropertyValue>( &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.

Source

fn get_binding_observable<P: TypedProperty>( &self, property: &'static P, ) -> Rc<dyn IObservable<BindingValue<P::Value>>>

Gets an observable of binding values for a property.

Source

fn get_binding_observable_with<P: TypedProperty, TResult: PropertyValue>( &self, property: &'static P, converter: impl Fn(P::Value) -> TResult + 'static, ) -> Rc<dyn IObservable<BindingValue<TResult>>>

Gets an observable of binding values for a property, projecting each value with converter.

Source

fn get_binding_observable_untyped( &self, property: &'static FerroProperty, ) -> Rc<dyn IObservable<BindingValue<BoxedValue>>>

Gets an observable of untyped binding values for a property.

Source

fn get_binding_observable_untyped_with<TResult: PropertyValue>( &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.

Source

fn get_property_changed_observable( &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.

Source

fn bind_typed<P: TypedProperty>( &self, property: &'static P, source: Rc<dyn IObservable<P::Value>>, priority: BindingPriority, ) -> Rc<dyn IDisposable>

Binds a typed property of any kind to an observable. The priority is ignored for direct properties.

Source

fn bind_typed_value<P: TypedProperty>( &self, property: &'static P, source: Rc<dyn IObservable<BindingValue<P::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.

Source

fn get_typed_value<P: TypedProperty>(&self, property: &'static P) -> P::Value

Gets the value of a typed property of any kind.

Source

fn get_typed_base_value<P: TypedProperty>( &self, property: &'static P, ) -> Option<P::Value>

Gets the base value of a typed property of any kind: the value excluding animated values. For direct properties this is the value.

Source

fn get_base_value_untyped(&self, property: &'static FerroProperty) -> BoxedValue

Gets the base value of a property as an untyped value; the unset marker when there is none.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§