Trait EndHandler

Source
pub trait EndHandler {
    // Required method
    fn should_stop(&mut self, multipart: &Multipart) -> bool;
}
Expand description

The EndHandler trait is used to impose stopping rules for streams that otherwise would continue to create multiparts.

Required Methods§

Source

fn should_stop(&mut self, multipart: &Multipart) -> bool

should_stop determines whether or not a StreamSocket should stop producing values.

This method should be used if the stop signal sent to a given socket will be in-line with the rest of the messages that socket receives. If you want to have a socket controlled by another socket, see the ControlHandler trait.

Implementors§