pub struct TurnError {
pub message: String,
pub outcome: TurnOutcome,
}Expand description
Typed terminal failure carried by SessionEvent::Error: the
human-readable message plus the spec §5.2 TurnOutcome.
Fields§
§message: String§outcome: TurnOutcomeImplementations§
Source§impl TurnError
impl TurnError
Sourcepub fn budget(dimension: BudgetDimension) -> TurnError
pub fn budget(dimension: BudgetDimension) -> TurnError
Typed budget exhaustion (spec §8.1): static message naming the dimension only — no counts, no content.
Sourcepub fn provider(
message: impl Into<String>,
code: impl Into<String>,
correlation_id: impl Into<String>,
) -> TurnError
pub fn provider( message: impl Into<String>, code: impl Into<String>, correlation_id: impl Into<String>, ) -> TurnError
Provider-category failure with an explicit correlation ID.
Sourcepub fn interrupted_after_side_effect(call_id: impl Into<String>) -> TurnError
pub fn interrupted_after_side_effect(call_id: impl Into<String>) -> TurnError
Interrupted after a possible-but-unconfirmed side effect (spec §8.3): cancellation or transport failure landed with a call that had started (side effect possible) but not recorded a result. Metadata only — the static message names the interrupted call, never its content. The operation is never automatically rerun.
Sourcepub fn category_label(&self) -> String
pub fn category_label(&self) -> String
Uniform terminal-category suffix shared by every frontend, e.g.
provider_failed code=auth_error correlation=turn-123-0. Metadata
only — never includes message content.
Trait Implementations§
impl Eq for TurnError
impl StructuralPartialEq for TurnError
Auto Trait Implementations§
impl Freeze for TurnError
impl RefUnwindSafe for TurnError
impl Send for TurnError
impl Sync for TurnError
impl Unpin for TurnError
impl UnsafeUnpin for TurnError
impl UnwindSafe for TurnError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
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> ⓘ
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> ⓘ
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> ThreadSafetyMarker for Twhere
T: Send,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more