pub struct MMState<'a, 'b: 'a, T: SSS, S: Selection> {
pub ui: &'a mut UI,
pub picker_ui: &'a mut PickerUI<'b, T, S>,
pub footer_ui: &'a mut DisplayUI,
pub preview_ui: &'a mut Option<PreviewUI>,
/* private fields */
}Fields§
§ui: &'a mut UI§picker_ui: &'a mut PickerUI<'b, T, S>§preview_ui: &'a mut Option<PreviewUI>Implementations§
Source§impl<'a, 'b: 'a, T: SSS, S: Selection> MMState<'a, 'b, T, S>
impl<'a, 'b: 'a, T: SSS, S: Selection> MMState<'a, 'b, T, S>
pub fn previewer_area(&self) -> Option<&Rect>
pub fn ui_area(&self) -> &Rect
pub fn current_item(&self) -> Option<S>
Sourcepub fn current_raw(&self) -> Option<&T>
pub fn current_raw(&self) -> Option<&T>
Same as current_item, but without applying the identifier.
Sourcepub fn map_selected_to_vec<U>(&self, f: impl FnMut(&S) -> U) -> Vec<U>
pub fn map_selected_to_vec<U>(&self, f: impl FnMut(&S) -> U) -> Vec<U>
Runs f on selections if nonempty, otherwise, the current item
pub fn injector(&self) -> WorkerInjector<T>
pub fn widths(&self) -> &Vec<u16>
pub fn status(&self) -> &Status
pub fn selections(&self) -> &Selector<T, S>
pub fn get_content_and_index(&self) -> (String, u32)
pub fn make_env_vars(&self) -> EnvVars
pub fn stash_preview_visibility(&mut self, show: Option<bool>)
Methods from Deref<Target = State>§
pub fn contains(&self, event: Event) -> bool
pub fn payload(&self) -> &String
pub fn interrupt(&self) -> Interrupt
pub fn set_interrupt(&mut self, interrupt: Interrupt, payload: String)
pub fn clear_interrupt(&mut self)
pub fn insert(&mut self, event: Event)
pub fn overlay_index(&self) -> Option<usize>
pub fn preview_set_payload(&self) -> Option<String>
pub fn preview_payload(&self) -> &String
pub fn stashed_preview_visibility(&self) -> Option<bool>
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'b, T, S> Freeze for MMState<'a, 'b, T, S>
impl<'a, 'b, T, S> !RefUnwindSafe for MMState<'a, 'b, T, S>
impl<'a, 'b, T, S> Send for MMState<'a, 'b, T, S>where
S: Send,
impl<'a, 'b, T, S> Sync for MMState<'a, 'b, T, S>where
S: Send,
impl<'a, 'b, T, S> Unpin for MMState<'a, 'b, T, S>
impl<'a, 'b, T, S> UnsafeUnpin for MMState<'a, 'b, T, S>
impl<'a, 'b, T, S> !UnwindSafe for MMState<'a, 'b, T, S>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> TransformExt for T
impl<T> TransformExt for T
fn transform<Q>(self, transform: impl FnOnce(T) -> Q) -> Q
fn modify<Q>(self, modify: impl FnOnce(&mut T) -> Q) -> T
Source§fn modify_if<Q>(self, condition: bool, modify: impl FnOnce(&mut T) -> Q) -> T
fn modify_if<Q>(self, condition: bool, modify: impl FnOnce(&mut T) -> Q) -> T
Example Read more