receive

Function receive 

Source
pub fn receive<E: ErrorType, T: FnOnce(Vec<u8>) -> bool + Send + 'static>(
    predicate: T,
) -> impl BehaviourFunction<E>
Expand description

Returns a BehaviourFunction which will assert that a message is waiting, and that that message matches the provided predicate.