ComptimeIndex

Trait ComptimeIndex 

Source
pub trait ComptimeIndex<I>: Index<I> {
    // Provided method
    fn cube_idx(&self, i: I) -> &Self::Output { ... }
}
Expand description

Workaround for comptime indexing, since the helper that replaces index operators doesn’t know about whether a variable is comptime. Has the same signature in unexpanded code, so it will automatically dispatch the correct one.

Provided Methods§

Source

fn cube_idx(&self, i: I) -> &Self::Output

Implementors§

Source§

impl<I, T: Index<I>> ComptimeIndex<I> for T