Skip to main content

MockObserver

Struct MockObserver 

Source
pub struct MockObserver<T> { /* private fields */ }
Expand description

An observer that records what it receives with the virtual time (MockObserver<T>, ITestableObserver<T>).

Implementations§

Source§

impl<T: Clone> MockObserver<T>

Source

pub fn messages(&self) -> Vec<Recorded<Notification<T>>>

What the observer received (Messages).

Trait Implementations§

Source§

impl<T> IObserver<T> for MockObserver<T>

Source§

fn on_next(&self, value: T)

Source§

fn on_error(&self, error: ObservableError)

Source§

fn on_completed(&self)

Auto Trait Implementations§

§

impl<T> !Freeze for MockObserver<T>

§

impl<T> !RefUnwindSafe for MockObserver<T>

§

impl<T> !Send for MockObserver<T>

§

impl<T> !Sync for MockObserver<T>

§

impl<T> !UnwindSafe for MockObserver<T>

§

impl<T> Unpin for MockObserver<T>

§

impl<T> UnsafeUnpin for MockObserver<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.