pub struct MemSliceCursor<'a> {
pub mem_slice: &'a [FileVolatileSlice<'a>],
pub index: usize,
pub offset: usize,
}Expand description
An memory cursor to access an FileVolatileSlice array.
Fields§
§mem_slice: &'a [FileVolatileSlice<'a>]§index: usize§offset: usizeImplementations§
Source§impl<'a> MemSliceCursor<'a>
impl<'a> MemSliceCursor<'a>
Sourcepub fn new<'b: 'a>(slice: &'b [FileVolatileSlice<'_>]) -> Self
pub fn new<'b: 'a>(slice: &'b [FileVolatileSlice<'_>]) -> Self
Create a new MemSliceCursor object.
Sourcepub fn move_cursor(&mut self, size: usize)
pub fn move_cursor(&mut self, size: usize)
Move cursor forward by size.
Sourcepub fn consume(&mut self, size: usize) -> Vec<IoSliceMut<'_>>
pub fn consume(&mut self, size: usize) -> Vec<IoSliceMut<'_>>
Consume size bytes of memory content from the cursor.
Sourcepub fn inner_slice(&self) -> &[FileVolatileSlice<'_>]
pub fn inner_slice(&self) -> &[FileVolatileSlice<'_>]
Get the inner FileVolatileSlice array.
Auto Trait Implementations§
impl<'a> Freeze for MemSliceCursor<'a>
impl<'a> RefUnwindSafe for MemSliceCursor<'a>
impl<'a> Send for MemSliceCursor<'a>
impl<'a> Sync for MemSliceCursor<'a>
impl<'a> Unpin for MemSliceCursor<'a>
impl<'a> UnsafeUnpin for MemSliceCursor<'a>
impl<'a> UnwindSafe for MemSliceCursor<'a>
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