pub struct EwfRecovery { /* private fields */ }Expand description
Read-only recovery plan for physical, unencrypted raw/zlib EWF1 segments.
Opens a reliable descriptor-chain prefix and requires consistent, validated media geometry. It does not carve lost descriptors, infer missing middle segments, recover encrypted images, or change the normal strict reader.
Implementations§
Source§impl EwfRecovery
impl EwfRecovery
Sourcepub fn open(path: impl AsRef<Path>, options: RecoveryOptions) -> Result<Self>
pub fn open(path: impl AsRef<Path>, options: RecoveryOptions) -> Result<Self>
Discovers siblings and opens a recovery plan without creating output.
Sourcepub fn open_segments<P: AsRef<Path>>(
paths: impl IntoIterator<Item = P>,
options: RecoveryOptions,
) -> Result<Self>
pub fn open_segments<P: AsRef<Path>>( paths: impl IntoIterator<Item = P>, options: RecoveryOptions, ) -> Result<Self>
Opens explicitly ordered source paths. Numbering gaps are rejected because EWF1 tables do not provide enough information to place later segments safely.
Sourcepub fn segment_paths(&self) -> &[PathBuf]
pub fn segment_paths(&self) -> &[PathBuf]
Returns source paths in logical segment order.
Sourcepub fn media_size(&self) -> u64
pub fn media_size(&self) -> u64
Returns the declared size of a recovered raw output.
Sourcepub fn recover_to_path(&self, path: impl AsRef<Path>) -> Result<RecoveryReport>
pub fn recover_to_path(&self, path: impl AsRef<Path>) -> Result<RecoveryReport>
Creates a new raw output file. Existing paths, including aliases of source segments, are never overwritten. Errors leave a partial output for inspection.
Sourcepub fn recover_to_writer(
&self,
output: &mut impl Write,
) -> Result<RecoveryReport>
pub fn recover_to_writer( &self, output: &mut impl Write, ) -> Result<RecoveryReport>
Writes recovered raw bytes to a caller-owned destination. The caller must keep this destination separate from the source evidence.
Sourcepub fn recover_with_progress(
&self,
output: &mut impl Write,
progress: impl FnMut(RecoveryProgress) -> ControlFlow<()>,
) -> Result<RecoveryReport>
pub fn recover_with_progress( &self, output: &mut impl Write, progress: impl FnMut(RecoveryProgress) -> ControlFlow<()>, ) -> Result<RecoveryReport>
Recovers with one initial event and one event per emitted chunk. Returning
Break(()) stops with Aborted; already-written bytes remain in the output.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for EwfRecovery
impl !UnwindSafe for EwfRecovery
impl Freeze for EwfRecovery
impl Send for EwfRecovery
impl Sync for EwfRecovery
impl Unpin for EwfRecovery
impl UnsafeUnpin for EwfRecovery
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