#[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>) -> Self
pub fn value_id(id: impl Into<SessionConfigValueId>) -> Self
Create a value-id option value (used by select and other id-based option types).
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SessionConfigOptionValue
Source§impl From<&str> for SessionConfigOptionValue
impl From<&str> for SessionConfigOptionValue
Source§impl From<SessionConfigValueId> for SessionConfigOptionValue
impl From<SessionConfigValueId> for SessionConfigOptionValue
Source§fn from(value: SessionConfigValueId) -> Self
fn from(value: SessionConfigValueId) -> Self
Source§impl From<bool> for SessionConfigOptionValue
impl From<bool> for SessionConfigOptionValue
Source§impl IntoV1 for SessionConfigOptionValue
impl IntoV1 for SessionConfigOptionValue
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 ==.Source§impl Serialize for SessionConfigOptionValue
impl Serialize for SessionConfigOptionValue
impl StructuralPartialEq for SessionConfigOptionValue
Auto Trait Implementations§
impl Freeze for SessionConfigOptionValue
impl RefUnwindSafe for SessionConfigOptionValue
impl Send for SessionConfigOptionValue
impl Sync for SessionConfigOptionValue
impl Unpin for SessionConfigOptionValue
impl UnsafeUnpin for SessionConfigOptionValue
impl UnwindSafe for SessionConfigOptionValue
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.