pub struct MockSupervisor {
pub queued_exits: Vec<(Pid, i32)>,
pub log: Vec<String>,
/* private fields */
}Expand description
In-memory supervisor for tests. Records spawns + signals; reap_one
returns queued exits in FIFO order.
Fields§
§queued_exits: Vec<(Pid, i32)>Pre-queued (pid, exit_status) pairs the test wants reap_one to
return next.
log: Vec<String>Log of every action the scheduler took; lets tests assert on order.
Implementations§
Trait Implementations§
Source§impl Default for MockSupervisor
impl Default for MockSupervisor
Source§fn default() -> MockSupervisor
fn default() -> MockSupervisor
Returns the “default value” for a type. Read more
Source§impl Supervisor for MockSupervisor
impl Supervisor for MockSupervisor
Auto Trait Implementations§
impl Freeze for MockSupervisor
impl RefUnwindSafe for MockSupervisor
impl Send for MockSupervisor
impl Sync for MockSupervisor
impl Unpin for MockSupervisor
impl UnsafeUnpin for MockSupervisor
impl UnwindSafe for MockSupervisor
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