pub struct KernelEffect {
pub effect_id: EffectId,
pub causation_input_id: InputId,
pub effect: EffectKind,
}Expand description
One action the kernel published and is now waiting on.
effect_id is minted by the kernel, never by the host; causation_input_id names the accepted
input that produced it, so every effect is traceable to one committed transition.
Fields§
§effect_id: EffectId§causation_input_id: InputId§effect: EffectKindImplementations§
Source§impl KernelEffect
impl KernelEffect
pub fn tag(&self) -> EffectKindTag
Sourcepub fn accept_outcome(
&self,
outcome: &EffectOutcome,
) -> Result<(), EffectResolutionMismatch>
pub fn accept_outcome( &self, outcome: &EffectOutcome, ) -> Result<(), EffectResolutionMismatch>
The contract between a pending effect and the resolution a host offers for it.
A Failed outcome is always admissible — the failure path is uniform across every effect
kind (§7.9). A Succeeded outcome is admissible only if its payload is the success shape
of this effect kind. Anything else is a host protocol error, not a kernel state change; the
caller turns it into a KernelFaultCode::UnexpectedEffectOutcome
rejection with zero mutation.
Trait Implementations§
Source§impl Clone for KernelEffect
impl Clone for KernelEffect
Source§fn clone(&self) -> KernelEffect
fn clone(&self) -> KernelEffect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KernelEffect
impl Debug for KernelEffect
Source§impl<'de> Deserialize<'de> for KernelEffect
impl<'de> Deserialize<'de> for KernelEffect
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for KernelEffect
impl PartialEq for KernelEffect
Source§impl Serialize for KernelEffect
impl Serialize for KernelEffect
impl StructuralPartialEq for KernelEffect
Auto Trait Implementations§
impl Freeze for KernelEffect
impl RefUnwindSafe for KernelEffect
impl Send for KernelEffect
impl Sync for KernelEffect
impl Unpin for KernelEffect
impl UnsafeUnpin for KernelEffect
impl UnwindSafe for KernelEffect
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
Mutably borrows from an owned value. Read more