#[non_exhaustive]pub struct CloseSessionRequest {
pub session_id: SessionId,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
Request parameters for closing an active session.
If supported, the agent must cancel any ongoing work related to the session
(treat it as if session/cancel was called) and then free up any resources
associated with the session.
Only available if the Agent supports the session.close capability.
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 to close.
meta: Option<Map<String, Value>>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl CloseSessionRequest
impl CloseSessionRequest
Sourcepub fn new(session_id: impl Into<SessionId>) -> CloseSessionRequest
pub fn new(session_id: impl Into<SessionId>) -> CloseSessionRequest
Builds CloseSessionRequest with the required request fields set; optional fields start unset or empty.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> CloseSessionRequest
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> CloseSessionRequest
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for CloseSessionRequest
impl Clone for CloseSessionRequest
Source§fn clone(&self) -> CloseSessionRequest
fn clone(&self) -> CloseSessionRequest
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 CloseSessionRequest
impl Debug for CloseSessionRequest
Source§impl<'de> Deserialize<'de> for CloseSessionRequest
impl<'de> Deserialize<'de> for CloseSessionRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CloseSessionRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CloseSessionRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for CloseSessionRequest
Source§impl IntoV1 for CloseSessionRequest
impl IntoV1 for CloseSessionRequest
Source§type Output = CloseSessionRequest
type Output = CloseSessionRequest
Source§fn into_v1(
self,
) -> Result<<CloseSessionRequest as IntoV1>::Output, ProtocolConversionError>
fn into_v1( self, ) -> Result<<CloseSessionRequest as IntoV1>::Output, ProtocolConversionError>
Source§impl JsonRpcMessage for CloseSessionRequest
impl JsonRpcMessage for CloseSessionRequest
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 CloseSessionRequest
impl JsonRpcRequest for CloseSessionRequest
Source§type Response = CloseSessionResponse
type Response = CloseSessionResponse
Source§impl JsonSchema for CloseSessionRequest
impl JsonSchema for CloseSessionRequest
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 CloseSessionRequest
impl PartialEq for CloseSessionRequest
Source§fn eq(&self, other: &CloseSessionRequest) -> bool
fn eq(&self, other: &CloseSessionRequest) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CloseSessionRequest
impl Serialize for CloseSessionRequest
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 CloseSessionRequest
Auto Trait Implementations§
impl Freeze for CloseSessionRequest
impl RefUnwindSafe for CloseSessionRequest
impl Send for CloseSessionRequest
impl Sync for CloseSessionRequest
impl Unpin for CloseSessionRequest
impl UnsafeUnpin for CloseSessionRequest
impl UnwindSafe for CloseSessionRequest
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.