#[non_exhaustive]pub struct InitialSessionConfigOption {
pub config_id: SessionConfigId,
pub value: SessionConfigOptionValue,
pub meta: Option<Map<String, Value>>,
}Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
An initial value for a config option, sent on session setup requests.
Same shape as session/set_config_option without sessionId. Unlike
session/set_config_option, an unknown configId, a type that does not match the
option, or a value that is not allowed is ignored instead of rejected.
Clients only send type: "boolean" entries when they advertise
sessionCapabilities.configOptions.boolean.
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_id: SessionConfigIdThe ID of the configuration option to set.
value: SessionConfigOptionValueThe value to set, including a type discriminator and the raw value.
When type is absent on the wire, defaults to treating the value as a
SessionConfigValueId for select options.
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 InitialSessionConfigOption
impl InitialSessionConfigOption
Sourcepub fn new(
config_id: impl Into<SessionConfigId>,
value: impl Into<SessionConfigOptionValue>,
) -> InitialSessionConfigOption
Available on crate feature unstable_session_options only.
pub fn new( config_id: impl Into<SessionConfigId>, value: impl Into<SessionConfigOptionValue>, ) -> InitialSessionConfigOption
unstable_session_options only.Builds InitialSessionConfigOption with the required fields set. Optional fields start unset or empty.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> InitialSessionConfigOption
Available on crate feature unstable_session_options only.
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> InitialSessionConfigOption
unstable_session_options only.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 InitialSessionConfigOption
impl Clone for InitialSessionConfigOption
Source§fn clone(&self) -> InitialSessionConfigOption
fn clone(&self) -> InitialSessionConfigOption
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 InitialSessionConfigOption
impl Debug for InitialSessionConfigOption
Source§impl<'de> Deserialize<'de> for InitialSessionConfigOption
impl<'de> Deserialize<'de> for InitialSessionConfigOption
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InitialSessionConfigOption, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InitialSessionConfigOption, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for InitialSessionConfigOption
Source§impl JsonSchema for InitialSessionConfigOption
impl JsonSchema for InitialSessionConfigOption
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 Serialize for InitialSessionConfigOption
impl Serialize for InitialSessionConfigOption
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 InitialSessionConfigOption
Auto Trait Implementations§
impl Forget for InitialSessionConfigOption
impl Freeze for InitialSessionConfigOption
impl RefUnwindSafe for InitialSessionConfigOption
impl Send for InitialSessionConfigOption
impl Sync for InitialSessionConfigOption
impl Unpin for InitialSessionConfigOption
impl UnsafeUnpin for InitialSessionConfigOption
impl UnwindSafe for InitialSessionConfigOption
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.