Trait tokio_zmq::async::stream::ControlHandler [] [src]

pub trait ControlHandler {
    fn should_stop(&self, multipart: Multipart) -> bool;
}

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

Required Methods

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

It accepts a Multipart as input. This Multipart comes from the ControlledStream's associated control MultipartStream.

Implementors