pub struct ToolCallId<T = String>(/* private fields */)
where
T: AsRef<str> + ?Sized;Expand description
The identifier kinds used throughout the runtime (re-exported from
rap-protocol).
Identifies one tool call within a thread.
This is the id field on RAP invocations and callbacks. It
originates from the model provider’s tool-call stream (e.g. Bedrock
tooluse_... IDs) or, for runtime-synthesized calls (thread spawns,
subscription events), from a minted UUID. Treat the contents as
opaque; formats are provider-controlled.
Implementations§
Source§impl<T> ToolCallId<T>
impl<T> ToolCallId<T>
Sourcepub fn new(storage: T) -> ToolCallId<T>
pub fn new(storage: T) -> ToolCallId<T>
Wrap storage as this kind.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwrap into the underlying storage.
Source§impl<T> ToolCallId<T>
impl<T> ToolCallId<T>
Source§impl ToolCallId<str>
impl ToolCallId<str>
Sourcepub const fn from_ref(s: &str) -> &ToolCallId<str>
pub const fn from_ref(s: &str) -> &ToolCallId<str>
Cast a borrowed &str to a borrowed kind, without allocating.
Trait Implementations§
Source§impl<T> AsRef<str> for ToolCallId<T>
impl<T> AsRef<str> for ToolCallId<T>
Source§impl<T> Borrow<ToolCallId<str>> for ToolCallId<T>
impl<T> Borrow<ToolCallId<str>> for ToolCallId<T>
Source§impl<T> Clone for ToolCallId<T>
impl<T> Clone for ToolCallId<T>
Source§fn clone(&self) -> ToolCallId<T>
fn clone(&self) -> ToolCallId<T>
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<T> Debug for ToolCallId<T>
impl<T> Debug for ToolCallId<T>
Source§impl<T> Deref for ToolCallId<T>
impl<T> Deref for ToolCallId<T>
Source§type Target = ToolCallId<str>
type Target = ToolCallId<str>
The resulting type after dereferencing.
Source§fn deref(&self) -> &ToolCallId<str>
fn deref(&self) -> &ToolCallId<str>
Dereferences the value.
Source§impl<'de, T> Deserialize<'de> for ToolCallId<T>
impl<'de, T> Deserialize<'de> for ToolCallId<T>
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ToolCallId<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ToolCallId<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Display for ToolCallId<T>
impl<T> Display for ToolCallId<T>
impl<T> Eq for ToolCallId<T>
Source§impl From<&str> for ToolCallId
impl From<&str> for ToolCallId
Source§fn from(s: &str) -> ToolCallId
fn from(s: &str) -> ToolCallId
Converts to this type from the input type.
Source§impl From<String> for ToolCallId
impl From<String> for ToolCallId
Source§fn from(s: String) -> ToolCallId
fn from(s: String) -> ToolCallId
Converts to this type from the input type.
Source§impl<T> FromStr for ToolCallId<T>
impl<T> FromStr for ToolCallId<T>
Source§impl<T> Hash for ToolCallId<T>
impl<T> Hash for ToolCallId<T>
Source§impl<T> Ord for ToolCallId<T>
impl<T> Ord for ToolCallId<T>
Source§fn cmp(&self, other: &ToolCallId<T>) -> Ordering
fn cmp(&self, other: &ToolCallId<T>) -> 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
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<A, B> PartialEq<ToolCallId<B>> for ToolCallId<A>
impl<A, B> PartialEq<ToolCallId<B>> for ToolCallId<A>
Source§impl<A, B> PartialOrd<ToolCallId<B>> for ToolCallId<A>
impl<A, B> PartialOrd<ToolCallId<B>> for ToolCallId<A>
Source§impl<T> Serialize for ToolCallId<T>
impl<T> Serialize for ToolCallId<T>
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl ToOwned for ToolCallId<str>
impl ToOwned for ToolCallId<str>
Source§type Owned = ToolCallId
type Owned = ToolCallId
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> <ToolCallId<str> as ToOwned>::Owned
fn to_owned(&self) -> <ToolCallId<str> as ToOwned>::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
Auto Trait Implementations§
impl<T> Freeze for ToolCallId<T>
impl<T> RefUnwindSafe for ToolCallId<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for ToolCallId<T>
impl<T> Sync for ToolCallId<T>
impl<T> Unpin for ToolCallId<T>
impl<T> UnsafeUnpin for ToolCallId<T>where
T: UnsafeUnpin + ?Sized,
impl<T> UnwindSafe for ToolCallId<T>where
T: UnwindSafe + ?Sized,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.