pub struct Pair<Part> { /* private fields */ }Implementations§
Source§impl<'a> Pair<&'a [MaybeUninit<u8>]>
impl<'a> Pair<&'a [MaybeUninit<u8>]>
Sourcepub unsafe fn assume_init_io_slice(self) -> Pair<IoSlice<'a>>
pub unsafe fn assume_init_io_slice(self) -> Pair<IoSlice<'a>>
§Safety
Callers should guarantee the memory in the pair is initialized
Source§impl<'a> Pair<&'a mut [MaybeUninit<u8>]>
impl<'a> Pair<&'a mut [MaybeUninit<u8>]>
Sourcepub unsafe fn assume_init_io_slice_mut(self) -> Pair<IoSliceMut<'a>>
pub unsafe fn assume_init_io_slice_mut(self) -> Pair<IoSliceMut<'a>>
§Safety
Callers should guarantee the memory in the pair is initialized
Source§impl<Part> Pair<Part>where
Part: Storage,
impl<Part> Pair<Part>where
Part: Storage,
pub fn reader_slice(&mut self) -> &[Part]
pub fn reader_slice_mut(&mut self) -> &mut [Part]
Source§impl<Part> Pair<Part>where
Part: Storage,
impl<Part> Pair<Part>where
Part: Storage,
pub fn writer_slice(&mut self) -> &[Part]
pub fn writer_slice_mut(&mut self) -> &mut [Part]
Source§impl<'a, T> Pair<&'a [MaybeUninit<T>]>
impl<'a, T> Pair<&'a [MaybeUninit<T>]>
Sourcepub unsafe fn assume_init_ref(self) -> Pair<&'a [T]>
pub unsafe fn assume_init_ref(self) -> Pair<&'a [T]>
§Safety
Callers should guarantee the memory in the pair is initialized
Source§impl<'a, T> Pair<&'a mut [MaybeUninit<T>]>
impl<'a, T> Pair<&'a mut [MaybeUninit<T>]>
Sourcepub unsafe fn assume_init_mut(self) -> Pair<&'a mut [T]>
pub unsafe fn assume_init_mut(self) -> Pair<&'a mut [T]>
§Safety
Callers should guarantee the memory in the pair is initialized
Trait Implementations§
Source§impl<Part> From<(Part, Part)> for Pair<Part>
impl<Part> From<(Part, Part)> for Pair<Part>
Source§fn from((head, tail): (Part, Part)) -> Self
fn from((head, tail): (Part, Part)) -> Self
Converts to this type from the input type.
Source§impl<Part> From<Pair<Part>> for (Part, Part)
impl<Part> From<Pair<Part>> for (Part, Part)
Source§fn from(pair: Pair<Part>) -> (Part, Part)
fn from(pair: Pair<Part>) -> (Part, Part)
Converts to this type from the input type.
Source§impl<S: Storage> Storage for Pair<S>
impl<S: Storage> Storage for Pair<S>
type Error = <S as Storage>::Error
Source§fn buffered_len(&self) -> usize
fn buffered_len(&self) -> usize
Returns the length of the chunk
Source§fn read_chunk(&mut self, watermark: usize) -> Result<Chunk<'_>, Self::Error>
fn read_chunk(&mut self, watermark: usize) -> Result<Chunk<'_>, Self::Error>
Reads the current contiguous chunk
Source§fn partial_copy_into<Dest>(
&mut self,
dest: &mut Dest,
) -> Result<Chunk<'_>, Self::Error>
fn partial_copy_into<Dest>( &mut self, dest: &mut Dest, ) -> Result<Chunk<'_>, Self::Error>
Copies the reader into
dest, with a trailing chunk of bytes. Read moreSource§fn copy_into<Dest>(&mut self, dest: &mut Dest) -> Result<(), Self::Error>
fn copy_into<Dest>(&mut self, dest: &mut Dest) -> Result<(), Self::Error>
Copies the reader into
dest. Read moreSource§fn buffer_is_empty(&self) -> bool
fn buffer_is_empty(&self) -> bool
Returns if the chunk is empty
Source§fn full_copy(&mut self) -> FullCopy<'_, Self>
fn full_copy(&mut self) -> FullCopy<'_, Self>
Forces the entire reader to be copied, even when calling
partial_copy_into. Read moreSource§fn track_read(&mut self) -> Tracked<'_, Self>
fn track_read(&mut self) -> Tracked<'_, Self>
Tracks the number of bytes read from the storage
Source§impl<S: Storage> Storage for Pair<S>
impl<S: Storage> Storage for Pair<S>
Source§fn put_uninit_slice<F, Error>(
&mut self,
payload_len: usize,
f: F,
) -> Result<bool, Error>
fn put_uninit_slice<F, Error>( &mut self, payload_len: usize, f: F, ) -> Result<bool, Error>
Tries to write into a uninit slice for the current storage Read more
Source§fn remaining_capacity(&self) -> usize
fn remaining_capacity(&self) -> usize
Returns the additional number of bytes that can be written to the storage
const SPECIALIZES_BYTES: bool = false
const SPECIALIZES_BYTES_MUT: bool = false
Source§fn has_remaining_capacity(&self) -> bool
fn has_remaining_capacity(&self) -> bool
Returns
true if the storage will accept any additional bytesSource§fn with_write_limit(&mut self, max_len: usize) -> Limit<'_, Self>
fn with_write_limit(&mut self, max_len: usize) -> Limit<'_, Self>
Limits the number of bytes that can be written to the storage
Source§fn track_write(&mut self) -> Tracked<'_, Self>
fn track_write(&mut self) -> Tracked<'_, Self>
Tracks the number of bytes written to the storage
Source§fn write_once(&mut self) -> WriteOnce<'_, Self>
fn write_once(&mut self) -> WriteOnce<'_, Self>
Only allows a single write into the storage. After that, no more writes are allowed. Read more
Auto Trait Implementations§
impl<Part> Freeze for Pair<Part>where
Part: Freeze,
impl<Part> RefUnwindSafe for Pair<Part>where
Part: RefUnwindSafe,
impl<Part> Send for Pair<Part>where
Part: Send,
impl<Part> Sync for Pair<Part>where
Part: Sync,
impl<Part> Unpin for Pair<Part>where
Part: Unpin,
impl<Part> UnwindSafe for Pair<Part>where
Part: UnwindSafe,
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