pub struct Choice<'a> { /* private fields */ }Expand description
Choice widget.
Select one of a list. No editable mode for this one.
Implementations§
source§impl<'a> Choice<'a>
impl<'a> Choice<'a>
pub fn new() -> Self
Style for the down button.
sourcepub fn select_style(self, style: Style) -> Self
pub fn select_style(self, style: Style) -> Self
Selection in the list.
sourcepub fn focus_style(self, style: Style) -> Self
pub fn focus_style(self, style: Style) -> Self
Focused style.
sourcepub fn popup_placement(self, placement: Placement) -> Self
pub fn popup_placement(self, placement: Placement) -> Self
Placement of the popup.
Default Default is BelowOrAbove.
sourcepub fn popup_boundary(self, boundary: Rect) -> Self
pub fn popup_boundary(self, boundary: Rect) -> Self
Outer boundary for the popup.
sourcepub fn popup_len(self, len: u16) -> Self
pub fn popup_len(self, len: u16) -> Self
Override the popup length.
Default Defaults to the number of items or 5.
sourcepub fn popup_style(self, style: Style) -> Self
pub fn popup_style(self, style: Style) -> Self
Base style for the popup.
sourcepub fn popup_block(self, block: Block<'a>) -> Self
pub fn popup_block(self, block: Block<'a>) -> Self
Block for the popup.
sourcepub fn into_widgets(self) -> (RenderChoice<'a>, RenderChoicePopup<'a>)
pub fn into_widgets(self) -> (RenderChoice<'a>, RenderChoicePopup<'a>)
Choice itself doesn’t render.
This builds the widgets from the parameters set for Choice.
Trait Implementations§
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> !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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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