pub struct OptionId(/* private fields */);Expand description
A stable, author-assigned name for one OPTION of a choice control.
A separate id space from ControlId on purpose. A choice is one
field with many mutually-exclusive options — the shape B0’s permission
prompt already has: one question offering [a]llow once,
[s]ession allow, [d]eny (default) and the rest. Giving options
their own type means a submission naming a control and an option cannot
name two things of the same kind with no rule saying which is
authoritative; the ambiguity is gone by construction rather than by
prose.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OptionId
impl<'de> Deserialize<'de> for OptionId
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OptionId
Source§impl Ord for OptionId
impl Ord for OptionId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for OptionId
impl PartialOrd for OptionId
impl StructuralPartialEq for OptionId
Auto Trait Implementations§
impl Freeze for OptionId
impl RefUnwindSafe for OptionId
impl Send for OptionId
impl Sync for OptionId
impl Unpin for OptionId
impl UnsafeUnpin for OptionId
impl UnwindSafe for OptionId
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
Mutably borrows from an owned value. Read more