Trait SystemActorApi

Source
pub trait SystemActorApi<E> {
    // Required methods
    fn actor_get_blueprint_id(&mut self) -> Result<BlueprintId, E>;
    fn actor_get_node_id(
        &mut self,
        ref_handle: ActorRefHandle,
    ) -> Result<NodeId, E>;
    fn actor_is_feature_enabled(
        &mut self,
        state_handle: ActorStateHandle,
        feature: &str,
    ) -> Result<bool, E>;
    fn actor_open_field(
        &mut self,
        state_handle: ActorStateHandle,
        field: FieldIndex,
        flags: LockFlags,
    ) -> Result<FieldHandle, E>;
    fn actor_emit_event(
        &mut self,
        event_name: String,
        event_data: Vec<u8>,
        event_flags: EventFlags,
    ) -> Result<(), E>;
}
Expand description

Api which exposes methods in the context of the actor

Required Methods§

Source

fn actor_get_blueprint_id(&mut self) -> Result<BlueprintId, E>

Retrieve the current blueprint id

Source

fn actor_get_node_id(&mut self, ref_handle: ActorRefHandle) -> Result<NodeId, E>

Retrieve the current method actor’s node id

Source

fn actor_is_feature_enabled( &mut self, state_handle: ActorStateHandle, feature: &str, ) -> Result<bool, E>

Check if a feature is enabled for a given object

Source

fn actor_open_field( &mut self, state_handle: ActorStateHandle, field: FieldIndex, flags: LockFlags, ) -> Result<FieldHandle, E>

Open a field in a given object for reading/writing

Source

fn actor_emit_event( &mut self, event_name: String, event_data: Vec<u8>, event_flags: EventFlags, ) -> Result<(), E>

Emits an event of the current actor

Implementors§