#[non_exhaustive]pub struct InitialSessionConfigOption {
pub config_id: SessionConfigId,
pub value: SessionConfigOptionValue,
pub meta: Option<Meta>,
}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<Meta>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>,
) -> Self
Available on crate feature unstable_session_options only.
pub fn new( config_id: impl Into<SessionConfigId>, value: impl Into<SessionConfigOptionValue>, ) -> Self
unstable_session_options only.Builds InitialSessionConfigOption with the required fields set. Optional fields start unset or empty.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
Available on crate feature unstable_session_options only.
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
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§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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::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 moreimpl StructuralPartialEq for InitialSessionConfigOption
Auto Trait Implementations§
impl Forget for InitialSessionConfigOption
impl Freeze for InitialSessionConfigOption
impl Move 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.