PageBaseInterface

Trait PageBaseInterface 

Source
pub trait PageBaseInterface {
    // Provided methods
    fn update<'a>(
        &mut self,
        _title_of_subpages: Option<Box<dyn Iterator<Item = &'a str> + 'a>>,
    ) -> Result<PageNavigation, PageError> { ... }
    fn title(&self) -> &str { ... }
}
Expand description

Data structures that implement the Page trait are Pages and can be handled by the PageManager type

Provided Methods§

Source

fn update<'a>( &mut self, _title_of_subpages: Option<Box<dyn Iterator<Item = &'a str> + 'a>>, ) -> Result<PageNavigation, PageError>

Trigger a page-internal update and causes page-internal state modification

Is called by PageManager. Handles Page Lifetime management

Args: title_of_subpages: Iterator to titles of subpages (Optional)

Returns: Ok(<PageNavigation>) - In case update is went well, to indicate the which page to navigate to next. Error - Indicate an error. (Note: Could be on purpose to force a controlled gui process shutdown)

Source

fn title(&self) -> &str

Every page has a title - default is empty &str

Implementors§