FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    AnonymousObserver

    struct · ferroui-base · v0.5.0

    struct AnonymousObserver<T>
    

    An observer built from closures.

    An observer without a closure for errors rethrows an error it is given (it panics with the message of the error); one without a closure for completion ignores it.

    View source

    Members

    new

    fn new(on_next: impl Fn(T) -> () + 'static) -> Self
    

    Source

    new_with_error

    fn new_with_error(on_next: impl Fn(T) -> () + 'static, on_error: impl Fn(ObservableError) -> () + 'static) -> Self
    

    Source

    new_with_completed

    fn new_with_completed(on_next: impl Fn(T) -> () + 'static, on_completed: impl Fn() -> () + 'static) -> Self
    

    Source

    new_with_error_and_completed

    fn new_with_error_and_completed(on_next: impl Fn(T) -> () + 'static, on_error: impl Fn(ObservableError) -> () + 'static, on_completed: impl Fn() -> () + 'static) -> Self
    

    Source

    with_error

    fn with_error(self: Self, on_error: impl Fn(ObservableError) -> () + 'static) -> Self
    

    Source

    with_completed

    fn with_completed(self: Self, on_completed: impl Fn() -> () + 'static) -> Self
    

    Source

    Trait implementations

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

    Availability

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