pub enum AttributionClass {
Input,
Resource,
Environment,
Internal,
}Expand description
Whose problem a failure is. Declared at the error’s DEFINITION site, carried structurally through every hop.
Variants§
Input
Deterministic on the INPUT (context overflow, invalid request, unsupported format). The user’s to fix; retrying can never succeed — tasks failing with this class are marked permanently failed.
Resource
A compute resource was exhausted (GPU VRAM, host memory). Often transient (another process holding memory) — retryable.
Environment
The environment failed (network, registry, model download/integrity, cartridge process death). Transient by nature — retryable.
Internal
Everything else: a defect in the engine or a cartridge. Ours, said plainly. Retryable (races un-race), but never blamed on the user.
Implementations§
Source§impl AttributionClass
impl AttributionClass
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
The wire token — used in the ERR frame meta, the machine_runs columns, the gRPC proto, and the loom. One vocabulary everywhere.
Sourcepub fn from_wire(token: &str) -> Option<AttributionClass>
pub fn from_wire(token: &str) -> Option<AttributionClass>
Parse a wire token. Callers must reject None as a protocol error.
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Whether retrying can NEVER succeed: the failure is a deterministic function of the input. Resource/environment/internal stay retryable (memory frees up, networks recover, races un-race).
Trait Implementations§
Source§impl Clone for AttributionClass
impl Clone for AttributionClass
Source§fn clone(&self) -> AttributionClass
fn clone(&self) -> AttributionClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AttributionClass
Source§impl Debug for AttributionClass
impl Debug for AttributionClass
Source§impl<'de> Deserialize<'de> for AttributionClass
impl<'de> Deserialize<'de> for AttributionClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for AttributionClass
impl Display for AttributionClass
impl Eq for AttributionClass
Source§impl PartialEq for AttributionClass
impl PartialEq for AttributionClass
Source§impl Serialize for AttributionClass
impl Serialize for AttributionClass
impl StructuralPartialEq for AttributionClass
Auto Trait Implementations§
impl Freeze for AttributionClass
impl RefUnwindSafe for AttributionClass
impl Send for AttributionClass
impl Sync for AttributionClass
impl Unpin for AttributionClass
impl UnsafeUnpin for AttributionClass
impl UnwindSafe for AttributionClass
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.