pub trait MatchingReceiver {
    type F;

    fn start_receive(&self, m: MatchRule<'static>, f: Self::F) -> Token;
    fn stop_receive(&self, id: Token) -> Option<(MatchRule<'static>, Self::F)>;
}
Expand description

Abstraction over different connections that receive data

Required Associated Types§

Type of callback

Required Methods§

Add a callback to be called in case a message matches.

Returns an id that can be used to remove the callback.

Remove a previously added callback.

Implementors§