Skip to main content

rustbridge_handler

Attribute Macro rustbridge_handler 

Source
#[rustbridge_handler]
Expand description

Attribute for marking a method as a message handler

The handler will be invoked when a message with the matching type tag is received.

§Example

#[rustbridge_handler("user.create")]
fn create_user(&self, req: CreateUserRequest) -> Result<CreateUserResponse, PluginError> {
    // ...
}