pub struct HandlerMetadata {
pub name: String,
pub description: String,
pub args: ArgSchema,
pub risk: RiskLevel,
pub side_effects: Vec<SideEffect>,
pub capabilities: Vec<Capability>,
pub deterministic: bool,
}Expand description
Introspection metadata for a registered handler.
Fields§
§name: String§description: String§args: ArgSchema§risk: RiskLevel§side_effects: Vec<SideEffect>§capabilities: Vec<Capability>§deterministic: boolImplementations§
Source§impl HandlerMetadata
impl HandlerMetadata
pub fn new(name: impl Into<String>) -> Self
pub fn describe(self, description: impl Into<String>) -> Self
pub fn args(self, args: ArgSchema) -> Self
pub fn risk(self, risk: RiskLevel) -> Self
pub fn side_effects(self, side_effects: impl Into<Vec<SideEffect>>) -> Self
pub fn capabilities(self, capabilities: impl Into<Vec<Capability>>) -> Self
pub fn deterministic(self, deterministic: bool) -> Self
Trait Implementations§
Source§impl Clone for HandlerMetadata
impl Clone for HandlerMetadata
Source§fn clone(&self) -> HandlerMetadata
fn clone(&self) -> HandlerMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HandlerMetadata
impl Debug for HandlerMetadata
Source§impl<'de> Deserialize<'de> for HandlerMetadata
impl<'de> Deserialize<'de> for HandlerMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HandlerMetadata
impl PartialEq for HandlerMetadata
Source§fn eq(&self, other: &HandlerMetadata) -> bool
fn eq(&self, other: &HandlerMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for HandlerMetadata
impl Serialize for HandlerMetadata
impl Eq for HandlerMetadata
impl StructuralPartialEq for HandlerMetadata
Auto Trait Implementations§
impl Freeze for HandlerMetadata
impl RefUnwindSafe for HandlerMetadata
impl Send for HandlerMetadata
impl Sync for HandlerMetadata
impl Unpin for HandlerMetadata
impl UnsafeUnpin for HandlerMetadata
impl UnwindSafe for HandlerMetadata
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key and return true if they are equal.