Trait ICodeBehind

pub trait ICodeBehind: AsAny {
    // Required methods
    fn register_commands_override(&self) -> Result<(), Error>;
    fn unregister_commands_override(&self) -> Result<(), Error>;

    // Provided methods
    fn attach_override(&self) -> Result<(), Error> { ... }
    fn detach_override(&self) -> Result<(), Error> { ... }
}

Required Methods§

fn register_commands_override(&self) -> Result<(), Error>

Override this method to register commands.

You must register every command using ICodeBehindBase::register_command. Kanzi registers commands when it attaches the node that uses this code behind.

fn unregister_commands_override(&self) -> Result<(), Error>

Override this method to unregister the registered commands.

You must unregister every registered command using ICodeBehindBase::unregister_command. Kanzi changes the status of a command to unregistered when it detaches the node that uses this code behind.

Provided Methods§

fn attach_override(&self) -> Result<(), Error>

NodeComponent calls this function during attaching of node component to a node. Subclasses of NodeComponent can override this function to add custom logic which will be performed during node component attach.

fn detach_override(&self) -> Result<(), Error>

NodeComponent calls this function during detaching of node component from a node. Subclasses of NodeComponent can override this function to add custom logic which will be performed during node component detach.

Implementors§