Skip to main content

KernelEvent

Enum KernelEvent 

Source
#[non_exhaustive]
pub enum KernelEvent { ActionExecuted { instance: InstanceId, action_type: TypeCode, at: Tick, }, ActionFailed { instance: InstanceId, action_type: TypeCode, reason: Bytes, }, EffectFailed { instance: InstanceId, reason: Bytes, }, ObserverPanic { observer_index: u16, }, ObserverEvicted { observer_index: u16, panic_at_seq: u64, panic_count_before_eviction: u32, }, SignalDropped { target: InstanceId, route: RouteId, reason: SignalDropReason, }, ModuleForceUnloaded { route_id: RouteId, live_refs_at_unload: u32, }, ActionDeferredToNextTick { action_id: ScheduledActionId, reason: DeferReason, }, ObserversFlushed { barrier_ticket: u64, event_count: u32, }, DomainEventEmitted { instance: InstanceId, actor: Option<EntityId>, event_type_code: TypeCode, bytes: Bytes, }, }
Expand description

Top-level kernel-emitted event. Routed through observer filters and recorded in WAL (chunks 3b/c+).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ActionExecuted

An action completed dispatch successfully.

Fields

§instance: InstanceId

Instance where the action ran.

§action_type: TypeCode

Type code of the executed action.

§at: Tick

Tick at which step() processed the action.

§

ActionFailed

Action compute() failed (panic or error). reason is opaque bytes.

Fields

§instance: InstanceId

Instance where the action was attempted.

§action_type: TypeCode

Type code of the failing action.

§reason: Bytes

Opaque failure reason — kernel does not interpret.

§

EffectFailed

Effect application failed during dispatcher.

Fields

§instance: InstanceId

Instance where the effect was being applied.

§reason: Bytes

Opaque failure reason (e.g. b"budget_exceeded" from memory-budget enforcement).

§

ObserverPanic

Observer panicked during on_event. Bounded payload — observer_index only, no panic message (covert channel closed).

Fields

§observer_index: u16

Index of the panicking observer in the registry.

§

ObserverEvicted

First-panic eviction (A22).

Fields

§observer_index: u16

Index of the evicted observer.

§panic_at_seq: u64

Sequence number of the event that triggered the panic.

§panic_count_before_eviction: u32

Panic count before eviction (always 1 under the first-panic policy).

§

SignalDropped

Cross-instance signal dropped (reserved variant for the SendSignal rate-limit (deferred); constructible today for tests).

Fields

§target: InstanceId

Target instance the signal was destined for.

§route: RouteId

Route discriminant.

§reason: SignalDropReason

Why the kernel dropped the signal.

§

ModuleForceUnloaded

Module force-unloaded via force_unload cap path.

Fields

§route_id: RouteId

Route id whose inflight_refs were drained.

§live_refs_at_unload: u32

Sum of live refs that were dropped across instances.

§

ActionDeferredToNextTick

Action deferred to the next tick (reserved variant).

Fields

§action_id: ScheduledActionId

Id of the deferred scheduled action.

§reason: DeferReason

Why the action was deferred.

§

ObserversFlushed

BestEffort durability barrier flushed pending observer events.

Fields

§barrier_ticket: u64

Caller-supplied barrier ticket.

§event_count: u32

Number of events drained at this barrier.

§

DomainEventEmitted

Domain Op::EmitEvent produced an event payload.

Fields

§instance: InstanceId

Instance that emitted the event.

§actor: Option<EntityId>

Optional originating entity.

§event_type_code: TypeCode

Event type discriminant.

§bytes: Bytes

Canonical bytes of the event payload.

Trait Implementations§

Source§

impl Clone for KernelEvent

Source§

fn clone(&self) -> KernelEvent

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KernelEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for KernelEvent

Source§

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 Serialize for KernelEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,