pub struct PickerAction<'a> {
pub key: char,
pub label: &'a str,
pub handler: ActionHandler<'a>,
}Expand description
A caller-defined action bound to a key.
When the user presses key, the picker calls handler with an
ActionContext that provides the current section/item coordinates and
mutable terminal access. The handler may take over the screen (e.g., for a
preview) and should return when done — the picker redraws automatically.
Fields§
§key: char§label: &'a str§handler: ActionHandler<'a>Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PickerAction<'a>
impl<'a> !Send for PickerAction<'a>
impl<'a> !Sync for PickerAction<'a>
impl<'a> !UnwindSafe for PickerAction<'a>
impl<'a> Freeze for PickerAction<'a>
impl<'a> Unpin for PickerAction<'a>
impl<'a> UnsafeUnpin for PickerAction<'a>
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