pub struct LeaderNode {
pub key: char,
pub label: &'static str,
pub children: &'static [LeaderNode],
pub is_divider: bool,
}Expand description
One entry in a leader menu level.
label is the full descriptive word shown to the user (e.g. "navigate",
"find", "create"). The key character is highlighted inline if it
appears in label, otherwise it is shown as a [k] prefix.
Use LeaderNode::divider() to insert a visual separator between sections.
Fields§
§key: char§label: &'static str§children: &'static [LeaderNode]§is_divider: boolImplementations§
Source§impl LeaderNode
impl LeaderNode
Trait Implementations§
Source§impl Clone for LeaderNode
impl Clone for LeaderNode
Source§fn clone(&self) -> LeaderNode
fn clone(&self) -> LeaderNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LeaderNode
Auto Trait Implementations§
impl Freeze for LeaderNode
impl RefUnwindSafe for LeaderNode
impl Send for LeaderNode
impl Sync for LeaderNode
impl Unpin for LeaderNode
impl UnsafeUnpin for LeaderNode
impl UnwindSafe for LeaderNode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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