pub struct ChoiceOptions<'a> { /* private fields */ }
Expand description
Writer for a choice options array.
This struct is created by Field::choice_options
.
Implementations§
source§impl<'a> ChoiceOptions<'a>
impl<'a> ChoiceOptions<'a>
sourcepub fn options<'b>(
&mut self,
values: impl IntoIterator<Item = TextStr<'b>>,
) -> &mut Self
pub fn options<'b>( &mut self, values: impl IntoIterator<Item = TextStr<'b>>, ) -> &mut Self
Add options with the given values.
sourcepub fn export(
&mut self,
value: TextStr<'_>,
export_value: TextStr<'_>,
) -> &mut Self
pub fn export( &mut self, value: TextStr<'_>, export_value: TextStr<'_>, ) -> &mut Self
Add an option with the given value and export value.
sourcepub fn exports<'b>(
&mut self,
values: impl IntoIterator<Item = (TextStr<'b>, TextStr<'b>)>,
) -> &mut Self
pub fn exports<'b>( &mut self, values: impl IntoIterator<Item = (TextStr<'b>, TextStr<'b>)>, ) -> &mut Self
Add options with the given pairs of value and export value.
Methods from Deref<Target = Array<'a>>§
sourcepub fn item<T: Primitive>(&mut self, value: T) -> &mut Self
pub fn item<T: Primitive>(&mut self, value: T) -> &mut Self
Write an item with a primitive value.
This is a shorthand for array.push().primitive(value)
.
sourcepub fn items<T: Primitive>(
&mut self,
values: impl IntoIterator<Item = T>,
) -> &mut Self
pub fn items<T: Primitive>( &mut self, values: impl IntoIterator<Item = T>, ) -> &mut Self
Write a sequence of items with primitive values.
Trait Implementations§
source§impl<'a> Deref for ChoiceOptions<'a>
impl<'a> Deref for ChoiceOptions<'a>
source§impl<'a> DerefMut for ChoiceOptions<'a>
impl<'a> DerefMut for ChoiceOptions<'a>
source§impl<'a, 'any> Rewrite<'a> for ChoiceOptions<'any>
impl<'a, 'any> Rewrite<'a> for ChoiceOptions<'any>
source§type Output = ChoiceOptions<'a>
type Output = ChoiceOptions<'a>
The writer with the rewritten lifetime.
Auto Trait Implementations§
impl<'a> Freeze for ChoiceOptions<'a>
impl<'a> RefUnwindSafe for ChoiceOptions<'a>
impl<'a> Send for ChoiceOptions<'a>
impl<'a> Sync for ChoiceOptions<'a>
impl<'a> Unpin for ChoiceOptions<'a>
impl<'a> !UnwindSafe for ChoiceOptions<'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