pub trait MenuPresentationExt<This>where
This: NavigationStateAlg + QueueCatalogAlg + DraftStateAlg + OutputDraftAlg + InputDraftAlg + TextEditorStateAlg + DetailSelectionAlg,
This::Entry: QueueEntryAlg + RequestOptionsAlg,
This::Id: Copy + Eq,{
// Required methods
fn menu_items(&self) -> impl Iterator<Item = MenuItem>;
fn menu_item(
&self,
action: ManagerAction,
verb: impl Into<String>,
) -> MenuItem;
fn cursor_item(&self, verb: impl Into<String>) -> MenuItem;
fn choice_verb(&self, id: This::Id) -> &'static str;
fn space_verb(&self) -> String;
}Expand description
Derives the menu one page offers from the keys it binds and the actions it enables.
Required Methods§
States every entry the current page offers, in the order a reader scans them.
Exit closes every menu, because it is the one action every page offers.
States one entry naming one action, with the keys the page binds to it.
Sourcefn cursor_item(&self, verb: impl Into<String>) -> MenuItem
fn cursor_item(&self, verb: impl Into<String>) -> MenuItem
States the one entry walking a list, which both cursor directions reach.
Sourcefn choice_verb(&self, id: This::Id) -> &'static str
fn choice_verb(&self, id: This::Id) -> &'static str
Names what the chooser page chooses between for one request.
Sourcefn space_verb(&self) -> String
fn space_verb(&self) -> String
Names what Space would do to the selected entry, whether or not it is offered.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<This> MenuPresentationExt<This> for Thiswhere
This: NavigationStateAlg + QueueCatalogAlg + DraftStateAlg + OutputDraftAlg + InputDraftAlg + TextEditorStateAlg + DetailSelectionAlg,
This::Entry: QueueEntryAlg + RequestOptionsAlg,
This::Id: Copy + Eq,
Derives the menu one page offers from the keys it binds and the actions it enables.