pub struct Slice<'a> {
bytes: &'a [u8],
}
Expand description
A wrapper around a slice that exposes no functions that can panic.
Intentionally avoids implementing Debug
, Eq
, and PartialEq
to avoid
creating a side channel that would leak information about the value.
Fields§
§bytes: &'a [u8]
Implementations§
Trait Implementations§
impl<'a> Copy for Slice<'a>
Auto Trait Implementations§
impl<'a> Freeze for Slice<'a>
impl<'a> RefUnwindSafe for Slice<'a>
impl<'a> Send for Slice<'a>
impl<'a> Sync for Slice<'a>
impl<'a> Unpin for Slice<'a>
impl<'a> UnwindSafe for Slice<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)