pub struct MockEngine { /* private fields */ }Expand description
A running mock. Holds the listening address and a shutdown
handle; automatically aborts on drop as a safety net, but prefer
explicit .shutdown() so the port is reclaimable immediately.
Implementations§
Source§impl MockEngine
impl MockEngine
Source§impl MockEngine
impl MockEngine
Sourcepub fn received_operator_events(&self) -> Vec<Value>
pub fn received_operator_events(&self) -> Vec<Value>
Snapshot of every POST /operator/events body the mock has
received, in arrival order. Returned by clone so a later POST
cannot mutate a value the test is inspecting.
Sourcepub fn received_executes(&self) -> Vec<CapturedPost>
pub fn received_executes(&self) -> Vec<CapturedPost>
Snapshot of every POST /execute (headers + body) the mock
has received, in arrival order. Tests inspect the captured
x-zero-mode and x-idempotency-key headers here.
Sourcepub fn received_auto_toggles(&self) -> Vec<CapturedPost>
pub fn received_auto_toggles(&self) -> Vec<CapturedPost>
Snapshot of every POST /auto/toggle (headers + body) the
mock has received, in arrival order. Sister to
Self::received_executes.
Sourcepub fn received_live_controls(&self) -> Vec<String>
pub fn received_live_controls(&self) -> Vec<String>
Snapshot of every live control endpoint path the mock has received.
Trait Implementations§
Source§impl Debug for MockEngine
impl Debug for MockEngine
Auto Trait Implementations§
impl Freeze for MockEngine
impl !RefUnwindSafe for MockEngine
impl Send for MockEngine
impl Sync for MockEngine
impl Unpin for MockEngine
impl UnsafeUnpin for MockEngine
impl !UnwindSafe for MockEngine
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