pub struct RangeFull;Expand description
An unbounded range (..).
RangeFull is primarily used as a slicing index, its shorthand is ...
It cannot serve as an Iterator because it doesn’t have a starting point.
§Examples
The .. syntax is a RangeFull:
It does not have an IntoIterator implementation, so you can’t use it in
a for loop directly. This won’t compile:
Used as a slicing index, RangeFull produces the full array as a slice.
Trait Implementations§
Source§impl<T> IntoBounds<T> for RangeFull
impl<T> IntoBounds<T> for RangeFull
1.28.0 (const: unstable) · Source§impl<T: ?Sized> RangeBounds<T> for RangeFull
impl<T: ?Sized> RangeBounds<T> for RangeFull
1.15.0 (const: unstable) · Source§impl<T> SliceIndex<[T]> for RangeFull
impl<T> SliceIndex<[T]> for RangeFull
Source§fn get(self, slice: &[T]) -> Option<&[T]>
fn get(self, slice: &[T]) -> Option<&[T]>
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a shared reference to the output at this location, if in
bounds.
Source§fn get_mut(self, slice: &mut [T]) -> Option<&mut [T]>
fn get_mut(self, slice: &mut [T]) -> Option<&mut [T]>
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a mutable reference to the output at this location, if in
bounds.
Source§unsafe fn get_unchecked(self, slice: *const [T]) -> *const [T]
unsafe fn get_unchecked(self, slice: *const [T]) -> *const [T]
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a pointer to the output at this location, without
performing any bounds checking. Read more
Source§unsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut [T]
unsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut [T]
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a mutable pointer to the output at this location, without
performing any bounds checking. Read more