Trait AbstractObserver

Source
pub trait AbstractObserver<T, Error = ()>: Send + Sync
where T: Send + Sync + 'static, Error: Send + Sync + 'static,
{ // Provided methods fn next(&self, value: T) { ... } fn error(&self, error: Error) { ... } fn complete(&self) { ... } fn start(&self, subscription: Arc<Subscription<T, Error>>) { ... } }
Expand description

An AbstractObserver is used to receive data from an Observable, and is supplied as an argument to subscribe in boxed form.

Provided Methods§

Source

fn next(&self, value: T)

Receives the next value in the sequence.

Source

fn error(&self, error: Error)

Receives the sequence error.

Source

fn complete(&self)

Receives a completion notification.

Source

fn start(&self, subscription: Arc<Subscription<T, Error>>)

Receives the subscription object when subscribe is called.

Implementors§

Source§

impl<T, Error> AbstractObserver<T, Error> for Observer<T, Error>
where T: Send + Sync + 'static, Error: Send + Sync + 'static,