macro_rules! over {
    ($type:ty : $selector:tt, $pred:expr) => { ... };
}
Expand description

A macro for allowing more ergonomic projection of predicates ‘over’ some projection function that focuses on a subset of a data type.

Specify the name of the parent type, the field to focus on, and then pass in the predicate over that field

usage: over!(Type:field, predicate)

e.g.

let predicate = over!(RemoteDevice:name, P::equal(Some("INCORRECT_NAME".to_string())));