pub struct State {
pub preview_set_payload: Option<String>,
pub preview_payload: String,
pub should_quit: bool,
pub should_quit_nomatch: bool,
/* private fields */
}Fields§
§preview_set_payload: Option<String>The String passed to SetPreview
preview_payload: StringThe payload left by crate::action::Action::Preview
should_quit: boolSetting this to true finishes the picker with the contents of Selector.
If Selector is disabled, the picker finishes with the current item.
If there are no items to finish with, the picker finishes with crate::errors::MatchError::Abort(0).
should_quit_nomatch: boolSetting this to true finishes the picker with crate::MatchError::NoMatch.
Implementations§
Source§impl State
impl State
pub fn new() -> Self
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 Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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