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