Trait salvo_core::routing::filters::PathWisp

source ·
pub trait PathWisp: Send + Sync + Debug + 'static {
    // Required method
    fn detect(&self, state: &mut PathState) -> bool;

    // Provided method
    fn validate(&self) -> Result<(), String> { ... }
}
Expand description

PathWisp

Required Methods§

source

fn detect(&self, state: &mut PathState) -> bool

Detect is that path matched.

Provided Methods§

source

fn validate(&self) -> Result<(), String>

Validate the wisp. Panic if invalid.

Implementors§