pub struct Indices {
pub start: isize,
pub stop: isize,
pub step: isize,
pub len: usize,
}Expand description
A slice resolved against the length of a particular sequence.
Signed, because a slice walking backwards stops just before the front of the sequence and there is no unsigned way to say that.
Fields§
§start: isizeThe first offset, which is not visited when Indices::len is zero.
stop: isizeOne past the last offset, in the direction of travel.
step: isizeHow far to move each time. Never zero, negative when walking backwards.
len: usizeHow many elements this selects, which is the length of the result.
Implementations§
Trait Implementations§
impl Copy for Indices
impl Eq for Indices
impl StructuralPartialEq for Indices
Auto Trait Implementations§
impl Freeze for Indices
impl RefUnwindSafe for Indices
impl Send for Indices
impl Sync for Indices
impl Unpin for Indices
impl UnsafeUnpin for Indices
impl UnwindSafe for Indices
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