pub trait ComptimeIndex<I>: Index<I> {
// Provided method
fn ruda_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§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".