[][src]Macro avocado::flt

macro_rules! flt {
    ($($path:tt: $value:expr),*) => { ... };
    ($($path:tt: $value:expr,)*) => { ... };
}

Convenience macro for constructing a FilterDoc.

Example:

let repo_filter = flt! {
    "name": regex("^Avocado.*$"),
    "author.username": "H2CO3",
    "release_date": flt! {
        "year": 2018,
    },
    "stargazers": Type(BsonType::ARRAY),
    "downloads": ne(1337) // trailing comma is allowed but optional
};