Skip to main content

ReactiveTest

Struct ReactiveTest 

Source
pub struct ReactiveTest;
Expand description

The factories of recorded notifications and subscriptions, and the default times of TestScheduler::start (ReactiveTest).

Implementations§

Source§

impl ReactiveTest

Source

pub const CREATED: i64 = 100

The default time the sequence is created at (Created).

Source

pub const SUBSCRIBED: i64 = 200

The default time the observer subscribes at (Subscribed).

Source

pub const DISPOSED: i64 = 1000

The default time the subscription is disposed at (Disposed).

Source

pub fn on_next<T>(ticks: i64, value: T) -> Recorded<Notification<T>>

A value at ticks (OnNext<T>(long, T)).

Source

pub fn on_next_where<T>( ticks: i64, predicate: impl Fn(&T) -> bool + 'static, ) -> Recorded<Expected<T>>

A value at ticks for which predicate is true (OnNext<T>(long, Func<T, bool>)).

Source

pub fn on_completed<T>(ticks: i64) -> Recorded<Notification<T>>

The end of the sequence at ticks (OnCompleted<T>(long)).

Source

pub fn on_error<T>( ticks: i64, error: ObservableError, ) -> Recorded<Notification<T>>

An error at ticks (OnError<T>(long, Exception)).

Source

pub fn on_error_where<T>( ticks: i64, predicate: impl Fn(&ObservableError) -> bool + 'static, ) -> Recorded<Expected<T>>

An error at ticks for which predicate is true (OnError<T>(long, Func<Exception, bool>)).

Source

pub fn subscribe(start: i64, end: i64) -> Subscription

A subscription from start to end (Subscribe(long, long)).

Source

pub fn subscribe_from(start: i64) -> Subscription

A subscription from start that has not been disposed (Subscribe(long)).

Auto Trait Implementations§

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.