Macro ydb_struct

Source
macro_rules! ydb_struct {
    (
        $($field_name:expr => $val:expr),+ $(,)?
    ) => { ... };
}
Expand description

Sugar for manual construct structs Example:

 use ydb::{Value, ydb_struct};
 let s_manual = Value::struct_from_fields(vec![
    ("field1".to_string(), 1.into()),
    ("field2".to_string(), "test".into()),
 ]);

 let s_macros = ydb_struct!(
    "field1" => 1,
    "field2" => "test"
 );
 assert!(s_manual == s_macros)