Struct INodeComponentBase
pub struct INodeComponentBase(/* private fields */);Implementations§
§impl INodeComponentBase
impl INodeComponentBase
pub fn attach_override(&self) -> Result<(), Error>
pub fn detach_override(&self) -> Result<(), Error>
§impl INodeComponentBase
impl INodeComponentBase
pub fn add_message_handler<T>(
&self,
message_type: &MessageType<T>,
closure: impl Handler,
) -> Result<MessageSubscriptionToken, Error>
pub fn add_message_handler<T>( &self, message_type: &MessageType<T>, closure: impl Handler, ) -> Result<MessageSubscriptionToken, Error>
Kanzi calls the message handler that you add using this function when the target name of the incoming message matches the name of this node component, or if the message is broadcast to all node components with an empty target name.
§Arguments
message_type- Type of message to handle.closure- The callback that will be invoked when this node component receives a message.
§Returns
Message subscription token.
pub fn remove_message_filter(
&self,
token: &MessageSubscriptionToken,
) -> Result<(), Error>
pub fn remove_message_filter( &self, token: &MessageSubscriptionToken, ) -> Result<(), Error>
Removes message handler added via add_message_handler function.
§Arguments
token- Subscription token of message handler to remove.
pub fn dispatch_message<T>(
&self,
message_type: &MessageType<T>,
message_arguments: &T,
) -> Result<(), Error>where
T: MessageArgumentsConstraint,
pub fn dispatch_message<T>(
&self,
message_type: &MessageType<T>,
message_arguments: &T,
) -> Result<(), Error>where
T: MessageArgumentsConstraint,
Adds the name of the node component to the message arguments and dispatches the message to the node of the node component.
§Arguments
message_type- The type of the dispatched message.message_arguments- The arguments of the dispatched message.
pub fn dispatch_abstract_message<T>(
&self,
message_type: &MessageType<T>,
message_arguments: &MessageArguments,
) -> Result<(), Error>
pub fn dispatch_abstract_message<T>( &self, message_type: &MessageType<T>, message_arguments: &MessageArguments, ) -> Result<(), Error>
Adds the name of the node component to the abstract message arguments and dispatches the message to the node of the node component.
§Arguments
message_type- The abstract type of the dispatched message.message_arguments- The abstract arguments of the dispatched message.
Trait Implementations§
§impl Inherits<INodeComponentBase> for IActivityCodeBehindBase
impl Inherits<INodeComponentBase> for IActivityCodeBehindBase
fn upcast(self) -> Base
fn upcast_ref(&self) -> &Base
§impl Inherits<INodeComponentBase> for ICodeBehindBase
impl Inherits<INodeComponentBase> for ICodeBehindBase
fn upcast(self) -> Base
fn upcast_ref(&self) -> &Base
Auto Trait Implementations§
impl Freeze for INodeComponentBase
impl RefUnwindSafe for INodeComponentBase
impl !Send for INodeComponentBase
impl !Sync for INodeComponentBase
impl Unpin for INodeComponentBase
impl UnwindSafe for INodeComponentBase
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