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