Macro props

Source
macro_rules! props {
    () => { ... };
    ($($key:expr => $value:expr),* $(,)?) => { ... };
}
Expand description

Creates array of pairs which each represent the property key and corresponding value.

ยงExample Use

use helix_db::props;
use helix_db::protocol::value::Value;

let properties: Vec<(String, Value)> = props! {
    "name" => "Will",
    "age" => 21,
};

assert_eq!(properties.len(), 2);