pub enum Expected<T> {
Exact(Notification<T>),
OnNextWhere(Rc<dyn Fn(&T) -> bool>),
OnErrorWhere(Rc<dyn Fn(&ObservableError) -> bool>),
}Expand description
A notification a test expects: one notification, or a notification that satisfies a predicate
(the predicate forms of ReactiveTest.OnNext and OnError).
Variants§
Exact(Notification<T>)
The notification itself.
OnNextWhere(Rc<dyn Fn(&T) -> bool>)
A value for which the predicate is true (OnNext<T>(long, Func<T, bool>)).
OnErrorWhere(Rc<dyn Fn(&ObservableError) -> bool>)
An error for which the predicate is true (OnError<T>(long, Func<Exception, bool>)).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Expected<T>
impl<T> !Send for Expected<T>
impl<T> !Sync for Expected<T>
impl<T> !UnwindSafe for Expected<T>
impl<T> Freeze for Expected<T>
impl<T> Unpin for Expected<T>
impl<T> UnsafeUnpin for Expected<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more