pub struct CancellationContext { /* private fields */ }Expand description
Original cancellation metadata restored from canonical request history.
Fields and nested metadata have read-only accessors. Descendants retain the original root identity, request time and cleanup budget.
Implementations§
Source§impl CancellationContext
impl CancellationContext
Sourcepub fn from_value(value: &Value) -> Result<Self>
pub fn from_value(value: &Value) -> Result<Self>
Read legacy v1 and candidate scoped v2 without granting a new cleanup budget.
pub fn request_id(&self) -> &str
pub fn root_request_id(&self) -> &str
pub fn root_workflow_instance_id(&self) -> &str
pub fn root_workflow_run_id(&self) -> &str
pub fn parent_request_id(&self) -> Option<&str>
pub fn reason(&self) -> Option<&str>
pub fn requester(&self) -> &BTreeMap<String, String>
pub fn source(&self) -> &str
pub fn requested_at(&self) -> DateTime<Utc>
pub fn deadline(&self) -> DateTime<Utc>
pub fn scope_origin(&self) -> Option<&ScopedCancellationContext>
Sourcepub fn remaining(&self) -> Result<Duration>
pub fn remaining(&self) -> Result<Duration>
Remaining cleanup budget at the last blocking result consumed by this replay.
Never reads host time. Detached metadata, an ended replay, and a missing or invalid committed timestamp return an explicit error. Expiry returns zero.
pub fn lineage(&self) -> &[CancellationLineage]
Trait Implementations§
Source§impl Clone for CancellationContext
impl Clone for CancellationContext
Source§fn clone(&self) -> CancellationContext
fn clone(&self) -> CancellationContext
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CancellationContext
impl Debug for CancellationContext
Source§impl PartialEq for CancellationContext
impl PartialEq for CancellationContext
impl Eq for CancellationContext
Auto Trait Implementations§
impl Freeze for CancellationContext
impl RefUnwindSafe for CancellationContext
impl Send for CancellationContext
impl Sync for CancellationContext
impl Unpin for CancellationContext
impl UnwindSafe for CancellationContext
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