pub struct TarSplitFdStream { /* private fields */ }Expand description
Stream that reads tar-split metadata and provides file descriptors for file content.
Implementations§
Source§impl TarSplitFdStream
impl TarSplitFdStream
Sourcepub fn new(storage: &Storage, layer: &Layer) -> Result<Self>
pub fn new(storage: &Storage, layer: &Layer) -> Result<Self>
Create a new tar-split stream for a layer.
§Errors
Returns an error if the tar-split file doesn’t exist or cannot be opened.
Sourcepub fn next(&mut self) -> Result<Option<TarSplitItem>>
pub fn next(&mut self) -> Result<Option<TarSplitItem>>
Read the next item from the tar-split stream.
Returns:
Ok(Some(item))- Next item was read successfullyOk(None)- End of stream reachedErr(...)- Error occurred during reading
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Get the number of entries processed so far.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TarSplitFdStream
impl !RefUnwindSafe for TarSplitFdStream
impl Send for TarSplitFdStream
impl Sync for TarSplitFdStream
impl Unpin for TarSplitFdStream
impl UnsafeUnpin for TarSplitFdStream
impl !UnwindSafe for TarSplitFdStream
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