pub struct SegmentedSink<'segments, 'bytes> { /* private fields */ }Expand description
Borrowed segmented sink used by unit tests, fuzz targets, and simple transport adapters.
Implementations§
Source§impl<'segments, 'bytes> SegmentedSink<'segments, 'bytes>
impl<'segments, 'bytes> SegmentedSink<'segments, 'bytes>
pub fn new( segments: &'segments mut [&'bytes mut [u8]], ) -> Result<Self, SegmentedRegionError>
Trait Implementations§
Source§impl ByteSink for SegmentedSink<'_, '_>
impl ByteSink for SegmentedSink<'_, '_>
Source§fn write_at(&mut self, offset: u64, source: &[u8]) -> Result<(), BackendError>
fn write_at(&mut self, offset: u64, source: &[u8]) -> Result<(), BackendError>
Write
source to the exact logical range beginning at offset.Source§fn as_contiguous_mut(&mut self) -> Option<&mut [u8]>
fn as_contiguous_mut(&mut self) -> Option<&mut [u8]>
Mutably borrow the complete logical destination when it is one contiguous region. Read more
fn is_empty(&self) -> bool
Auto Trait Implementations§
impl<'segments, 'bytes> !UnwindSafe for SegmentedSink<'segments, 'bytes>
impl<'segments, 'bytes> Freeze for SegmentedSink<'segments, 'bytes>
impl<'segments, 'bytes> RefUnwindSafe for SegmentedSink<'segments, 'bytes>
impl<'segments, 'bytes> Send for SegmentedSink<'segments, 'bytes>
impl<'segments, 'bytes> Sync for SegmentedSink<'segments, 'bytes>
impl<'segments, 'bytes> Unpin for SegmentedSink<'segments, 'bytes>
impl<'segments, 'bytes> UnsafeUnpin for SegmentedSink<'segments, 'bytes>
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