pub struct State<T> { /* private fields */ }Expand description
The local state of a ComboBox.
Implementations§
Source§impl<T> State<T>
impl<T> State<T>
Sourcepub fn with_selection(options: Vec<T>, selection: Option<&T>) -> Self
pub fn with_selection(options: Vec<T>, selection: Option<&T>) -> Self
Sourcepub fn options(&self) -> &[T]
pub fn options(&self) -> &[T]
Returns the options of the State.
These are the options provided when the State
was constructed with State::new.
Sourcepub fn into_options(self) -> Vec<T>
pub fn into_options(self) -> Vec<T>
Returns ownership of the options of the State.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for State<T>
impl<T> !RefUnwindSafe for State<T>
impl<T> Send for State<T>where
T: Send,
impl<T> !Sync for State<T>
impl<T> Unpin for State<T>where
T: Unpin,
impl<T> UnsafeUnpin for State<T>
impl<T> UnwindSafe for State<T>where
T: 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