pub struct SubRange { /* private fields */ }Expand description
A byte window [base, base+len) of a parent source, itself an
ImageSource. How a partition, VSS store, embedded image, or decrypted
volume is addressed. len is clamped to the parent’s bounds at construction,
so a read_at can never escape the window.
Implementations§
Trait Implementations§
Source§impl ImageSource for SubRange
impl ImageSource for SubRange
Source§fn read_at(&self, offset: u64, buf: &mut [u8]) -> VfsResult<usize>
fn read_at(&self, offset: u64, buf: &mut [u8]) -> VfsResult<usize>
Fill
buf starting at byte offset. Returns bytes read (0 at/after EOF).
Never panics; a short read past EOF returns the available prefix length.Source§fn extents(&self) -> Extents
fn extents(&self) -> Extents
Allocated-extent map. Default = one dense extent covering
[0, len).Source§fn view(&self, offset: u64, len: usize) -> Option<SourceView<'_>>
fn view(&self, offset: u64, len: usize) -> Option<SourceView<'_>>
Optional zero-copy fast path.
None when the backing cannot lend a
contiguous view (the caller then uses ImageSource::read_at).Auto Trait Implementations§
impl !RefUnwindSafe for SubRange
impl !UnwindSafe for SubRange
impl Freeze for SubRange
impl Send for SubRange
impl Sync for SubRange
impl Unpin for SubRange
impl UnsafeUnpin for SubRange
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