Skip to main content

WriteOptions

Struct WriteOptions 

Source
pub struct WriteOptions {
Show 25 fields pub format: WriteFormat, pub sectors_per_chunk: u32, pub bytes_per_sector: u32, pub set_identifier: Option<[u8; 16]>, pub compression: WriteCompression, pub compression_values: WriteCompressionValues, pub hashes: WriteHashes, pub maximum_segment_size: Option<u64>, pub secondary_segment_filename: Option<PathBuf>, pub media_size: Option<u64>, pub metadata: EwfMetadata, pub header_codepage: HeaderCodepage, pub header_values_date_format: HeaderDateFormat, pub acquisition_errors: Vec<AcquisitionError>, pub checksum_errors: Vec<SectorRange>, pub sessions: Vec<SectorRange>, pub tracks: Vec<SectorRange>, pub media_profile: WriteMediaProfile, pub memory_extents: Vec<MemoryExtent>, pub single_files: Option<SingleFilesInfo>, pub ewf2_single_files_tables: SingleFilesAuxTables, pub ewf2_increment_data: Vec<Vec<u8>>, pub ewf2_final_information: Option<Vec<u8>>, pub ewf2_restart_data: Option<String>, pub ewf2_analytical_data: Option<String>,
}
Expand description

Configuration used to create an EwfWriter.

Fields§

§format: WriteFormat

Output EWF format.

§sectors_per_chunk: u32

Number of sectors represented by each chunk.

§bytes_per_sector: u32

Bytes in each logical sector.

§set_identifier: Option<[u8; 16]>

Segment set identifier written to output metadata.

§compression: WriteCompression

Compression method for newly encoded chunks.

§compression_values: WriteCompressionValues

Compression level and flags for newly encoded chunks.

§hashes: WriteHashes

Stored hash values to write.

§maximum_segment_size: Option<u64>

Maximum output segment size in bytes.

§secondary_segment_filename: Option<PathBuf>

First path of the mirrored secondary output segment set.

§media_size: Option<u64>

Declared logical media size in bytes.

§metadata: EwfMetadata

Case and acquisition metadata to write.

§header_codepage: HeaderCodepage

Codepage used to encode EWF1 header values.

§header_values_date_format: HeaderDateFormat

Date format used for EWF1 header date values.

§acquisition_errors: Vec<AcquisitionError>

Acquisition error ranges to write.

§checksum_errors: Vec<SectorRange>

Checksum error ranges to write.

§sessions: Vec<SectorRange>

Session sector ranges to write.

§tracks: Vec<SectorRange>

Track sector ranges to write.

§media_profile: WriteMediaProfile

Media type and acquisition flags to write.

§memory_extents: Vec<MemoryExtent>

Memory acquisition extents to write.

§single_files: Option<SingleFilesInfo>

Logical single-file catalog to write.

§ewf2_single_files_tables: SingleFilesAuxTables

Preserved EWF2 single-file auxiliary table data.

§ewf2_increment_data: Vec<Vec<u8>>

Raw EWF2 increment data sections to write.

§ewf2_final_information: Option<Vec<u8>>

Raw EWF2 final information section to write.

§ewf2_restart_data: Option<String>

EWF2 restart data text to write.

§ewf2_analytical_data: Option<String>

EWF2 analytical data text to write.

Implementations§

Source§

impl WriteOptions

Source

pub fn copy_media_values_from_image(&mut self, image: &Image) -> Result<()>

Copies media geometry and flags from an opened image.

§Errors

Returns an error if the source image contains media values that cannot be represented by writer options.

Source

pub fn copy_media_values_from_info(&mut self, info: &ImageInfo) -> Result<()>

Copies media geometry and flags from parsed image metadata.

§Errors

Returns an error if the source metadata contains media values that cannot be represented by writer options.

Source

pub fn copy_header_values_from_image(&mut self, image: &Image)

Copies header values from an opened image.

Source

pub fn copy_header_values_from_info(&mut self, info: &ImageInfo)

Copies header values from parsed image metadata.

Source

pub fn copy_header_values_from_metadata(&mut self, metadata: &EwfMetadata)

Copies header values from metadata.

Source

pub fn copy_hash_values_from_image(&mut self, image: &Image)

Copies stored hash values from an opened image.

Source

pub fn copy_hash_values_from_info(&mut self, info: &ImageInfo)

Copies stored hash values from parsed image metadata.

Source

pub fn copy_hash_values_from_stored_hashes(&mut self, hashes: &StoredHashes)

Copies stored hash values from a hash collection.

Trait Implementations§

Source§

impl Clone for WriteOptions

Source§

fn clone(&self) -> WriteOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WriteOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WriteOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for WriteOptions

Source§

impl PartialEq for WriteOptions

Source§

fn eq(&self, other: &WriteOptions) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WriteOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.