#[non_exhaustive]pub struct ComponentBinding {
pub action: String,
pub keys: Vec<String>,
pub description: String,
}Expand description
One thing a key does in a component, for a help overlay, a shortcut sheet or status-bar hints. A host lists it under the component’s registered name, and configuration can rebind it there.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.action: StringWhat it does, for code and configuration: down.
keys: Vec<String>The keys that do it, by name (see ComponentEvent::Key); the
first is the one to show.
description: StringWhat it does, for people: move down.
Implementations§
Source§impl ComponentBinding
impl ComponentBinding
pub fn new( action: impl Into<String>, keys: impl IntoIterator<Item = impl Into<String>>, description: impl Into<String>, ) -> ComponentBinding
Trait Implementations§
Source§impl Clone for ComponentBinding
impl Clone for ComponentBinding
Source§impl Debug for ComponentBinding
impl Debug for ComponentBinding
impl Eq for ComponentBinding
Source§impl PartialEq for ComponentBinding
impl PartialEq for ComponentBinding
impl StructuralPartialEq for ComponentBinding
Auto Trait Implementations§
impl Freeze for ComponentBinding
impl RefUnwindSafe for ComponentBinding
impl Send for ComponentBinding
impl Sync for ComponentBinding
impl Unpin for ComponentBinding
impl UnsafeUnpin for ComponentBinding
impl UnwindSafe for ComponentBinding
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.