Observer
struct · ferroui-reactive · v0.5.0
struct Observer
The factory of observers (Observer).
Members
create
fn create<T: 'static>(on_next: impl Fn(T) -> () + 'static) -> Rc<dyn IObserver<T>>
An observer of values; an error panics (Create(Action<T>)).
create_with_error
fn create_with_error<T: 'static>(on_next: impl Fn(T) -> () + 'static, on_error: impl Fn(ObservableError) -> () + 'static) -> Rc<dyn IObserver<T>>
An observer of values and errors (Create(Action<T>, Action<Exception>)).
create_with_completed
fn create_with_completed<T: 'static>(on_next: impl Fn(T) -> () + 'static, on_completed: impl Fn() -> () + 'static) -> Rc<dyn IObserver<T>>
An observer of values and the end; an error panics (Create(Action<T>, Action)).
create_all
fn create_all<T: 'static>(on_next: impl Fn(T) -> () + 'static, on_error: impl Fn(ObservableError) -> () + 'static, on_completed: impl Fn() -> () + 'static) -> Rc<dyn IObserver<T>>
An observer of all three notifications (Create(Action<T>, Action<Exception>, Action)).
to_observer
fn to_observer<T: 'static>(handler: impl Fn(Notification<T>) -> () + 'static) -> Rc<dyn IObserver<T>>
An observer that hands each notification, as a value, to handler (ToObserver(Action<Notification<T>>)).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<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.