pub struct Par2CreatorOptions {Show 15 fields
pub output: Option<PathBuf>,
pub base_path: Option<PathBuf>,
pub inputs: Vec<PathBuf>,
pub block_sizing: BlockSizing,
pub recovery_amount: RecoveryAmount,
pub first_exponent: u32,
pub volume_scheme: VolumeScheme,
pub volume_count: Option<u32>,
pub memory_limit: Option<usize>,
pub forward_kernel: ForwardKernel,
pub backend: CreationBackend,
pub overwrite: bool,
pub dry_run: bool,
pub cancellation: CancellationToken,
pub progress: Option<ProgressCallback>,
}Expand description
Inputs and safety controls for PAR2 creation.
inputs contains explicit files only. The creator resolves their names
relative to base_path and never walks a directory or expands a file list.
Fields§
§output: Option<PathBuf>Output path or stem. A .par2 suffix is added when absent.
base_path: Option<PathBuf>Directory against which source names are made relative.
inputs: Vec<PathBuf>Explicit source file paths.
block_sizing: BlockSizingSource slice-size selection.
recovery_amount: RecoveryAmountRecovery-slice selection.
first_exponent: u32Exponent assigned to the first recovery slice.
volume_scheme: VolumeSchemeRecovery-volume allocation scheme.
volume_count: Option<u32>Explicit recovery-volume count, or automatic when absent.
memory_limit: Option<usize>Optional bounded forward-processing buffer budget in bytes.
forward_kernel: ForwardKernelArithmetic path requested for forward recovery encoding.
backend: CreationBackendBackend policy requested for recovery-data creation.
overwrite: boolPermit replacing existing output files after a successful staged write.
dry_run: boolSuppress filesystem writes while retaining validation and planning.
cancellation: CancellationTokenCooperative cancellation shared with the caller.
progress: Option<ProgressCallback>Optional progress observer.
Implementations§
Source§impl Par2CreatorOptions
impl Par2CreatorOptions
Sourcepub fn new(base_path: Option<PathBuf>, inputs: Vec<PathBuf>) -> Self
pub fn new(base_path: Option<PathBuf>, inputs: Vec<PathBuf>) -> Self
Construct options with the default creation policy.
Sourcepub fn with_output(
output: PathBuf,
base_path: Option<PathBuf>,
inputs: Vec<PathBuf>,
) -> Self
pub fn with_output( output: PathBuf, base_path: Option<PathBuf>, inputs: Vec<PathBuf>, ) -> Self
Construct options with an output path and explicit source files.
Sourcepub fn set_output(&mut self, output: PathBuf)
pub fn set_output(&mut self, output: PathBuf)
Set the output path or stem.
Trait Implementations§
Source§impl Clone for Par2CreatorOptions
impl Clone for Par2CreatorOptions
Source§fn clone(&self) -> Par2CreatorOptions
fn clone(&self) -> Par2CreatorOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Par2CreatorOptions
impl Debug for Par2CreatorOptions
Auto Trait Implementations§
impl !RefUnwindSafe for Par2CreatorOptions
impl !UnwindSafe for Par2CreatorOptions
impl Freeze for Par2CreatorOptions
impl Send for Par2CreatorOptions
impl Sync for Par2CreatorOptions
impl Unpin for Par2CreatorOptions
impl UnsafeUnpin for Par2CreatorOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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