pub struct SliceSpec {
pub start: Option<isize>,
pub stop: Option<isize>,
pub step: Option<isize>,
}Expand description
A slice specification for one axis, mirroring Python’s start:stop:step.
All fields are optional (represented by None), matching NumPy behaviour:
start: defaults to 0 (or end-1 if step < 0)stop: defaults to size (or before-start if step < 0)step: defaults to 1; must not be 0
Fields§
§start: Option<isize>Start index (inclusive). Negative counts from end.
stop: Option<isize>Stop index (exclusive). Negative counts from end.
step: Option<isize>Step size. Must not be zero.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SliceSpec
impl RefUnwindSafe for SliceSpec
impl Send for SliceSpec
impl Sync for SliceSpec
impl Unpin for SliceSpec
impl UnsafeUnpin for SliceSpec
impl UnwindSafe for SliceSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more