#[non_exhaustive]pub struct SessionOptionsResponse {
pub config_options: Vec<SessionConfigOption>,
pub available_commands: Vec<AvailableCommand>,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Response from session/options.
The result is a snapshot. The options a session actually starts with are the ones in the session setup response.
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.config_options: Vec<SessionConfigOption>The config options the session would start with, with the same rules as on
NewSessionResponse.
Optional. Omitted or empty means no config options are advertised.
Senders MUST use an array, not null. Receivers treat null like omission.
available_commands: Vec<AvailableCommand>Commands the Agent knows the session would have.
Optional. Omitted or empty means no commands are advertised.
Senders MUST use an array, not null. Receivers treat null like omission.
Advisory. Agents MAY return a partial list. Clients MUST use the commands from the
session/new or session/resume response and later available_commands_update
notifications for the session itself.
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 SessionOptionsResponse
impl SessionOptionsResponse
Sourcepub fn new() -> SessionOptionsResponse
Available on crate feature unstable_session_options only.
pub fn new() -> SessionOptionsResponse
unstable_session_options only.Builds SessionOptionsResponse with the required response fields set. Optional fields start unset or empty.
Sourcepub fn config_options(
self,
config_options: Vec<SessionConfigOption>,
) -> SessionOptionsResponse
Available on crate feature unstable_session_options only.
pub fn config_options( self, config_options: Vec<SessionConfigOption>, ) -> SessionOptionsResponse
unstable_session_options only.The config options the session would start with.
Sourcepub fn available_commands(
self,
available_commands: Vec<AvailableCommand>,
) -> SessionOptionsResponse
Available on crate feature unstable_session_options only.
pub fn available_commands( self, available_commands: Vec<AvailableCommand>, ) -> SessionOptionsResponse
unstable_session_options only.Commands the Agent knows the session would have. Advisory.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> SessionOptionsResponse
Available on crate feature unstable_session_options only.
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> SessionOptionsResponse
unstable_session_options only.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
Trait Implementations§
Source§impl Clone for SessionOptionsResponse
impl Clone for SessionOptionsResponse
Source§fn clone(&self) -> SessionOptionsResponse
fn clone(&self) -> SessionOptionsResponse
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 SessionOptionsResponse
impl Debug for SessionOptionsResponse
Source§impl Default for SessionOptionsResponse
impl Default for SessionOptionsResponse
Source§fn default() -> SessionOptionsResponse
fn default() -> SessionOptionsResponse
Source§impl<'de> Deserialize<'de> for SessionOptionsResponse
impl<'de> Deserialize<'de> for SessionOptionsResponse
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SessionOptionsResponse, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SessionOptionsResponse, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
impl Eq for SessionOptionsResponse
Source§impl JsonSchema for SessionOptionsResponse
impl JsonSchema for SessionOptionsResponse
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 SessionOptionsResponse
impl PartialEq for SessionOptionsResponse
Source§impl Serialize for SessionOptionsResponse
impl Serialize for SessionOptionsResponse
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 SessionOptionsResponse
Auto Trait Implementations§
impl Forget for SessionOptionsResponse
impl Freeze for SessionOptionsResponse
impl RefUnwindSafe for SessionOptionsResponse
impl Send for SessionOptionsResponse
impl Sync for SessionOptionsResponse
impl Unpin for SessionOptionsResponse
impl UnsafeUnpin for SessionOptionsResponse
impl UnwindSafe for SessionOptionsResponse
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.