pub struct TestHarness<A: Actor> { /* private fields */ }Implementations§
Source§impl<A: Actor> TestHarness<A>
impl<A: Actor> TestHarness<A>
pub fn new(actor: A) -> Self
pub fn with_state(actor: A, state: A::State) -> Self
pub fn send(&mut self, msg: A::Message)
pub fn process_one(&mut self) -> Option<Directive>
pub fn process_all(&mut self) -> Vec<Directive>
pub fn process_until<F>(&mut self, condition: F) -> Vec<Directive>
pub fn idle(&mut self) -> Directive
pub fn post_stop(&mut self)
pub fn state(&self) -> &A::State
pub fn state_mut(&mut self) -> &mut A::State
pub fn is_empty(&self) -> bool
pub fn mailbox_len(&self) -> usize
pub fn cancel(&mut self)
pub fn is_cancelled(&self) -> bool
Auto Trait Implementations§
impl<A> Freeze for TestHarness<A>
impl<A> RefUnwindSafe for TestHarness<A>
impl<A> Send for TestHarness<A>
impl<A> Sync for TestHarness<A>
impl<A> Unpin for TestHarness<A>
impl<A> UnsafeUnpin for TestHarness<A>
impl<A> UnwindSafe for TestHarness<A>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more