pub enum Held<'a> {
Absent,
Text(&'a str),
On(bool),
}Expand description
What a field currently holds, which a description never carries.
The terminal counterpart of makeover_immediate::Filling, and the same seam:
there the widget writes through a &mut as the value is edited, and here the
caller keeps an edit buffer and lends it out for the draw. Neither is
something Field could carry without becoming a form model.
An enum rather than a bag of options, for Filling’s reason: a checkbox
holding a string is unsayable here, where a struct would let it be said and
then have to cope.
Variants§
Absent
Nothing typed and nothing chosen. The control draws empty.
Text(&'a str)
What is in the box, or the value of the chosen Choice.
On(bool)
A checkbox, on or off.
Implementations§
Trait Implementations§
impl<'a> Copy for Held<'a>
impl<'a> Eq for Held<'a>
impl<'a> StructuralPartialEq for Held<'a>
Auto Trait Implementations§
impl<'a> Freeze for Held<'a>
impl<'a> RefUnwindSafe for Held<'a>
impl<'a> Send for Held<'a>
impl<'a> Sync for Held<'a>
impl<'a> Unpin for Held<'a>
impl<'a> UnsafeUnpin for Held<'a>
impl<'a> UnwindSafe for Held<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more