pub struct Wrapping<'a, T>(/* private fields */);
Expand description
Wrapper around an immutable slice that allows for indexing out of bounds.
§Example
use wrapping::Wrapping;
let array: [&str; 1] = ["hello"];
let wrapping = Wrapping::from(&array[..]);
assert_eq!(wrapping[0], "hello");
assert_eq!(wrapping[1], "hello");
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for Wrapping<'a, T>
impl<'a, T> RefUnwindSafe for Wrapping<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Wrapping<'a, T>where
T: Sync,
impl<'a, T> Sync for Wrapping<'a, T>where
T: Sync,
impl<'a, T> Unpin for Wrapping<'a, T>
impl<'a, T> UnwindSafe for Wrapping<'a, T>where
T: RefUnwindSafe,
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