pub struct LifecycleSpan { /* private fields */ }Expand description
Observes existing work without changing its result, cancellation or authority. There is deliberately no Drop completion: a lost process cannot claim an outcome.
Implementations§
Source§impl LifecycleSpan
impl LifecycleSpan
pub fn start(phase: Phase, provenance: Option<ConfigurationProvenance>) -> Self
Sourcepub fn start_operation(
phase: Phase,
provenance: Option<ConfigurationProvenance>,
operation_id: Option<Uuid>,
) -> Self
pub fn start_operation( phase: Phase, provenance: Option<ConfigurationProvenance>, operation_id: Option<Uuid>, ) -> Self
Recovery joins only the existing Operation, never an invented request ID.
pub fn run<T, E>( phase: Phase, provenance: Option<ConfigurationProvenance>, category: FailureCategory, work: impl FnOnce() -> Result<T, E>, ) -> Result<T, E>
pub fn complete<T, E>(self, result: &Result<T, E>, category: FailureCategory)
pub fn finish(self, outcome: Outcome, category: Option<FailureCategory>)
Auto Trait Implementations§
impl Freeze for LifecycleSpan
impl RefUnwindSafe for LifecycleSpan
impl Send for LifecycleSpan
impl Sync for LifecycleSpan
impl Unpin for LifecycleSpan
impl UnsafeUnpin for LifecycleSpan
impl UnwindSafe for LifecycleSpan
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