pub struct SliceArg {
pub start: Option<isize>,
pub stop: Option<isize>,
pub step: isize,
}Expand description
One slice specification per dimension: start:stop:step with Python semantics.
None bounds mean “from the beginning/end” in the step’s direction. Negative indices
count from the end, and out-of-range bounds are clamped.
Fields§
§start: Option<isize>First index, or None for the start in the step’s direction.
stop: Option<isize>One past the last index, or None for the end in the step’s direction.
step: isizeDistance between selected indices; must not be zero.
Implementations§
Trait Implementations§
impl Copy for SliceArg
impl Eq for SliceArg
Source§impl From<isize> for SliceArg
A single index i, keeping the dimension with size 1 (i:i+1, or the last element for
-1).
impl From<isize> for SliceArg
A single index i, keeping the dimension with size 1 (i:i+1, or the last element for
-1).
impl StructuralPartialEq for SliceArg
Auto Trait Implementations§
impl Freeze for SliceArg
impl RefUnwindSafe for SliceArg
impl Send for SliceArg
impl Sync for SliceArg
impl Unpin for SliceArg
impl UnsafeUnpin for SliceArg
impl UnwindSafe for SliceArg
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> Boilerplate for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more