Skip to main content

KeyBindingLaws

Trait KeyBindingLaws 

Source
pub trait KeyBindingLaws<This>{
    // Required method
    fn key_binding_laws(&mut self) -> Result<()>;
}
Expand description

Authors the key-binding laws.

Required Methods§

Source

fn key_binding_laws(&mut self) -> Result<()>

Checks that every page binds its keys unambiguously and admits nothing it did not bind.

The laws checked are:

  1. no two bindings on one page are reached by the same keystroke;
  2. every keystroke a page binds denotes that binding;
  3. exit is bound on every page, and no other modified keystroke denotes anything;
  4. typed scalars denote insertion exactly on the pages holding a draft;
  5. a gated binding whose action has no meaning leaves the manager as it was.
§Errors

Returns the first violated law.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§