pub struct KeyBindingRegistry {
pub format_version: u8,
pub bindings: Vec<KeyBinding>,
}Expand description
Versioned, content-addressed flat set of key bindings.
Fields§
§format_version: u8§bindings: Vec<KeyBinding>Implementations§
Source§impl KeyBindingRegistry
impl KeyBindingRegistry
pub const FORMAT_VERSION: u8 = 1
pub fn new(bindings: Vec<KeyBinding>) -> Self
pub fn empty() -> Self
pub fn encode(&self) -> Result<Vec<u8>, KeyBindingError>
pub fn decode(bytes: &[u8]) -> Result<Self, KeyBindingError>
Sourcepub fn content_hash(&self) -> Result<ContentHash, KeyBindingError>
pub fn content_hash(&self) -> Result<ContentHash, KeyBindingError>
Stable address of the registry’s validated canonical encoding.
pub fn validate(&self) -> Result<(), KeyBindingError>
Trait Implementations§
Source§impl Clone for KeyBindingRegistry
impl Clone for KeyBindingRegistry
Source§fn clone(&self) -> KeyBindingRegistry
fn clone(&self) -> KeyBindingRegistry
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 moreSource§impl Debug for KeyBindingRegistry
impl Debug for KeyBindingRegistry
Source§impl<'de> Deserialize<'de> for KeyBindingRegistry
impl<'de> Deserialize<'de> for KeyBindingRegistry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KeyBindingRegistry
Source§impl PartialEq for KeyBindingRegistry
impl PartialEq for KeyBindingRegistry
Source§impl Serialize for KeyBindingRegistry
impl Serialize for KeyBindingRegistry
impl StructuralPartialEq for KeyBindingRegistry
Auto Trait Implementations§
impl Freeze for KeyBindingRegistry
impl RefUnwindSafe for KeyBindingRegistry
impl Send for KeyBindingRegistry
impl Sync for KeyBindingRegistry
impl Unpin for KeyBindingRegistry
impl UnsafeUnpin for KeyBindingRegistry
impl UnwindSafe for KeyBindingRegistry
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