Struct ambient_ui::select::ListSelect
source · pub struct ListSelect {
pub value: usize,
pub on_change: Cb<dyn Fn(usize) + Sync + Send>,
pub items: Vec<Element>,
pub inline: bool,
}
Expand description
A DropdownSelect that shows the current item for you automatically.
Fields§
§value: usize
The index of the currently selected item.
on_change: Cb<dyn Fn(usize) + Sync + Send>
The callback to call when an item is selected. Called with the index of the item.
items: Vec<Element>
The items to select from.
inline: bool
Whether or not the button used for the dropdown should be inline or not.
Trait Implementations§
source§impl Clone for ListSelect
impl Clone for ListSelect
source§fn clone(&self) -> ListSelect
fn clone(&self) -> ListSelect
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ListSelect
impl Debug for ListSelect
source§impl ElementComponent for ListSelect
impl ElementComponent for ListSelect
Auto Trait Implementations§
impl !RefUnwindSafe for ListSelect
impl Send for ListSelect
impl Sync for ListSelect
impl Unpin for ListSelect
impl !UnwindSafe for ListSelect
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> Downcast for T
impl<T> Downcast for T
source§impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
source§impl<T> ElementComponentName for T
impl<T> ElementComponentName for T
source§fn element_component_name(&self) -> &'static str
fn element_component_name(&self) -> &'static str
Returns the name of the type implementing ElementComponent.