pub trait KeyBindingLaws<This>where
This: NavigationStateAlg + QueueCatalogAlg + QueueAppendAlg + QueueRemoveAlg + QueuePauseAlg + QueueDuplicateAlg + QueueFormatEditAlg + FormatCatalogStateAlg + QueueDryRunAlg + RehearsalStateAlg + TransferStateAlg + DetailSelectionAlg + DraftStateAlg + OutputDraftAlg + InputDraftAlg + QueueOutputAlg + QueueSourceAlg + SourceMetadataAlg + TextEditorStateAlg + ManagerStatusAlg + SafeExitAlg + SourceRequestAlg + SubmissionAlg + MediaOptionsAlg + OutputChoiceAlg,
This::Entry: QueueEntryAlg + RequestOptionsAlg,
This::Id: Copy + Eq,{
// Required method
fn key_binding_laws(&mut self) -> Result<()>;
}Expand description
Authors the key-binding laws.
Required Methods§
Sourcefn key_binding_laws(&mut self) -> Result<()>
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:
- no two bindings on one page are reached by the same keystroke;
- every keystroke a page binds denotes that binding;
- exit is bound on every page, and no other modified keystroke denotes anything;
- typed scalars denote insertion exactly on the pages holding a draft;
- 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§
impl<This> KeyBindingLaws<This> for Thiswhere
This: NavigationStateAlg + QueueCatalogAlg + QueueAppendAlg + QueueRemoveAlg + QueuePauseAlg + QueueDuplicateAlg + QueueFormatEditAlg + FormatCatalogStateAlg + QueueDryRunAlg + RehearsalStateAlg + TransferStateAlg + DetailSelectionAlg + DraftStateAlg + OutputDraftAlg + InputDraftAlg + QueueOutputAlg + QueueSourceAlg + SourceMetadataAlg + TextEditorStateAlg + ManagerStatusAlg + SafeExitAlg + SourceRequestAlg + SubmissionAlg + MediaOptionsAlg + OutputChoiceAlg,
This::Entry: QueueEntryAlg + RequestOptionsAlg,
This::Id: Copy + Eq,
Authors the key-binding laws.