pub struct ToolInteractionId(/* private fields */);Expand description
Opaque interaction id. Keep the returned identity unchanged when constructing the response. Its spelling is opaque; do not derive invocation or tool identity from it.
§Examples
use tools_kit::interaction::ToolInteractionId;
let id = ToolInteractionId::new();
let encoded = serde_json::to_value(&id).unwrap();
assert_eq!(encoded.as_str(), Some(id.as_str()));Implementations§
Source§impl ToolInteractionId
impl ToolInteractionId
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a fresh opaque interaction id.
See crate::interaction::ToolInteractionId for a complete example.
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Borrows the serialized interaction id.
See crate::interaction::ToolInteractionId for a complete example.
Trait Implementations§
Source§impl Clone for ToolInteractionId
impl Clone for ToolInteractionId
Source§impl Debug for ToolInteractionId
impl Debug for ToolInteractionId
Source§impl Default for ToolInteractionId
impl Default for ToolInteractionId
Source§impl<'de> Deserialize<'de> for ToolInteractionId
impl<'de> Deserialize<'de> for ToolInteractionId
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
impl Eq for ToolInteractionId
Source§impl Hash for ToolInteractionId
impl Hash for ToolInteractionId
Source§impl Ord for ToolInteractionId
impl Ord for ToolInteractionId
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ToolInteractionId
impl PartialEq for ToolInteractionId
Source§impl PartialOrd for ToolInteractionId
impl PartialOrd for ToolInteractionId
Source§impl Serialize for ToolInteractionId
impl Serialize for ToolInteractionId
impl StructuralPartialEq for ToolInteractionId
Auto Trait Implementations§
impl Freeze for ToolInteractionId
impl RefUnwindSafe for ToolInteractionId
impl Send for ToolInteractionId
impl Sync for ToolInteractionId
impl Unpin for ToolInteractionId
impl UnsafeUnpin for ToolInteractionId
impl UnwindSafe for ToolInteractionId
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.