Skip to main content

NavigationLaws

Trait NavigationLaws 

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

Authors the collection-navigation laws.

Required Methods§

Source

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

Checks that selection, expansion, and removal preserve stable queue identity.

The laws checked are:

  1. adding sources focuses the first new identity;
  2. selection advances in collection order and wraps at both ends;
  3. expanded details name the selected identity and move with it;
  4. removing the selected entry chooses a remaining neighbor;
  5. removing an expanded entry denotes the collection again;
  6. breadcrumbs are rooted at the collection and name the expanded identity.
§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§