pub struct FaultContext {
pub component_id: Uuid,
pub fault: Fault,
}Expand description
Information about the fault that occurred
Fields§
§component_id: UuidThe id of the component that faulted
fault: FaultThe concrete fault.
Implementations§
Source§impl FaultContext
impl FaultContext
Sourcepub fn recover_with<F>(self, f: F) -> RecoveryHandler
pub fn recover_with<F>(self, f: F) -> RecoveryHandler
Produce a Recoverhandler with f describing
the actions to take in order to recover from this fault
The action described by this object will be executed on the Supervisor. This means you cannot block on the result of any notify futures, without deadlocking your system!
If you need to perform a complicated setup sequence, consider starting a temporary component to drive the futures involved, instead of handling everything in the recovery handler.
Sourcepub fn ignore(self) -> RecoveryHandler
pub fn ignore(self) -> RecoveryHandler
Simply ignore the fault and don’t recover at all
Sourcepub fn restart_default<C>(self) -> RecoveryHandlerwhere
C: ComponentDefinition + Default,
pub fn restart_default<C>(self) -> RecoveryHandlerwhere
C: ComponentDefinition + Default,
Create and start the Default instance of C
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FaultContext
impl !RefUnwindSafe for FaultContext
impl Send for FaultContext
impl !Sync for FaultContext
impl Unpin for FaultContext
impl UnsafeUnpin for FaultContext
impl !UnwindSafe for FaultContext
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