pub struct ExhaustiveTestStore<S, M> {
pub state: S,
/* private fields */
}Expand description
Exhaustive test store — every effect-produced action must be explicitly consumed (UDF parity).
Fields§
§state: SImplementations§
Source§impl<S, M> ExhaustiveTestStore<S, M>
impl<S, M> ExhaustiveTestStore<S, M>
pub fn new(state: S, update: fn(&mut S, M) -> Cmd<M>) -> Self
pub fn with_exhaustivity(self, on: bool) -> Self
pub fn send(&mut self, action: M)
Sourcepub fn boot(&mut self, cmd: Cmd<M>)
pub fn boot(&mut self, cmd: Cmd<M>)
Run a command without dispatching an action (e.g. the Cmd from init).
pub fn send_with(&mut self, action: M, expect: impl FnOnce(&mut S))
pub fn receive(&mut self, expected: M)
pub fn finish(&self)
pub fn receive_timeout( &mut self, expected: M, timeout: Duration, ) -> Result<(), TestStoreError>
Auto Trait Implementations§
impl<S, M> !RefUnwindSafe for ExhaustiveTestStore<S, M>
impl<S, M> !UnwindSafe for ExhaustiveTestStore<S, M>
impl<S, M> Freeze for ExhaustiveTestStore<S, M>where
S: Freeze,
impl<S, M> Send for ExhaustiveTestStore<S, M>
impl<S, M> Sync for ExhaustiveTestStore<S, M>
impl<S, M> Unpin for ExhaustiveTestStore<S, M>
impl<S, M> UnsafeUnpin for ExhaustiveTestStore<S, M>where
S: UnsafeUnpin,
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