FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FerroObjectExtensions

    trait · ferroui-base · v0.5.0

    trait FerroObjectExtensions
    

    Extension members for FerroObject.

    View source

    Members

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.