Skip to main content

Module traits

Module traits 

Source
Expand description

Sealed traits for kernel-managed types.

Component, Action, Event are derive-only. Domains reach Action through #[derive(arkhe_macros::ArkheAction)], which generates the _sealed::Sealed + ActionDeriv impls; the kernel’s blanket impl<T: ActionDeriv + ActionCompute> Action for T then supplies the postcard-canonical default methods. Component and Event keep the single-trait shape until their derive macros land alongside the snapshot integration.

_sealed::Sealed is #[doc(hidden)] pub. The Rust language has no true sealing primitive — this is the documented convention. Manual impl _sealed::Sealed from outside the crate is technically possible but auditable and against contract; A11 grade rests on the macro being the canonical (and documented) path.

Enums§

DeserializeError
Deserialization failure for canonical-bytes round-trip.

Traits§

Action
Action — kernel-facing trait. Composed automatically by the blanket below: any T: ActionDeriv + ActionCompute is Action. External code never implements this directly.
ActionCompute
User-written half of Action. The deterministic effect-list computation is the only domain logic the kernel runs.
ActionDeriv
Derive-emitted half of Action. Carries the constants and the serde bounds that Action’s blanket impl needs to drive postcard. #[derive(arkhe_macros::ArkheAction)] is the only sanctioned path.
Component
Component — derive-only via #[derive(arkhe_macros::ArkheComponent)]. Default methods use postcard for the canonical-bytes round trip; the macro only needs to emit Sealed + the const declarations.
Event
Event — derive-only via #[derive(arkhe_macros::ArkheEvent)]. Same postcard-default shape as Component; user types must additionally #[derive(Debug, serde::Serialize, serde::Deserialize)].