Observer

Trait Observer 

Source
pub trait Observer<T, E> {
    // Required methods
    fn on_next(&mut self, value: T);
    fn on_termination(self, termination: Termination<E>);
}
Expand description

A trait for observing the progress and termination state of an operation.

Required Methods§

Source

fn on_next(&mut self, value: T)

Called when the next value in the operation is available.

Source

fn on_termination(self, termination: Termination<E>)

Called when the operation has reached its termination state.

Implementors§

Source§

impl<T, E> Observer<T, E> for AsyncSubject<'_, T, E>

Source§

impl<T, E> Observer<T, E> for BehaviorSubject<'_, T, E>

Source§

impl<T, E> Observer<T, E> for PublishSubject<'_, T, E>
where T: Clone, E: Clone,

Source§

impl<T, E> Observer<T, E> for ReplaySubject<'_, T, E>

Source§

impl<T, E> Observer<T, E> for BoxedObserver<'_, T, E>

Source§

impl<T, E> Observer<T, E> for CallbackObserver<'_, T, E>

Source§

impl<T, E, OR> Observer<T, E> for UnsubAfterTerminationObserver<'_, OR>
where OR: Observer<T, E>,