#[non_exhaustive]pub struct SessionConfigOption {
pub id: SessionConfigId,
pub name: String,
pub description: Option<String>,
pub category: Option<SessionConfigOptionCategory>,
pub kind: SessionConfigKind,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
A session configuration option selector and its current state.
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.id: SessionConfigIdUnique identifier for the configuration option.
name: StringHuman-readable label for the option.
description: Option<String>Optional description for the Client to display to the user.
category: Option<SessionConfigOptionCategory>Optional semantic category for this option (UX only).
kind: SessionConfigKindType-specific fields for this configuration option.
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 SessionConfigOption
impl SessionConfigOption
pub fn new( id: impl Into<SessionConfigId>, name: impl Into<String>, kind: SessionConfigKind, ) -> SessionConfigOption
pub fn select( id: impl Into<SessionConfigId>, name: impl Into<String>, current_value: impl Into<SessionConfigValueId>, options: impl Into<SessionConfigSelectOptions>, ) -> SessionConfigOption
Sourcepub fn boolean(
id: impl Into<SessionConfigId>,
name: impl Into<String>,
current_value: bool,
) -> SessionConfigOption
Available on crate feature unstable_boolean_config only.
pub fn boolean( id: impl Into<SessionConfigId>, name: impl Into<String>, current_value: bool, ) -> SessionConfigOption
unstable_boolean_config only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
pub fn description( self, description: impl IntoOption<String>, ) -> SessionConfigOption
pub fn category( self, category: impl IntoOption<SessionConfigOptionCategory>, ) -> SessionConfigOption
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> SessionConfigOption
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> SessionConfigOption
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 SessionConfigOption
impl Clone for SessionConfigOption
Source§fn clone(&self) -> SessionConfigOption
fn clone(&self) -> SessionConfigOption
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 SessionConfigOption
impl Debug for SessionConfigOption
Source§impl<'de> Deserialize<'de> for SessionConfigOption
impl<'de> Deserialize<'de> for SessionConfigOption
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionConfigOption, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionConfigOption, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for SessionConfigOption
Source§impl IntoV1 for SessionConfigOption
impl IntoV1 for SessionConfigOption
Source§type Output = SessionConfigOption
type Output = SessionConfigOption
Source§fn into_v1(
self,
) -> Result<<SessionConfigOption as IntoV1>::Output, ProtocolConversionError>
fn into_v1( self, ) -> Result<<SessionConfigOption as IntoV1>::Output, ProtocolConversionError>
Source§impl JsonSchema for SessionConfigOption
impl JsonSchema for SessionConfigOption
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 SessionConfigOption
impl PartialEq for SessionConfigOption
Source§fn eq(&self, other: &SessionConfigOption) -> bool
fn eq(&self, other: &SessionConfigOption) -> bool
self and other values to be equal, and is used by ==.