Trait scrypto::api::ClientActorApi
source · pub trait ClientActorApi<E>where
E: Debug,{
// Required methods
fn actor_get_blueprint_id(&mut self) -> Result<BlueprintId, E>;
fn actor_get_node_id(&mut self, ref_handle: u32) -> Result<NodeId, E>;
fn actor_is_feature_enabled(
&mut self,
state_handle: u32,
feature: &str
) -> Result<bool, E>;
fn actor_open_field(
&mut self,
state_handle: u32,
field: u8,
flags: LockFlags
) -> Result<u32, 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§
sourcefn actor_get_blueprint_id(&mut self) -> Result<BlueprintId, E>
fn actor_get_blueprint_id(&mut self) -> Result<BlueprintId, E>
Retrieve the current blueprint id
sourcefn actor_get_node_id(&mut self, ref_handle: u32) -> Result<NodeId, E>
fn actor_get_node_id(&mut self, ref_handle: u32) -> Result<NodeId, E>
Retrieve the current method actor’s node id
sourcefn actor_is_feature_enabled(
&mut self,
state_handle: u32,
feature: &str
) -> Result<bool, E>
fn actor_is_feature_enabled( &mut self, state_handle: u32, feature: &str ) -> Result<bool, E>
Check if a feature is enabled for a given object
sourcefn actor_open_field(
&mut self,
state_handle: u32,
field: u8,
flags: LockFlags
) -> Result<u32, E>
fn actor_open_field( &mut self, state_handle: u32, field: u8, flags: LockFlags ) -> Result<u32, E>
Open a field in a given object for reading/writing
sourcefn actor_emit_event(
&mut self,
event_name: String,
event_data: Vec<u8>,
event_flags: EventFlags
) -> Result<(), E>
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