pub struct AsBytes<'a>(pub &'a [u8]);Expand description
Treat some &u8 as a sequence of bytes, rather than a sequence of numbers. Using this can result in a significant performance gain but does not support the backward compatible change to different int types as numbers do by default
Tuple Fields§
§0: &'a [u8]Trait Implementations§
Source§impl StableHash for AsBytes<'_>
impl StableHash for AsBytes<'_>
fn stable_hash<H: StableHasher>(&self, field_address: H::Addr, state: &mut H)
Auto Trait Implementations§
impl<'a> Freeze for AsBytes<'a>
impl<'a> RefUnwindSafe for AsBytes<'a>
impl<'a> Send for AsBytes<'a>
impl<'a> Sync for AsBytes<'a>
impl<'a> Unpin for AsBytes<'a>
impl<'a> UnwindSafe for AsBytes<'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