Struct rx::Subject [] [src]

pub struct Subject<T, E> {
    // some fields omitted
}

Both an observer and observable.

A subject is a low-level primitive for creating observables.

TODO: Flesh out how this will work; if it is a memer, it likely should not expose the observer methods but only the observable methods. Have a proxy object?

Methods

impl<T, E> Subject<T, E>
[src]

fn new() -> Subject<T, E>

Creates a new subject.

Trait Implementations

impl<T: Clone, E: Clone> Observer<T, E> for Subject<T, E>
[src]

fn on_next(&mut self, item: T)

Provides the observer with new data.

fn on_completed(self)

Notifies the observer that the provider has finished sending notifications.

fn on_error(self, error: E)

Notifies the observer that the provider experienced an error condition.