#[non_exhaustive]pub struct ApplyOptions {
pub steps: i32,
pub track_result: Option<ReplayGainResult>,
pub album_info: Option<AacAlbumInfo>,
pub prevent_clipping: bool,
pub wrap: bool,
pub preserve_timestamp: bool,
pub use_temp_file: bool,
pub write_undo: bool,
pub write_replaygain_tags: bool,
pub use_id3v2: bool,
pub channel: Option<Channel>,
pub skip_clipping_check: bool,
}Expand description
Driver configuration for apply_with_options.
Construct via ApplyOptions::new and tweak fields directly — this
struct is data-only, no builder methods.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.steps: i32Requested gain in MP3 gain steps (1 step = 1.5 dB).
track_result: Option<ReplayGainResult>Per-track ReplayGain analysis. Provides peak() for the
ReplayGain-based clipping check and gain_db() / peak() for
ReplayGain tag writing.
album_info: Option<AacAlbumInfo>Album-level info that feeds the album fields of the ReplayGain tags.
prevent_clipping: bool-k: if the requested gain would clip, cap it at the available
headroom instead of applying as-is.
wrap: bool-w: wrap around 0–255 instead of saturating. Also disables the
clipping check (wrap mode is intentionally lossy).
preserve_timestamp: bool-p: restore the file’s mtime after writing.
use_temp_file: bool-t: historically opted into temp-file writes. All file rewrites now
go through a sibling temp file + atomic rename unconditionally
(issue #227), so the flag is accepted but has no effect.
write_undo: boolRecord an undo tag (APE for MP3, MP4 freeform for AAC, ID3v2 TXXX
when Self::use_id3v2 is on).
Write ReplayGain metadata tags. Requires Self::track_result to
be set. AAC writes to mp4 freeform metadata; MP3 writes ID3v2 TXXX
frames when Self::use_id3v2 is on, otherwise APEv2 REPLAYGAIN_*
items (issue #204).
use_id3v2: bool-s i: MP3 only — use ID3v2 TXXX frames for undo and ReplayGain
instead of APE.
channel: Option<Channel>-l: MP3 only — apply gain to a single channel (Stereo / Dual
Channel) instead of all channels. AAC has no per-channel apply
path; setting this on an AAC file is an error.
skip_clipping_check: boolSkip the pre-apply clipping check entirely. For callers that will
never surface ApplyReport::clipping_detected (-c / -q, or the
channel path), the headroom check’s full-file analyze() is pure
waste (issue #232). Ignored when Self::prevent_clipping is on —
-k needs the check to cap the gain.
Implementations§
Trait Implementations§
Source§impl Clone for ApplyOptions
impl Clone for ApplyOptions
Source§fn clone(&self) -> ApplyOptions
fn clone(&self) -> ApplyOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ApplyOptions
impl RefUnwindSafe for ApplyOptions
impl Send for ApplyOptions
impl Sync for ApplyOptions
impl Unpin for ApplyOptions
impl UnsafeUnpin for ApplyOptions
impl UnwindSafe for ApplyOptions
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> 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