pub enum KernelFaultCode {
Show 15 variants
MalformedEnvelope,
OperationMismatch,
ClockRegression,
InvalidLifecycle,
InvalidConfig,
InvalidAuthority,
ResourceLimitExceeded,
DuplicateInputConflict,
UnexpectedEffectOutcome,
TransactionConflict,
CheckpointIncompatible,
CheckpointCorrupted,
RecordCorrupted,
CheckpointRequired,
UnsupportedEffect,
}Expand description
Why the kernel refused an input.
Variants§
MalformedEnvelope
OperationMismatch
ClockRegression
InvalidLifecycle
InvalidConfig
InvalidAuthority
ResourceLimitExceeded
DuplicateInputConflict
UnexpectedEffectOutcome
A host resolved a pending effect with the success payload of another effect kind, or resolved an effect the kernel is not waiting on.
TransactionConflict
CheckpointIncompatible
CheckpointCorrupted
RecordCorrupted
A durable journal record no longer matches the digest it carries, or the chain it sits in no longer links up.
Deliberately not folded into Self::CheckpointCorrupted: the two have different recovery
ladders. A corrupted checkpoint can be answered by falling back to an older checkpoint and
replaying more tail; a corrupted record is a journal-integrity failure with nothing to fall
back to, because the record chain is the operation’s history.
CheckpointRequired
The only retryable code (GAP-2).
Returned as a Rejected preparation with zero mutation — the input was never accepted. The
host takes a checkpoint candidate, installs it and acks it (§12.3), then retries with the
same input_id. That retry is a brand-new prepare and must not fall into
Self::DuplicateInputConflict.
This code exists to replace the snapshot-overflow latch, whose double consequence — snapshots permanently disabled snapshots and later preparations — was a hard failure on the only durable host and a silent degradation everywhere else.
UnsupportedEffect
The kernel was about to emit an effect whose kind the operation’s host_effect_support
declaration does not cover (DEC-8, GAP-6).
Fail-closed before emission: the fault is committed and no effect is published, so the
host is never handed an effect it cannot execute. This is the declaration-time half of the
pair whose runtime half is
HostEffectFailureKind::ProtocolError
(DEC-7).
Implementations§
Source§impl KernelFaultCode
impl KernelFaultCode
pub const ALL: [KernelFaultCode; 15]
pub fn as_str(self) -> &'static str
Sourcepub fn is_retryable(self) -> bool
pub fn is_retryable(self) -> bool
Whether re-submitting the same input_id unchanged can succeed. Exactly one code says yes.
Trait Implementations§
Source§impl Clone for KernelFaultCode
impl Clone for KernelFaultCode
Source§fn clone(&self) -> KernelFaultCode
fn clone(&self) -> KernelFaultCode
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 KernelFaultCode
Source§impl Debug for KernelFaultCode
impl Debug for KernelFaultCode
Source§impl<'de> Deserialize<'de> for KernelFaultCode
impl<'de> Deserialize<'de> for KernelFaultCode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<KernelFaultCode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KernelFaultCode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for KernelFaultCode
impl Display for KernelFaultCode
impl Eq for KernelFaultCode
Source§impl Hash for KernelFaultCode
impl Hash for KernelFaultCode
Source§impl Ord for KernelFaultCode
impl Ord for KernelFaultCode
Source§fn cmp(&self, other: &KernelFaultCode) -> Ordering
fn cmp(&self, other: &KernelFaultCode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for KernelFaultCode
impl PartialEq for KernelFaultCode
Source§impl PartialOrd for KernelFaultCode
impl PartialOrd for KernelFaultCode
Source§impl Serialize for KernelFaultCode
impl Serialize for KernelFaultCode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for KernelFaultCode
Auto Trait Implementations§
impl Freeze for KernelFaultCode
impl RefUnwindSafe for KernelFaultCode
impl Send for KernelFaultCode
impl Sync for KernelFaultCode
impl Unpin for KernelFaultCode
impl UnsafeUnpin for KernelFaultCode
impl UnwindSafe for KernelFaultCode
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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