path

Macro path 

Source
macro_rules! path {
    () => { ... };
    ($($seg:expr),+ $(,)?) => { ... };
    (@seg $seg:expr) => { ... };
}
Expand description

Construct a Path from a sequence of segments.

ยงExamples

use tirea_state::path;

// String literals become Key segments
let p = path!("users", "alice", "email");

// Numbers become Index segments
let p = path!("items", 0, "name");

// Mixed types
let p = path!("data", "list", 2, "value");