pub struct SequentialWriter { /* private fields */ }Expand description
Streams EWF1 physical or EWF2 payload into staged native segments without a full raw spool.
Payload scratch holds one encoded segment, plus an automatically bounded
in-memory chunk-encoding batch when the parallel feature is enabled.
Logical catalogs are written in the final segment.
Catalogs and output path lists still grow with entry and segment counts.
Input must match the declared size exactly. Final sector padding is zeroed
and included in image digests. Errors poison the writer. Dropping it removes
uncommitted staging; after process interruption use EwfWriter::recover_output.
This writer does not support seeking or checkpoint resume.
Implementations§
Source§impl SequentialWriter
impl SequentialWriter
Sourcepub fn create(
path: impl AsRef<Path>,
settings: SequentialOptions,
) -> Result<Self>
pub fn create( path: impl AsRef<Path>, settings: SequentialOptions, ) -> Result<Self>
Starts a publication transaction. Nothing is published until finish.
Sourcepub fn write_all(&mut self, bytes: &[u8]) -> Result<()>
pub fn write_all(&mut self, bytes: &[u8]) -> Result<()>
Appends bytes. An oversize write poisons the transaction without publishing.
Sourcepub fn finish(self) -> Result<WriteResult>
pub fn finish(self) -> Result<WriteResult>
Checks the source length, pads the last sector, and publishes all segments.
Trait Implementations§
Source§impl Write for SequentialWriter
impl Write for SequentialWriter
Source§fn write(&mut self, bytes: &[u8]) -> Result<usize>
fn write(&mut self, bytes: &[u8]) -> Result<usize>
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored)Auto Trait Implementations§
impl Freeze for SequentialWriter
impl RefUnwindSafe for SequentialWriter
impl Send for SequentialWriter
impl Sync for SequentialWriter
impl Unpin for SequentialWriter
impl UnsafeUnpin for SequentialWriter
impl UnwindSafe for SequentialWriter
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more