FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ReactiveNotificationHelpers

    struct · ferroui-reactiveui · v0.5.0

    struct ReactiveNotificationHelpers
    

    The notification state that the implementations of a reactive object share (ReactiveNotificationHelpers): adding the handlers of the events, and the observables created once and cached by the object. ReactiveObject uses them, and so can an object that implements IReactiveObject by hand.

    View source

    Members

    add_property_changing

    fn add_property_changing<T: IReactiveObject + ?Sized>(source: &T, subscribed: &Cell<bool>, handlers: &Event<str>, handler: Rc<dyn Fn(&str) -> ()>) -> u64
    

    Adds a handler to the PropertyChanging event handlers of source, making its changes raise the event the first time (AddPropertyChanging); returns the token that removes the handler.

    Source

    add_property_changed

    fn add_property_changed<T: IReactiveObject + ?Sized>(source: &T, subscribed: &Cell<bool>, handlers: &Event<str>, handler: Rc<dyn Fn(&str) -> ()>) -> u64
    

    Adds a handler to the PropertyChanged event handlers of source, making its changes raise the event the first time (AddPropertyChanged); returns the token that removes the handler.

    Source

    get_changing

    fn get_changing<T: IReactiveObject>(source: &Rc<T>, observable: &RefCell<Option<ChangeObservable<T>>>) -> ChangeObservable<T>
    

    The Changing observable of source, created at the first call and kept in observable (GetChanging).

    Source

    get_changed

    fn get_changed<T: IReactiveObject>(source: &Rc<T>, observable: &RefCell<Option<ChangeObservable<T>>>) -> ChangeObservable<T>
    

    The Changed observable of source, created at the first call and kept in observable (GetChanged).

    Source

    get_thrown_exceptions

    fn get_thrown_exceptions<T: IReactiveObject + ?Sized>(source: &T, observable: &RefCell<Option<Rc<dyn IObservable<ObservableError>>>>) -> Rc<dyn IObservable<ObservableError>>
    

    The ThrownExceptions observable of source, created at the first call and kept in observable (GetThrownExceptions).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any

    Availability

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