pub struct Slice {
pub start: Object,
pub stop: Object,
pub step: Object,
}Expand description
slice(start, stop, step), holding whatever it was given.
Fields§
§start: ObjectWhere to start, or None for the near end.
stop: ObjectWhere to stop, or None for the far end.
step: ObjectHow far to move each time, or None for one.
Implementations§
Source§impl Slice
impl Slice
Sourcepub const fn new(start: Object, stop: Object, step: Object) -> Self
pub const fn new(start: Object, stop: Object, step: Object) -> Self
A slice from three values, any of which may be None.
Sourcepub fn repr(&self) -> String
pub fn repr(&self) -> String
What repr prints, which names all three parts even when none were
written down.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Slice
impl !Send for Slice
impl !Sync for Slice
impl !UnwindSafe for Slice
impl Freeze for Slice
impl Unpin for Slice
impl UnsafeUnpin 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