pub struct LeaderState {
pub active: bool,
pub root: &'static [LeaderNode],
/* private fields */
}Fields§
§active: bool§root: &'static [LeaderNode]Implementations§
Source§impl LeaderState
impl LeaderState
pub fn new(root: &'static [LeaderNode]) -> Self
Sourcepub fn push(&mut self, c: char) -> LeaderResult
pub fn push(&mut self, c: char) -> LeaderResult
Handle a character key press while leader is active.
Sourcepub fn tick(&mut self) -> bool
pub fn tick(&mut self) -> bool
Call once per event-loop tick. Always returns false (no timeout).
Sourcepub fn current_entries(&self) -> &'static [LeaderNode]
pub fn current_entries(&self) -> &'static [LeaderNode]
The entries visible at the current depth (for rendering).
Auto Trait Implementations§
impl Freeze for LeaderState
impl RefUnwindSafe for LeaderState
impl Send for LeaderState
impl Sync for LeaderState
impl Unpin for LeaderState
impl UnsafeUnpin for LeaderState
impl UnwindSafe for LeaderState
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