pub enum CancelOutcome {
Stopped,
StillCancelling {
detail: String,
},
NoSession,
}Expand description
What a session.cancel achieved (#8207).
Why: “the run stopped” and “the run has not stopped yet” are both successful
answers to the question the cancel asked, and the TUI has to render them
differently — one ends the turn, the other keeps a cancelling state on screen.
Collapsing the second into an error is what made -32010 unreadable.
Test: engine_tests::cancel_unconfirmed_is_a_still_cancelling_outcome.
Variants§
Stopped
The daemon confirmed the run has terminated.
StillCancelling
The cancel was accepted; the run had not stopped within the daemon’s
grace. detail is the daemon’s own sentence, safe to show verbatim.
NoSession
setup has not minted a session yet, so there was nothing to cancel.
Trait Implementations§
Source§impl Debug for CancelOutcome
impl Debug for CancelOutcome
impl Eq for CancelOutcome
Source§impl PartialEq for CancelOutcome
impl PartialEq for CancelOutcome
impl StructuralPartialEq for CancelOutcome
Auto Trait Implementations§
impl Freeze for CancelOutcome
impl RefUnwindSafe for CancelOutcome
impl Send for CancelOutcome
impl Sync for CancelOutcome
impl Unpin for CancelOutcome
impl UnsafeUnpin for CancelOutcome
impl UnwindSafe for CancelOutcome
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.