pub struct CancellationTestResult {
pub completed: bool,
pub cancelled_at_checkpoint: bool,
pub response: Option<Response>,
pub cancellation_point: Option<String>,
}Expand description
Result of a cancellation test.
Contains information about how the handler responded to cancellation.
Fields§
§completed: boolWhether the handler completed before cancellation.
cancelled_at_checkpoint: boolWhether the handler detected cancellation via checkpoint.
response: Option<Response>Response returned (if handler completed).
cancellation_point: Option<String>The await point at which cancellation was detected.
Implementations§
Source§impl CancellationTestResult
impl CancellationTestResult
Sourcepub fn gracefully_cancelled(&self) -> bool
pub fn gracefully_cancelled(&self) -> bool
Returns true if cancellation was handled gracefully.
Sourcepub fn completed_despite_cancel(&self) -> bool
pub fn completed_despite_cancel(&self) -> bool
Returns true if the handler completed despite cancellation request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CancellationTestResult
impl !RefUnwindSafe for CancellationTestResult
impl Send for CancellationTestResult
impl !Sync for CancellationTestResult
impl Unpin for CancellationTestResult
impl !UnwindSafe for CancellationTestResult
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).