new • Rust AI Agent SDK
new: Create a new hook definition
new
Method
</div>
This is a method of the HookDefinition class in the hooks module.
Create a new hook definition
Signature
def new(
event: HookEvent,
func: impl Fn(&HookInput) -> HookResult + Send + Sync + 'static,
) -> SelfParameters
ParamField
HookEventNo description available.
ParamField
impl Fn(&HookInputNo description available.
Returns
ResponseField
Self”> The result of the operation.