[−][src]Macro smart_access::path
Constructs a pathlike type for AT
, DetachedPath
, and CpsBatch
.
The invocation path!(I1, I2, .. In)
resolves into
(..(((), I1), I2) .. In)
.
Usage example
type AccessIJ<CPS> = AT<CPS, path!(usize, usize)>; let mut foo = vec![vec![1,2], vec![3,4]]; let path: AccessIJ<_> = foo.at(0).at(1); type Batch2<CPS,F,G> = CpsBatch<CPS, path!(F, G)>; let mut bar = 42; let batch: Batch2<_,_,_> = bar.batch_ct().add(|x,_| *x + 1).add(|x,_| 2 * *x); type DetachedIJ<T> = DetachedPath<Vec<Vec<T>>, path!(usize, usize)>; let detached_path: DetachedIJ<f64> = detached_at(4).at(2);