Struct runtime::testutils::ThreadableTester
source · [−]pub struct ThreadableTester { /* private fields */ }Expand description
A tester utility for Threadable.
Implementations
sourceimpl ThreadableTester
impl ThreadableTester
sourcepub fn take_statuses(&self) -> Vec<Status>
pub fn take_statuses(&self) -> Vec<Status>
Take the current Status changes.
sourcepub fn start_threadable<Threadable: Threadable>(
&self,
theadable: &Threadable,
thread_name: &str
)
pub fn start_threadable<Threadable: Threadable>(
&self,
theadable: &Threadable,
thread_name: &str
)
Start a Threadable running the thread specified by the name, to completion in a separate thread.
sourcepub fn wait_for_status(&self, status: &Status)
pub fn wait_for_status(&self, status: &Status)
Wait for a particular status to be reached.
Panics
Will panic if the wait takes too long and times out.
sourcepub fn wait_for_finished(&self)
pub fn wait_for_finished(&self)
Wait for the thread started in start_threadable to finish.
Panics
Will panic if the wait takes too long and times out.
Trait Implementations
sourceimpl Clone for ThreadableTester
impl Clone for ThreadableTester
sourcefn clone(&self) -> ThreadableTester
fn clone(&self) -> ThreadableTester
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ThreadableTester
impl Send for ThreadableTester
impl Sync for ThreadableTester
impl Unpin for ThreadableTester
impl !UnwindSafe for ThreadableTester
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more