Struct runtime::testutils::MockNotifier
source · [−]pub struct MockNotifier<'notifier> { /* private fields */ }Expand description
A mocked version of the Notifier, that will interact directly with a ThreadStatuses without the use of a thread
or the Runtime.
Implementations
sourceimpl<'notifier> MockNotifier<'notifier>
impl<'notifier> MockNotifier<'notifier>
sourcepub const fn new(threadable_statuses: &'notifier ThreadStatuses) -> Self
pub const fn new(threadable_statuses: &'notifier ThreadStatuses) -> Self
Create a new instance of a MockNotifier.
sourcepub fn register_thread(&mut self, thread_name: &str, status: Status)
pub fn register_thread(&mut self, thread_name: &str, status: Status)
Register a thread by name and status. This does not create a thread.
Trait Implementations
Auto Trait Implementations
impl<'notifier> !RefUnwindSafe for MockNotifier<'notifier>
impl<'notifier> Send for MockNotifier<'notifier>
impl<'notifier> Sync for MockNotifier<'notifier>
impl<'notifier> Unpin for MockNotifier<'notifier>
impl<'notifier> !UnwindSafe for MockNotifier<'notifier>
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