Macro teo_runtime::teon
source · macro_rules! teon { (@array [$($elems:expr,)*]) => { ... }; (@array [$($elems:expr),*]) => { ... }; (@array [$($elems:expr,)*] null $($rest:tt)*) => { ... }; (@array [$($elems:expr,)*] true $($rest:tt)*) => { ... }; (@array [$($elems:expr,)*] false $($rest:tt)*) => { ... }; (@array [$($elems:expr,)*] [$($array:tt)*] $($rest:tt)*) => { ... }; (@array [$($elems:expr,)*] {$($map:tt)*} $($rest:tt)*) => { ... }; (@array [$($elems:expr,)*] $next:expr, $($rest:tt)*) => { ... }; (@array [$($elems:expr,)*] $last:expr) => { ... }; (@array [$($elems:expr),*] , $($rest:tt)*) => { ... }; (@array [$($elems:expr),*] $unexpected:tt $($rest:tt)*) => { ... }; (@object $object:ident () () ()) => { ... }; (@object $object:ident [$($key:tt)+] ($value:expr) , $($rest:tt)*) => { ... }; (@object $object:ident [$($key:tt)+] ($value:expr) $unexpected:tt $($rest:tt)*) => { ... }; (@object $object:ident [$($key:tt)+] ($value:expr)) => { ... }; (@object $object:ident ($($key:tt)+) (: null $($rest:tt)*) $copy:tt) => { ... }; (@object $object:ident ($($key:tt)+) (: true $($rest:tt)*) $copy:tt) => { ... }; (@object $object:ident ($($key:tt)+) (: false $($rest:tt)*) $copy:tt) => { ... }; (@object $object:ident ($($key:tt)+) (: [$($array:tt)*] $($rest:tt)*) $copy:tt) => { ... }; (@object $object:ident ($($key:tt)+) (: {$($map:tt)*} $($rest:tt)*) $copy:tt) => { ... }; (@object $object:ident ($($key:tt)+) (: $value:expr , $($rest:tt)*) $copy:tt) => { ... }; (@object $object:ident ($($key:tt)+) (: $value:expr) $copy:tt) => { ... }; (@object $object:ident ($($key:tt)+) (:) $copy:tt) => { ... }; (@object $object:ident ($($key:tt)+) () $copy:tt) => { ... }; (@object $object:ident () (: $($rest:tt)*) ($colon:tt $($copy:tt)*)) => { ... }; (@object $object:ident ($($key:tt)*) (, $($rest:tt)*) ($comma:tt $($copy:tt)*)) => { ... }; (@object $object:ident () (($key:expr) : $($rest:tt)*) $copy:tt) => { ... }; (@object $object:ident ($($key:tt)*) (: $($unexpected:tt)+) $copy:tt) => { ... }; (@object $object:ident ($($key:tt)*) ($tt:tt $($rest:tt)*) $copy:tt) => { ... }; (null) => { ... }; ([]) => { ... }; ([ $($tt:tt)+ ]) => { ... }; ({}) => { ... }; ({ $($tt:tt)+ }) => { ... }; ($other:expr) => { ... }; }
Expand description
Construct a teo::teon::Value from a Teo object notation literal. This is inspired by
serde_json package and bson package.
let value = teon!({
"code": 200,
"success": true,
"payload": {
"features": [
"teo",
"teon"
]
}
});