Macro calloop::batch_reregister

source ·
macro_rules! batch_reregister {
    ($poll:ident, $token_fac:ident, $( $source:expr ),* $(,)?) => { ... };
}
Expand description

Reregister a set of event sources. Effectively calls EventSource::reregister() for all the sources provided.

Usage:

calloop::batch_reregister!(
    poll, token_factory,
    self.source_one,
    self.source_two,
    self.source_three,
    self.source_four,
)

Note that there is no scope for customisation; if you need to do special things with a particular source, you’ll need to leave it off the list. Also note that this only does try-or-early-return error handling in the order that you list the sources; if you need anything else, don’t use this macro.