pub struct Choices<M> { /* private fields */ }Expand description
Options to pick from on a Notice, like the answers to a question: one, which a click sends,
or several, checked and then sent together.
Implementations§
Source§impl<M> Choices<M>
impl<M> Choices<M>
Sourcepub fn many() -> Self
pub fn many() -> Self
A click on an option sends its message, to check or uncheck it, and
on_send sends what’s checked.
Sourcepub fn option(
self,
label: impl Into<String>,
description: Option<String>,
picked: bool,
on_pick: M,
) -> Self
pub fn option( self, label: impl Into<String>, description: Option<String>, picked: bool, on_pick: M, ) -> Self
An option, with a line saying what it means, and whether it’s checked.
Sourcepub fn recommended(self) -> Self
pub fn recommended(self) -> Self
The option just added is the one to suggest.
Auto Trait Implementations§
impl<M> Freeze for Choices<M>where
ChoicesParts<M>: Freeze,
impl<M> RefUnwindSafe for Choices<M>where
ChoicesParts<M>: RefUnwindSafe,
impl<M> Send for Choices<M>where
ChoicesParts<M>: Send,
impl<M> Sync for Choices<M>where
ChoicesParts<M>: Sync,
impl<M> Unpin for Choices<M>where
ChoicesParts<M>: Unpin,
impl<M> UnsafeUnpin for Choices<M>where
ChoicesParts<M>: UnsafeUnpin,
impl<M> UnwindSafe for Choices<M>where
ChoicesParts<M>: UnwindSafe,
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