routing::walk_state

Trait WalkStateUnit

Source
pub trait WalkStateUnit<Rhs = Self> {
    type Error: Into<RoutingError>;

    // Required methods
    fn validate_next(&self, next_state: &Rhs) -> Result<(), Self::Error>;
    fn finalize_error(&self) -> Self::Error;
}
Expand description

The payload of a walk state.

Required Associated Types§

Required Methods§

Source

fn validate_next(&self, next_state: &Rhs) -> Result<(), Self::Error>

Validates whether the next state in a walk state is valid or not when advancing or finalizing.

Source

fn finalize_error(&self) -> Self::Error

The error that is returned by the walk state when attempting to finalize with an invalid state.

Implementors§