pub struct Slice {
pub start: Option<i64>,
pub stop: Option<i64>,
pub step: i64,
}Expand description
A slice with an optional start and stop and a step, like Python’s
start:stop:step. Rust ranges convert to slices with step 1.
Fields§
§start: Option<i64>The first index (negative counts from the end), or None.
stop: Option<i64>One past the last index (negative counts from the end), or None.
step: i64The step, not zero.
Implementations§
Trait Implementations§
impl Copy for Slice
impl Eq for Slice
impl StructuralPartialEq for Slice
Auto Trait Implementations§
impl Freeze for Slice
impl RefUnwindSafe for Slice
impl Send for Slice
impl Sync for Slice
impl Unpin for Slice
impl UnsafeUnpin for Slice
impl UnwindSafe for Slice
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
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<B, T> IntoIndices<B> for T
impl<B, T> IntoIndices<B> for T
Source§fn into_indices(self) -> Indices<B>
fn into_indices(self) -> Indices<B>
The components.