Skip to main content

execute_handler

Macro execute_handler 

Source
macro_rules! execute_handler {
    ($(#[$attr:meta])* fn $name:ident($id:ident, $params:ident) $body:block) => { ... };
    ($(#[$attr:meta])* fn $name:ident($id:ident, $params:ident, $free:ident) $body:block) => { ... };
}
Expand description

Define a tool execute callback whose call id is an ordinary borrowed str. The two-argument form gives the body an OwnedString that reclaims parameters through the host’s supplied deallocator. The three-argument form exposes raw parameters and their deallocator for callers implementing their own ABI.