pub struct FileChunkIterator<'a, DATA: Read + Seek, const N: usize> { /* private fields */ }Available on crate feature
alloc and crate feature async and (crate features alloc or read) only.Expand description
Iterator over file chunks.
Yields chunks of up to N bytes from a file, handling multi-extent files.
Implementations§
Source§impl<'a, DATA: Read + Seek, const N: usize> FileChunkIterator<'a, DATA, N>
impl<'a, DATA: Read + Seek, const N: usize> FileChunkIterator<'a, DATA, N>
Sourcepub async fn next_chunk(&mut self) -> Result<Option<Vec<u8>>>
pub async fn next_chunk(&mut self) -> Result<Option<Vec<u8>>>
Returns the next chunk of data.
Returns Ok(Some(Vec<u8>)) with up to N bytes, Ok(None) at EOF.
Sourcepub fn total_size(&self) -> u64
pub fn total_size(&self) -> u64
Returns the total size of the file in bytes.
Auto Trait Implementations§
impl<'a, DATA, const N: usize> !RefUnwindSafe for FileChunkIterator<'a, DATA, N>
impl<'a, DATA, const N: usize> !UnwindSafe for FileChunkIterator<'a, DATA, N>
impl<'a, DATA, const N: usize> Freeze for FileChunkIterator<'a, DATA, N>
impl<'a, DATA, const N: usize> Send for FileChunkIterator<'a, DATA, N>
impl<'a, DATA, const N: usize> Sync for FileChunkIterator<'a, DATA, N>
impl<'a, DATA, const N: usize> Unpin for FileChunkIterator<'a, DATA, N>
impl<'a, DATA, const N: usize> UnsafeUnpin for FileChunkIterator<'a, DATA, N>where
&'a IsoImage<DATA>: UnsafeUnpin,
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