pub struct PromptId(pub String);Expand description
Unique identifier for a prompt template.
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::PromptId;
let id = PromptId::new("my-id");
assert_eq!(id.as_str(), "my-id");Tuple Fields§
§0: StringImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PromptId
impl<'de> Deserialize<'de> for PromptId
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 Ord for PromptId
impl Ord for PromptId
Source§impl PartialOrd for PromptId
impl PartialOrd for PromptId
impl Eq for PromptId
impl StructuralPartialEq for PromptId
Auto Trait Implementations§
impl Freeze for PromptId
impl RefUnwindSafe for PromptId
impl Send for PromptId
impl Sync for PromptId
impl Unpin for PromptId
impl UnsafeUnpin for PromptId
impl UnwindSafe for PromptId
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