pub struct State<S: Selection, C> {
pub current: Option<(u32, S)>,
pub input: String,
pub col: Option<usize>,
pub context: Arc<C>,
pub iterations: u32,
pub preview_show: bool,
pub layout: [Rect; 4],
/* private fields */
}Fields§
§current: Option<(u32, S)>§input: String§col: Option<usize>§context: Arc<C>§iterations: u32§preview_show: bool§layout: [Rect; 4]Implementations§
Source§impl<S: Selection, C> State<S, C>
impl<S: Selection, C> State<S, C>
pub fn new(context: Arc<C>) -> Self
pub fn take_current(&mut self) -> Option<S>
pub fn preview_payload(&self) -> &String
pub fn contains(&self, event: &Event) -> bool
pub fn insert(&mut self, event: Event) -> bool
pub fn preview_set_payload(&self) -> &Option<String>
pub fn update_current(&mut self, new_current: Option<(u32, S)>) -> bool
pub fn update_input(&mut self, new_input: &str) -> bool
pub fn update_preview(&mut self, context: &str) -> bool
pub fn update_preview_set(&mut self, context: &str) -> bool
pub fn update_preview_unset(&mut self)
pub fn update_layout(&mut self, context: [Rect; 4]) -> bool
pub fn update_preview_ui(&mut self, preview_ui: &PreviewUI) -> bool
pub fn update<'a, T: MMItem>(&'a mut self, picker_ui: &'a PickerUI<'_, T, S, C>)
pub fn dispatcher<'a, T: MMItem>( &'a self, ui: &'a UI, picker_ui: &'a PickerUI<'_, T, S, C>, preview_ui: Option<&PreviewUI>, ) -> (EphemeralState<'a, T, S, C>, Effects)
pub fn process_effects(&mut self, effects: Effects)
pub fn events(&mut self) -> HashSet<Event>
Trait Implementations§
Auto Trait Implementations§
impl<S, C> Freeze for State<S, C>where
S: Freeze,
impl<S, C> RefUnwindSafe for State<S, C>where
S: RefUnwindSafe,
C: RefUnwindSafe,
impl<S, C> Send for State<S, C>
impl<S, C> Sync for State<S, C>
impl<S, C> Unpin for State<S, C>where
S: Unpin,
impl<S, C> UnwindSafe for State<S, C>where
C: RefUnwindSafe,
S: 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> 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