pub struct CapabilityName(pub String);Expand description
Unique name for an Invocable capability.
This is a newtype wrapper around String that provides
type-safe identity within the capability system. It implements
Display, serialisation, ordering, and hashing.
§Example
use agentkit_capabilities::CapabilityName;
let id = CapabilityName::new("my-id");
assert_eq!(id.as_str(), "my-id");Tuple Fields§
§0: StringImplementations§
Trait Implementations§
Source§impl Clone for CapabilityName
impl Clone for CapabilityName
Source§fn clone(&self) -> CapabilityName
fn clone(&self) -> CapabilityName
Returns a duplicate of the value. Read more
1.0.0 · 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 CapabilityName
impl Debug for CapabilityName
Source§impl Default for CapabilityName
impl Default for CapabilityName
Source§fn default() -> CapabilityName
fn default() -> CapabilityName
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CapabilityName
impl<'de> Deserialize<'de> for CapabilityName
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 Display for CapabilityName
impl Display for CapabilityName
Source§impl Hash for CapabilityName
impl Hash for CapabilityName
Source§impl Ord for CapabilityName
impl Ord for CapabilityName
Source§fn cmp(&self, other: &CapabilityName) -> Ordering
fn cmp(&self, other: &CapabilityName) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CapabilityName
impl PartialEq for CapabilityName
Source§impl PartialOrd for CapabilityName
impl PartialOrd for CapabilityName
Source§impl Serialize for CapabilityName
impl Serialize for CapabilityName
impl Eq for CapabilityName
impl StructuralPartialEq for CapabilityName
Auto Trait Implementations§
impl Freeze for CapabilityName
impl RefUnwindSafe for CapabilityName
impl Send for CapabilityName
impl Sync for CapabilityName
impl Unpin for CapabilityName
impl UnsafeUnpin for CapabilityName
impl UnwindSafe for CapabilityName
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