pub enum TrapKind {
Fuel,
Epoch,
Cancelled,
Other,
}Expand description
Why a lifecycle call trapped. Fuel/epoch are the expected runaway-guard
outcomes; Other is any genuine wasm trap (unreachable, OOB, a guest
panic).
Variants§
Fuel
The call exhausted its fuel budget (a compute runaway).
Epoch
The call ran past its epoch (wall-clock) deadline.
Cancelled
CG.4: the user pressed <C-g> while the call was running.
Deliberately NOT a crash. Fuel/epoch/other mean the plugin misbehaved and should be quarantined; this means the user changed their mind, and quarantining a plugin for that would punish it for being interruptible.
Other
Any other wasm trap (unreachable, out-of-bounds, guest panic).
Implementations§
Source§impl TrapKind
impl TrapKind
Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
A short, stable machine label ("fuel" / "epoch" / "trap") for the
lattice_protocol::Event::PluginCrashed payload and structured logs. Distinct from the
Display impl’s human sentence: subscribers match on
this without parsing prose, and it never changes with copy edits.
Trait Implementations§
impl Copy for TrapKind
impl Eq for TrapKind
impl StructuralPartialEq for TrapKind
Auto Trait Implementations§
impl Freeze for TrapKind
impl RefUnwindSafe for TrapKind
impl Send for TrapKind
impl Sync for TrapKind
impl Unpin for TrapKind
impl UnsafeUnpin for TrapKind
impl UnwindSafe for TrapKind
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more