pub fn with_hooks<H: ServerHandler>(
inner: H,
hooks: Arc<ToolHooks>,
) -> HookedHandler<H>Expand description
Construct a crate::tool_hooks::HookedHandler from an inner handler and hooks.
Returning the wrapped handler is the entire point of this function;
dropping it on the floor would silently disable the supplied hooks. The
#[must_use] attribute would be the natural enforcement here, but adding
it to a public function is a SemVer-minor change per cargo-semver-checks;
it is deferred to the next minor-version bump.