pub struct TestDoubleManager { /* private fields */ }Expand description
Deterministic in-memory manager for contract tests.
Implementations§
Source§impl TestDoubleManager
impl TestDoubleManager
Sourcepub fn put(&mut self, spec: ServiceSpec, state: LifecycleState)
pub fn put(&mut self, spec: ServiceSpec, state: LifecycleState)
Injects a registration with exact spec + state.
Sourcepub fn put_malformed(&mut self, id: ServiceId)
pub fn put_malformed(&mut self, id: ServiceId)
Injects a malformed registration record under an id.
Trait Implementations§
Source§impl Debug for TestDoubleManager
impl Debug for TestDoubleManager
Source§impl Default for TestDoubleManager
impl Default for TestDoubleManager
Source§impl ServiceManager for TestDoubleManager
impl ServiceManager for TestDoubleManager
Source§fn inspect(&self, spec: &ServiceSpec) -> Result<LifecycleSnapshot, ServiceError>
fn inspect(&self, spec: &ServiceSpec) -> Result<LifecycleSnapshot, ServiceError>
Inspects registration and lifecycle state without mutating anything. Read more
Source§fn install(
&mut self,
spec: &ServiceSpec,
) -> Result<TransitionResult, ServiceError>
fn install( &mut self, spec: &ServiceSpec, ) -> Result<TransitionResult, ServiceError>
Source§fn start(
&mut self,
spec: &ServiceSpec,
_timeout: Duration,
) -> Result<TransitionResult, ServiceError>
fn start( &mut self, spec: &ServiceSpec, _timeout: Duration, ) -> Result<TransitionResult, ServiceError>
Source§fn stop(
&mut self,
spec: &ServiceSpec,
_timeout: Duration,
) -> Result<TransitionResult, ServiceError>
fn stop( &mut self, spec: &ServiceSpec, _timeout: Duration, ) -> Result<TransitionResult, ServiceError>
Source§fn restart(
&mut self,
spec: &ServiceSpec,
timeout: Duration,
) -> Result<TransitionResult, ServiceError>
fn restart( &mut self, spec: &ServiceSpec, timeout: Duration, ) -> Result<TransitionResult, ServiceError>
Source§fn uninstall(
&mut self,
spec: &ServiceSpec,
) -> Result<TransitionResult, ServiceError>
fn uninstall( &mut self, spec: &ServiceSpec, ) -> Result<TransitionResult, ServiceError>
Removes an
Owned registration. Read moreAuto Trait Implementations§
impl Freeze for TestDoubleManager
impl RefUnwindSafe for TestDoubleManager
impl Send for TestDoubleManager
impl Sync for TestDoubleManager
impl Unpin for TestDoubleManager
impl UnsafeUnpin for TestDoubleManager
impl UnwindSafe for TestDoubleManager
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