Struct ark_api::behavior_controller::IncomingMessage
source · pub struct IncomingMessage<'a> {
pub serialized_message: &'a [u8],
/* private fields */
}Expand description
Represents a message to be sent to a specific behavior instance for processing
It is “incoming” from the perspective of the behavior instance
Fields§
§serialized_message: &'a [u8]Serialized message payload
Implementations§
source§impl<'a> IncomingMessage<'a>
impl<'a> IncomingMessage<'a>
sourcepub fn new_to_instance(
instance: BehaviorInstance,
actor_id: ActorId,
serialized_message: &'a [u8]
) -> Self
pub fn new_to_instance( instance: BehaviorInstance, actor_id: ActorId, serialized_message: &'a [u8] ) -> Self
Creates a new message to a specific behavior instance.
sourcepub fn new_to_module(
type_id: BehaviorTypeId,
instance: Option<BehaviorInstance>,
serialized_message: &'a [u8]
) -> Self
pub fn new_to_module( type_id: BehaviorTypeId, instance: Option<BehaviorInstance>, serialized_message: &'a [u8] ) -> Self
Creates a new message to a specific behavior module, represented by this behavior type.
Trait Implementations§
source§impl<'a> Debug for IncomingMessage<'a>
impl<'a> Debug for IncomingMessage<'a>
source§impl<'a> From<&IncomingMessage<'a>> for IncomingMessage
impl<'a> From<&IncomingMessage<'a>> for IncomingMessage
source§fn from(msg: &IncomingMessage<'a>) -> Self
fn from(msg: &IncomingMessage<'a>) -> Self
Converts to this type from the input type.
source§impl<'a> PartialEq<IncomingMessage<'a>> for IncomingMessage<'a>
impl<'a> PartialEq<IncomingMessage<'a>> for IncomingMessage<'a>
source§fn eq(&self, other: &IncomingMessage<'a>) -> bool
fn eq(&self, other: &IncomingMessage<'a>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.