Trait RangesArg
pub trait RangesArg<const D2: usize> {
// Required method
fn into_ranges(self, shape: Shape) -> [Range<usize>; D2];
// Provided methods
fn handle_negative_index(start: i64, end: i64, dim: usize) -> (usize, usize) { ... }
fn clamp_range(start: usize, end: usize, dim: usize) -> (usize, usize) { ... }
}
Expand description
Trait used for slice arguments
Required Methods§
fn into_ranges(self, shape: Shape) -> [Range<usize>; D2]
fn into_ranges(self, shape: Shape) -> [Range<usize>; D2]
Converts into a set of ranges to [core::ops::Range<usize>; D2]
for the tensor.slice()
function
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.