#[non_exhaustive]pub struct CancelToolCallRequest {
pub session_id: SessionId,
pub tool_call_id: ToolCallId,
pub meta: Option<Map<String, Value>>,
}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<Map<String, Value>>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>,
) -> CancelToolCallRequest
pub fn new( session_id: impl Into<SessionId>, tool_call_id: impl Into<ToolCallId>, ) -> CancelToolCallRequest
Builds CancelToolCallRequest with the required request fields set. Optional fields start unset or empty.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> CancelToolCallRequest
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> CancelToolCallRequest
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§fn clone(&self) -> CancelToolCallRequest
fn clone(&self) -> CancelToolCallRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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<CancelToolCallRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CancelToolCallRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for CancelToolCallRequest
Source§impl JsonRpcMessage for CancelToolCallRequest
impl JsonRpcMessage for CancelToolCallRequest
Source§fn matches_method(method: &str) -> bool
fn matches_method(method: &str) -> bool
Source§fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
Source§impl JsonRpcRequest for CancelToolCallRequest
impl JsonRpcRequest for CancelToolCallRequest
Source§type Response = CancelToolCallResponse
type Response = CancelToolCallResponse
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
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,
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.