Trait RouterState

Source
pub trait RouterState:
    PartialEq
    + Storable
    + Default
    + Clone
    + 'static {
    // Required method
    fn restored(&mut self);

    // Provided methods
    fn update(&mut self, new_state: Self) { ... }
    fn on_update(&mut self) { ... }
}

Required Methods§

Source

fn restored(&mut self)

Called when the state restored.

For the case when some data should be reset of expired.

Provided Methods§

Source

fn update(&mut self, new_state: Self)

Source

fn on_update(&mut self)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§