pub struct Choice<'a> {
pub value: &'a str,
pub label: &'a str,
}Expand description
One option a FieldKind::Select offers.
Two strings, because the submitted value and the read label are different
facts and every renderer that has tried to collapse them has had to
un-collapse them later. makeover-webview invented this shape writing its
form emitter and it is taken here unchanged; moving it down rather than
re-deriving it is the point, since the second and third renderers were each
going to arrive at a near-miss of it.
Fields§
§value: &'a strWhat is submitted.
label: &'a strWhat is read.
Implementations§
Trait Implementations§
impl<'a> Copy for Choice<'a>
impl<'a> Eq for Choice<'a>
impl<'a> StructuralPartialEq for Choice<'a>
Auto Trait Implementations§
impl<'a> Freeze for Choice<'a>
impl<'a> RefUnwindSafe for Choice<'a>
impl<'a> Send for Choice<'a>
impl<'a> Sync for Choice<'a>
impl<'a> Unpin for Choice<'a>
impl<'a> UnsafeUnpin for Choice<'a>
impl<'a> UnwindSafe for Choice<'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