#[non_exhaustive]pub enum Op {
SpawnEntity {
id: EntityId,
owner: Principal,
},
DespawnEntity {
id: EntityId,
},
SetComponent {
entity: EntityId,
type_code: TypeCode,
bytes: Bytes,
size: u64,
},
RemoveComponent {
entity: EntityId,
type_code: TypeCode,
size: u64,
},
EmitEvent {
actor: Option<EntityId>,
event_type_code: TypeCode,
event_bytes: Bytes,
},
ScheduleAction {
at: Tick,
actor: Option<EntityId>,
action_type_code: TypeCode,
action_bytes: Bytes,
action_principal: Principal,
},
SendSignal {
target: InstanceId,
route: RouteId,
payload: Bytes,
},
}Expand description
Kernel-level effect intent. Each variant is “what to do”; the
kernel wraps it in Effect for
authorization, then dispatches into the per-step StepStage.
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.
SpawnEntity
Register a new entity with the given id and owner.
Fields
DespawnEntity
Remove an entity from the instance.
SetComponent
Attach (or replace) a component on entity under type_code.
Fields
RemoveComponent
Detach a component from entity.
Fields
EmitEvent
Emit a domain event. Surfaces as KernelEvent::DomainEventEmitted
to observers post-commit.
Fields
ScheduleAction
Enqueue another action for a future tick.
Fields
SendSignal
Cross-instance signal. Routed by the kernel to the target instance’s IPC queue post-commit.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Op
impl<'de> Deserialize<'de> for Op
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
Auto Trait Implementations§
impl !Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
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