Type Alias drink_next::MessageMock

source ·
pub type MessageMock = Box<dyn Fn(Vec<u8>) -> MockedCallResult + Send + Sync>;
Expand description

An untyped message mock.

Notice that in the end, we cannot operate on specific argument/return types. Rust won’t let us have a collection of differently typed closures. Fortunately, we can assume that all types are en/decodable, so we can use Vec<u8> as a common denominator.

Aliased Type§

struct MessageMock(/* private fields */);