pub struct DcacheView<'a, const CHUNK_SIZE: usize> { /* private fields */ }Implementations§
Source§impl<'a, const CHUNK_SIZE: usize> DcacheView<'a, CHUNK_SIZE>
impl<'a, const CHUNK_SIZE: usize> DcacheView<'a, CHUNK_SIZE>
Sourcepub fn read(&self) -> Vec<u8> ⓘ
pub fn read(&self) -> Vec<u8> ⓘ
Copy the payload into a new Vec.
Prefer as_slice() for zero-copy access when possible.
Only available with the std feature.
Sourcepub fn with_reader<T>(&self, f: impl FnOnce(&[u8]) -> T) -> T
pub fn with_reader<T>(&self, f: impl FnOnce(&[u8]) -> T) -> T
Access the payload through a closure.
Prefer as_slice() for direct zero-copy access.
Trait Implementations§
Source§impl<'a, const CHUNK_SIZE: usize> Clone for DcacheView<'a, CHUNK_SIZE>
impl<'a, const CHUNK_SIZE: usize> Clone for DcacheView<'a, CHUNK_SIZE>
Source§fn clone(&self) -> DcacheView<'a, CHUNK_SIZE>
fn clone(&self) -> DcacheView<'a, CHUNK_SIZE>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, const CHUNK_SIZE: usize> Debug for DcacheView<'a, CHUNK_SIZE>
impl<'a, const CHUNK_SIZE: usize> Debug for DcacheView<'a, CHUNK_SIZE>
impl<'a, const CHUNK_SIZE: usize> Copy for DcacheView<'a, CHUNK_SIZE>
Auto Trait Implementations§
impl<'a, const CHUNK_SIZE: usize> Freeze for DcacheView<'a, CHUNK_SIZE>
impl<'a, const CHUNK_SIZE: usize> !RefUnwindSafe for DcacheView<'a, CHUNK_SIZE>
impl<'a, const CHUNK_SIZE: usize> Send for DcacheView<'a, CHUNK_SIZE>
impl<'a, const CHUNK_SIZE: usize> Sync for DcacheView<'a, CHUNK_SIZE>
impl<'a, const CHUNK_SIZE: usize> Unpin for DcacheView<'a, CHUNK_SIZE>
impl<'a, const CHUNK_SIZE: usize> !UnwindSafe for DcacheView<'a, CHUNK_SIZE>
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