pub struct HandlerDef {
pub name: &'static str,
pub description: &'static str,
pub visibility: Visibility,
pub category: VerbCategory,
pub params: &'static [ParamDef],
}Expand description
Handler metadata for discovery and documentation (ADR-023, ADR-025).
Replaces the previous VerbDef. Every entry carries a visibility tag
so the registry can separate the MCP-exposed surface from internal handlers,
and a category that classifies the illocutionary force of the verb
per the speech-act taxonomy in ADR-025.
The params slice is used by VerbRegistry::describe_verb to build the
help=true schema envelope (issue #287). Packs that predate this field
leave it empty (&[]) which is backward-compatible — callers receive a
schema envelope with zero params rather than an error.
Fields§
§name: &'static str§description: &'static str§visibility: Visibility§category: VerbCategoryIllocutionary force classification (ADR-025). Use Assertive for
Subhandler entries that have no external callers.
params: &'static [ParamDef]Parameter schema for help=true introspection (issue #287).
Empty (&[]) is the correct default for handlers that predate this
field or have no fixed parameter schema (e.g. free-form query verbs).
Implementations§
Source§impl HandlerDef
impl HandlerDef
Sourcepub fn presentation_policy(&self) -> VerbPresentationPolicy
pub fn presentation_policy(&self) -> VerbPresentationPolicy
Resolve the presentation policy for this handler.
Returns VerbPresentationPolicy::AlwaysVerbose for verbs whose
semantics demand full output (full UUIDs, complete timestamps) regardless
of the caller’s requested presentation mode.
The set is derived from ADR-045 §6. New verbs that need this override
must be added here; omission from the list means Standard applies.
Trait Implementations§
Source§impl Clone for HandlerDef
impl Clone for HandlerDef
Source§fn clone(&self) -> HandlerDef
fn clone(&self) -> HandlerDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HandlerDef
impl Debug for HandlerDef
Source§impl PartialEq for HandlerDef
impl PartialEq for HandlerDef
Source§fn eq(&self, other: &HandlerDef) -> bool
fn eq(&self, other: &HandlerDef) -> bool
self and other values to be equal, and is used by ==.impl Eq for HandlerDef
impl StructuralPartialEq for HandlerDef
Auto Trait Implementations§
impl Freeze for HandlerDef
impl RefUnwindSafe for HandlerDef
impl Send for HandlerDef
impl Sync for HandlerDef
impl Unpin for HandlerDef
impl UnsafeUnpin for HandlerDef
impl UnwindSafe for HandlerDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.