dusk_node

Trait Filter

Source
pub trait Filter {
    // Required method
    fn filter(&mut self, msg: &Message) -> Result<()>;
}
Expand description

Filter is used by Network implementor to filter messages before re-routing them. It’s like the middleware in HTTP pipeline.

To avoid delaying other messages handling, the execution of any filter should be fast as it is performed in the message handler .

Required Methods§

Source

fn filter(&mut self, msg: &Message) -> Result<()>

Filters a message.

Implementors§