pub enum Value<'a> {
Absent,
Text(&'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 checkbox holding a string is unsayable
here, where a struct would let it be said and then have to cope.
Variants§
Absent
Nothing yet.
Text(&'a str)
The value of anything that takes typed text, a select included: what a
select holds is the value of one of Field::options’s
Choices.
It carried the options too until makeover-layout 0.8.0 moved them onto
the field, which collapsed a Chosen { options, value } variant into
this one. makeover-immediate arrived at the same single-variant shape
on its own, from the other direction.
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