pub struct ChoiceBuilder { /* private fields */ }Expand description
Option set of a Choice, built inside SystemOneRequest::choice.
Implementations§
Source§impl ChoiceBuilder
impl ChoiceBuilder
Sourcepub fn option(
self,
name: impl Into<String>,
description: impl Into<String>,
) -> Self
pub fn option( self, name: impl Into<String>, description: impl Into<String>, ) -> Self
An option with a rubric description.
Sourcepub fn option_plain(self, name: impl Into<String>) -> Self
pub fn option_plain(self, name: impl Into<String>) -> Self
An option that needs no description.
Sourcepub fn options_plain<K: Into<String>>(
self,
names: impl IntoIterator<Item = K>,
) -> Self
pub fn options_plain<K: Into<String>>( self, names: impl IntoIterator<Item = K>, ) -> Self
Many undescribed options at once.
Sourcepub fn options<K, V>(self, pairs: impl IntoIterator<Item = (K, V)>) -> Self
pub fn options<K, V>(self, pairs: impl IntoIterator<Item = (K, V)>) -> Self
Many described options at once.
Sourcepub fn none_of_the_above(self, description: impl Into<String>) -> Self
pub fn none_of_the_above(self, description: impl Into<String>) -> Self
The abstain option (none_of_the_above). A Choice always picks something; this is
how the model says nothing in the list fits.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChoiceBuilder
impl RefUnwindSafe for ChoiceBuilder
impl Send for ChoiceBuilder
impl Sync for ChoiceBuilder
impl Unpin for ChoiceBuilder
impl UnsafeUnpin for ChoiceBuilder
impl UnwindSafe for ChoiceBuilder
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