pub struct Clamp<Idx>(pub Idx);🔬This is a nightly-only experimental API. (
sliceindex_wrappers)Expand description
Clamps an index, guaranteeing that it will only access valid elements of the slice.
§Examples
#![feature(sliceindex_wrappers)]
use core::index::Clamp;
let s: &[usize] = &[0, 1, 2, 3];
assert_eq!(&3, &s[Clamp(6)]);
assert_eq!(&[1, 2, 3], &s[Clamp(1..6)]);
assert_eq!(&[] as &[usize], &s[Clamp(5..6)]);
assert_eq!(&[0, 1, 2, 3], &s[Clamp(..6)]);
assert_eq!(&[0, 1, 2, 3], &s[Clamp(..=6)]);
assert_eq!(&[] as &[usize], &s[Clamp(6..)]);Tuple Fields§
§0: Idx🔬This is a nightly-only experimental API. (
sliceindex_wrappers)Trait Implementations§
Source§impl<T> SliceIndex<[T]> for Clamp<Range<usize>>
impl<T> SliceIndex<[T]> for Clamp<Range<usize>>
Source§fn get(
self,
slice: &[T],
) -> Option<&<Clamp<Range<usize>> as SliceIndex<[T]>>::Output>
fn get( self, slice: &[T], ) -> Option<&<Clamp<Range<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<Range<usize>> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<Range<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<Range<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<Range<usize>> as SliceIndex<[T]>>::Output
🔬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 <Clamp<Range<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<Range<usize>> as SliceIndex<[T]>>::Output
🔬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
Source§impl<T> SliceIndex<[T]> for Clamp<Range<usize>>
impl<T> SliceIndex<[T]> for Clamp<Range<usize>>
Source§fn get(
self,
slice: &[T],
) -> Option<&<Clamp<Range<usize>> as SliceIndex<[T]>>::Output>
fn get( self, slice: &[T], ) -> Option<&<Clamp<Range<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<Range<usize>> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<Range<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<Range<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<Range<usize>> as SliceIndex<[T]>>::Output
🔬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 <Clamp<Range<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<Range<usize>> as SliceIndex<[T]>>::Output
🔬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
Source§impl<T> SliceIndex<[T]> for Clamp<RangeFrom<usize>>
impl<T> SliceIndex<[T]> for Clamp<RangeFrom<usize>>
Source§fn get(
self,
slice: &[T],
) -> Option<&<Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output>
fn get( self, slice: &[T], ) -> Option<&<Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output
🔬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 <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output
🔬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
Source§impl<T> SliceIndex<[T]> for Clamp<RangeFrom<usize>>
impl<T> SliceIndex<[T]> for Clamp<RangeFrom<usize>>
Source§fn get(
self,
slice: &[T],
) -> Option<&<Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output>
fn get( self, slice: &[T], ) -> Option<&<Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output
🔬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 <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<RangeFrom<usize>> as SliceIndex<[T]>>::Output
🔬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
Source§impl<T> SliceIndex<[T]> for Clamp<RangeFull>
impl<T> SliceIndex<[T]> for Clamp<RangeFull>
Source§fn get(
self,
slice: &[T],
) -> Option<&<Clamp<RangeFull> as SliceIndex<[T]>>::Output>
fn get( self, slice: &[T], ) -> Option<&<Clamp<RangeFull> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeFull> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<RangeFull> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeFull> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<RangeFull> as SliceIndex<[T]>>::Output
🔬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 <Clamp<RangeFull> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<RangeFull> as SliceIndex<[T]>>::Output
🔬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
Source§impl<T> SliceIndex<[T]> for Clamp<RangeInclusive<usize>>
impl<T> SliceIndex<[T]> for Clamp<RangeInclusive<usize>>
Source§fn get(
self,
slice: &[T],
) -> Option<&<Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output>
fn get( self, slice: &[T], ) -> Option<&<Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
🔬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 <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
🔬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
Source§fn index(
self,
slice: &[T],
) -> &<Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
fn index( self, slice: &[T], ) -> &<Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a shared reference to the output at this location, panicking
if out of bounds.
Source§fn index_mut(
self,
slice: &mut [T],
) -> &mut <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
fn index_mut( self, slice: &mut [T], ) -> &mut <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a mutable reference to the output at this location, panicking
if out of bounds.
Source§impl<T> SliceIndex<[T]> for Clamp<RangeInclusive<usize>>
impl<T> SliceIndex<[T]> for Clamp<RangeInclusive<usize>>
Source§fn get(
self,
slice: &[T],
) -> Option<&<Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output>
fn get( self, slice: &[T], ) -> Option<&<Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
🔬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 <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
🔬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
Source§fn index(
self,
slice: &[T],
) -> &<Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
fn index( self, slice: &[T], ) -> &<Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a shared reference to the output at this location, panicking
if out of bounds.
Source§fn index_mut(
self,
slice: &mut [T],
) -> &mut <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
fn index_mut( self, slice: &mut [T], ) -> &mut <Clamp<RangeInclusive<usize>> as SliceIndex<[T]>>::Output
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a mutable reference to the output at this location, panicking
if out of bounds.
Source§impl<T> SliceIndex<[T]> for Clamp<RangeTo<usize>>
impl<T> SliceIndex<[T]> for Clamp<RangeTo<usize>>
Source§fn get(
self,
slice: &[T],
) -> Option<&<Clamp<RangeTo<usize>> as SliceIndex<[T]>>::Output>
fn get( self, slice: &[T], ) -> Option<&<Clamp<RangeTo<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeTo<usize>> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<RangeTo<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeTo<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<RangeTo<usize>> as SliceIndex<[T]>>::Output
🔬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 <Clamp<RangeTo<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<RangeTo<usize>> as SliceIndex<[T]>>::Output
🔬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
Source§impl<T> SliceIndex<[T]> for Clamp<RangeToInclusive<usize>>
impl<T> SliceIndex<[T]> for Clamp<RangeToInclusive<usize>>
Source§fn get(
self,
slice: &[T],
) -> Option<&<Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output>
fn get( self, slice: &[T], ) -> Option<&<Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
🔬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 <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
🔬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
Source§fn index(
self,
slice: &[T],
) -> &<Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
fn index( self, slice: &[T], ) -> &<Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a shared reference to the output at this location, panicking
if out of bounds.
Source§fn index_mut(
self,
slice: &mut [T],
) -> &mut <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
fn index_mut( self, slice: &mut [T], ) -> &mut <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a mutable reference to the output at this location, panicking
if out of bounds.
Source§impl<T> SliceIndex<[T]> for Clamp<RangeToInclusive<usize>>
impl<T> SliceIndex<[T]> for Clamp<RangeToInclusive<usize>>
Source§fn get(
self,
slice: &[T],
) -> Option<&<Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output>
fn get( self, slice: &[T], ) -> Option<&<Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
🔬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 <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
🔬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
Source§fn index(
self,
slice: &[T],
) -> &<Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
fn index( self, slice: &[T], ) -> &<Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a shared reference to the output at this location, panicking
if out of bounds.
Source§fn index_mut(
self,
slice: &mut [T],
) -> &mut <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
fn index_mut( self, slice: &mut [T], ) -> &mut <Clamp<RangeToInclusive<usize>> as SliceIndex<[T]>>::Output
🔬This is a nightly-only experimental API. (
slice_index_methods)Returns a mutable reference to the output at this location, panicking
if out of bounds.
Source§impl<T> SliceIndex<[T]> for Clamp<usize>
impl<T> SliceIndex<[T]> for Clamp<usize>
Source§fn get(self, slice: &[T]) -> Option<&<Clamp<usize> as SliceIndex<[T]>>::Output>
fn get(self, slice: &[T]) -> Option<&<Clamp<usize> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<usize> as SliceIndex<[T]>>::Output>
fn get_mut( self, slice: &mut [T], ) -> Option<&mut <Clamp<usize> as SliceIndex<[T]>>::Output>
🔬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 <Clamp<usize> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked( self, slice: *const [T], ) -> *const <Clamp<usize> as SliceIndex<[T]>>::Output
🔬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 <Clamp<usize> as SliceIndex<[T]>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut [T], ) -> *mut <Clamp<usize> as SliceIndex<[T]>>::Output
🔬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
Auto Trait Implementations§
impl<Idx> Freeze for Clamp<Idx>where
Idx: Freeze,
impl<Idx> RefUnwindSafe for Clamp<Idx>where
Idx: RefUnwindSafe,
impl<Idx> Send for Clamp<Idx>where
Idx: Send,
impl<Idx> Sync for Clamp<Idx>where
Idx: Sync,
impl<Idx> Unpin for Clamp<Idx>where
Idx: Unpin,
impl<Idx> UnwindSafe for Clamp<Idx>where
Idx: UnwindSafe,
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