Observer

Trait Observer 

Source
pub trait Observer<T, E> {
    // Required methods
    fn on_next(&mut self, item: T);
    fn on_completed(self);
    fn on_error(self, error: E);
}
Expand description

An observer that receives values from an observable.

Required Methods§

Source

fn on_next(&mut self, item: T)

Provides the observer with new data.

Source

fn on_completed(self)

Notifies the observer that the provider has finished sending notifications.

Source

fn on_error(self, error: E)

Notifies the observer that the provider experienced an error condition.

Implementors§

Source§

impl<T: Clone, E: Clone> Observer<T, E> for Subject<T, E>