pub struct ComponentId(pub String);Expand description
A stable, durable identifier for a registered capability.
This is a newtype over String rather than a raw Rust type path so a
capability can survive module moves, renames, and serialization. The string
is the registered name (for example "gpt-4o" or "lookup_user"); it is
scoped to a ComponentKind by the registry, so the same name may be used
for, say, a model and a tool without collision.
Tuple Fields§
§0: StringImplementations§
Trait Implementations§
Source§impl Clone for ComponentId
impl Clone for ComponentId
Source§fn clone(&self) -> ComponentId
fn clone(&self) -> ComponentId
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 ComponentId
impl Debug for ComponentId
Source§impl<'de> Deserialize<'de> for ComponentId
impl<'de> Deserialize<'de> for ComponentId
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 ComponentId
impl Display for ComponentId
impl Eq for ComponentId
Source§impl From<&str> for ComponentId
impl From<&str> for ComponentId
Source§impl From<String> for ComponentId
impl From<String> for ComponentId
Source§impl Hash for ComponentId
impl Hash for ComponentId
Source§impl Ord for ComponentId
impl Ord for ComponentId
Source§fn cmp(&self, other: &ComponentId) -> Ordering
fn cmp(&self, other: &ComponentId) -> Ordering
1.21.0 (const: unstable) · 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 ComponentId
impl PartialEq for ComponentId
Source§fn eq(&self, other: &ComponentId) -> bool
fn eq(&self, other: &ComponentId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ComponentId
impl PartialOrd for ComponentId
Source§impl Serialize for ComponentId
impl Serialize for ComponentId
impl StructuralPartialEq for ComponentId
Auto Trait Implementations§
impl Freeze for ComponentId
impl RefUnwindSafe for ComponentId
impl Send for ComponentId
impl Sync for ComponentId
impl Unpin for ComponentId
impl UnsafeUnpin for ComponentId
impl UnwindSafe for ComponentId
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