#[non_exhaustive]pub struct CancelToolCallRequest {
pub session_id: SessionId,
pub tool_call_id: ToolCallId,
pub meta: Option<Meta>,
}unstable_protocol_v2 only.Expand description
Request parameters for cancelling one tool call.
Clients MUST NOT send it unless the tool call currently advertises capabilities.cancel.
The Agent responds once it has accepted the cancellation. The response does not mean
the work has stopped. The Agent confirms it with a tool_call_update to a final
status: normally cancelled, or completed or failed if the work finished first.
The Agent responds with -32602 if the tool call is unknown, already final, or not
cancellable. Cancelling a tool call does not change the foreground state by itself.
See protocol docs: Cancelling Tool Calls
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_id: SessionIdThe ID of the session that owns the tool call.
tool_call_id: ToolCallIdThe ID of the tool call to cancel.
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Omitted and null are equivalent and mean no metadata.
Implementations MUST NOT assign meaning to keys they do not recognize.
See protocol docs: Extensibility
Implementations§
Source§impl CancelToolCallRequest
impl CancelToolCallRequest
Sourcepub fn new(
session_id: impl Into<SessionId>,
tool_call_id: impl Into<ToolCallId>,
) -> Self
pub fn new( session_id: impl Into<SessionId>, tool_call_id: impl Into<ToolCallId>, ) -> Self
Builds CancelToolCallRequest with the required request fields set. Optional fields start unset or empty.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT assign meaning to keys they do not recognize.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for CancelToolCallRequest
impl Clone for CancelToolCallRequest
Source§impl Debug for CancelToolCallRequest
impl Debug for CancelToolCallRequest
Source§impl<'de> Deserialize<'de> for CancelToolCallRequest
impl<'de> Deserialize<'de> for CancelToolCallRequest
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>,
impl Eq for CancelToolCallRequest
Source§impl JsonSchema for CancelToolCallRequest
impl JsonSchema for CancelToolCallRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for CancelToolCallRequest
impl PartialEq for CancelToolCallRequest
Source§impl Serialize for CancelToolCallRequest
impl Serialize for CancelToolCallRequest
impl StructuralPartialEq for CancelToolCallRequest
Auto Trait Implementations§
impl Freeze for CancelToolCallRequest
impl RefUnwindSafe for CancelToolCallRequest
impl Send for CancelToolCallRequest
impl Sync for CancelToolCallRequest
impl Unpin for CancelToolCallRequest
impl UnsafeUnpin for CancelToolCallRequest
impl UnwindSafe for CancelToolCallRequest
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
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<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
key and return true if they are equal.