#[non_exhaustive]pub enum SessionConfigOptionValue {
Boolean {
value: bool,
},
ValueId {
value: SessionConfigValueId,
},
}unstable_boolean_config and 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.
The value to set for a session configuration option.
The type field acts as the discriminator in the serialized JSON form.
When no type is present, the value is treated as a SessionConfigValueId
via the ValueId fallback variant.
The type discriminator describes the shape of the value, not the option
kind. For example every option kind that picks from a list of ids
(select, radio, …) would use ValueId, while a
future freeform text option would get its own variant.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Boolean
A boolean value (type: "boolean").
ValueId
A SessionConfigValueId string value.
This is the default when type is absent on the wire. Unknown type
values with string payloads also gracefully deserialize into this
variant.
Fields
value: SessionConfigValueIdThe value ID.
Implementations§
Source§impl SessionConfigOptionValue
impl SessionConfigOptionValue
Sourcepub fn value_id(id: impl Into<SessionConfigValueId>) -> SessionConfigOptionValue
pub fn value_id(id: impl Into<SessionConfigValueId>) -> SessionConfigOptionValue
Create a value-id option value (used by select and other id-based option types).
Sourcepub fn boolean(val: bool) -> SessionConfigOptionValue
pub fn boolean(val: bool) -> SessionConfigOptionValue
Create a boolean option value.
Sourcepub fn as_value_id(&self) -> Option<&SessionConfigValueId>
pub fn as_value_id(&self) -> Option<&SessionConfigValueId>
Return the inner SessionConfigValueId if this is a
ValueId value.
Trait Implementations§
Source§impl Clone for SessionConfigOptionValue
impl Clone for SessionConfigOptionValue
Source§fn clone(&self) -> SessionConfigOptionValue
fn clone(&self) -> SessionConfigOptionValue
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 SessionConfigOptionValue
impl Debug for SessionConfigOptionValue
Source§impl<'de> Deserialize<'de> for SessionConfigOptionValue
impl<'de> Deserialize<'de> for SessionConfigOptionValue
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionConfigOptionValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionConfigOptionValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for SessionConfigOptionValue
Source§impl From<&str> for SessionConfigOptionValue
impl From<&str> for SessionConfigOptionValue
Source§fn from(value: &str) -> SessionConfigOptionValue
fn from(value: &str) -> SessionConfigOptionValue
Source§impl From<SessionConfigValueId> for SessionConfigOptionValue
impl From<SessionConfigValueId> for SessionConfigOptionValue
Source§fn from(value: SessionConfigValueId) -> SessionConfigOptionValue
fn from(value: SessionConfigValueId) -> SessionConfigOptionValue
Source§impl From<bool> for SessionConfigOptionValue
impl From<bool> for SessionConfigOptionValue
Source§fn from(value: bool) -> SessionConfigOptionValue
fn from(value: bool) -> SessionConfigOptionValue
Source§impl IntoV1 for SessionConfigOptionValue
impl IntoV1 for SessionConfigOptionValue
Source§type Output = SessionConfigOptionValue
type Output = SessionConfigOptionValue
Source§fn into_v1(
self,
) -> Result<<SessionConfigOptionValue as IntoV1>::Output, ProtocolConversionError>
fn into_v1( self, ) -> Result<<SessionConfigOptionValue as IntoV1>::Output, ProtocolConversionError>
Source§impl JsonSchema for SessionConfigOptionValue
impl JsonSchema for SessionConfigOptionValue
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 SessionConfigOptionValue
impl PartialEq for SessionConfigOptionValue
Source§fn eq(&self, other: &SessionConfigOptionValue) -> bool
fn eq(&self, other: &SessionConfigOptionValue) -> bool
self and other values to be equal, and is used by ==.