pub struct ToolLifecycle<S> { /* private fields */ }Implementations§
Source§impl ToolLifecycle<Enabled>
impl ToolLifecycle<Enabled>
pub fn new(ctx: ToolLifecycleContext) -> Self
pub fn disable(self) -> Result<ToolLifecycle<Disabled>, (Self, GuardError)>
pub fn mark_defective( self, ) -> Result<ToolLifecycle<Defective>, (Self, GuardError)>
Source§impl ToolLifecycle<Disabled>
impl ToolLifecycle<Disabled>
pub fn enable(self) -> Result<ToolLifecycle<Enabled>, (Self, GuardError)>
pub fn mark_defective( self, ) -> Result<ToolLifecycle<Defective>, (Self, GuardError)>
Source§impl ToolLifecycle<Defective>
impl ToolLifecycle<Defective>
pub fn enable(self) -> Result<ToolLifecycle<Enabled>, (Self, GuardError)>
pub fn disable(self) -> Result<ToolLifecycle<Disabled>, (Self, GuardError)>
pub fn recover(self) -> Result<ToolLifecycle<Enabled>, (Self, GuardError)>
Source§impl ToolLifecycle<Enabled>
impl ToolLifecycle<Enabled>
Sourcepub fn into_dynamic(self) -> DynamicToolLifecycle
pub fn into_dynamic(self) -> DynamicToolLifecycle
Convert this typestate machine into a dynamic wrapper.
This allows runtime event dispatch at the cost of losing compile-time guarantees about state transitions.
Source§impl ToolLifecycle<Disabled>
impl ToolLifecycle<Disabled>
Sourcepub fn into_dynamic(self) -> DynamicToolLifecycle
pub fn into_dynamic(self) -> DynamicToolLifecycle
Convert this typestate machine into a dynamic wrapper.
This allows runtime event dispatch at the cost of losing compile-time guarantees about state transitions.
Source§impl ToolLifecycle<Defective>
impl ToolLifecycle<Defective>
Sourcepub fn into_dynamic(self) -> DynamicToolLifecycle
pub fn into_dynamic(self) -> DynamicToolLifecycle
Convert this typestate machine into a dynamic wrapper.
This allows runtime event dispatch at the cost of losing compile-time guarantees about state transitions.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for ToolLifecycle<S>
impl<S> RefUnwindSafe for ToolLifecycle<S>where
S: RefUnwindSafe,
impl<S> Send for ToolLifecycle<S>where
S: Send,
impl<S> Sync for ToolLifecycle<S>where
S: Sync,
impl<S> Unpin for ToolLifecycle<S>where
S: Unpin,
impl<S> UnwindSafe for ToolLifecycle<S>where
S: UnwindSafe,
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