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 more