pub enum Value<'a> {
Absent,
Text(&'a str),
Chosen {
options: &'a [Choice<'a>],
value: &'a str,
},
On(bool),
}Expand description
What the field currently holds.
An enum rather than a bag of optional fields, on the same reasoning
makeover_layout::Depth is one: a select with no options and a checkbox
with a string value are both unsayable here, where a struct would let them
be said and then have to cope.
Variants§
Absent
Nothing yet.
Text(&'a str)
The value of anything that takes typed text.
Chosen
The options of a select, and which of them is current.
Fields
On(bool)
A checkbox, on or off.
Trait Implementations§
impl<'a> Copy for Value<'a>
impl<'a> Eq for Value<'a>
impl<'a> StructuralPartialEq for Value<'a>
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnsafeUnpin for Value<'a>
impl<'a> UnwindSafe for Value<'a>
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