pub struct SelectionModel<S, T>{ /* private fields */ }
Implementations§
Source§impl<S, T> SelectionModel<S, T>
impl<S, T> SelectionModel<S, T>
pub fn new() -> Self
pub fn set_multi_select(&mut self, multi_select: bool)
pub fn get(&self, key: &S) -> Option<&T>
pub fn get_mut(&mut self, key: &S) -> Option<&mut T>
pub fn get_node(&self, key: &S) -> Option<&TreeNode<T, S>>
pub fn get_node_mut(&mut self, key: &S) -> Option<&mut TreeNode<T, S>>
pub fn clear_selection(&mut self)
pub fn select(&mut self, key: &S)
pub fn toggle(&mut self, key: &S)
pub fn selection_mut(&mut self) -> Vec<&mut T>
pub fn selection(&self) -> Vec<&T>
pub fn get_selected_keys(&self) -> Vec<&S>
pub fn get_owned_selected_keys(&self) -> Vec<S>
pub fn remove_item(&mut self, key: &S) -> Option<T>
pub fn is_selected(&self, key: &S) -> bool
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<S, T> Clone for SelectionModel<S, T>
impl<S, T> Clone for SelectionModel<S, T>
Source§fn clone(&self) -> SelectionModel<S, T>
fn clone(&self) -> SelectionModel<S, T>
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<S, T> Debug for SelectionModel<S, T>
impl<S, T> Debug for SelectionModel<S, T>
Source§impl<S, T> Default for SelectionModel<S, T>
impl<S, T> Default for SelectionModel<S, T>
Source§impl<S, T> PartialEq for SelectionModel<S, T>
impl<S, T> PartialEq for SelectionModel<S, T>
impl<S, T> StructuralPartialEq for SelectionModel<S, T>
Auto Trait Implementations§
impl<S, T> Freeze for SelectionModel<S, T>
impl<S, T> RefUnwindSafe for SelectionModel<S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for SelectionModel<S, T>
impl<S, T> Sync for SelectionModel<S, T>
impl<S, T> Unpin for SelectionModel<S, T>
impl<S, T> UnwindSafe for SelectionModel<S, T>where
S: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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