Struct lofty::ParseOptions
source · [−]#[non_exhaustive]pub struct ParseOptions { /* private fields */ }Expand description
Options to control how Lofty parses a file
Implementations
sourceimpl ParseOptions
impl ParseOptions
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ParseOptions, alias for Default implementation
See also: ParseOptions::default
Examples
use lofty::ParseOptions;
let parsing_options = ParseOptions::new();sourcepub fn read_properties(&mut self, read_properties: bool) -> Self
pub fn read_properties(&mut self, read_properties: bool) -> Self
Whether or not to read the audio properties
Examples
use lofty::ParseOptions;
// By default, `read_properties` is enabled. Here, we don't want to read them.
let parsing_options = ParseOptions::new().read_properties(false);sourcepub fn use_custom_resolvers(&mut self, use_custom_resolvers: bool) -> Self
pub fn use_custom_resolvers(&mut self, use_custom_resolvers: bool) -> Self
Whether or not to check registered custom resolvers
See also: crate::resolve
Examples
use lofty::ParseOptions;
// By default, `use_custom_resolvers` is enabled. Here, we don't want to use them.
let parsing_options = ParseOptions::new().use_custom_resolvers(false);sourcepub fn parsing_mode(&mut self, parsing_mode: ParsingMode) -> Self
pub fn parsing_mode(&mut self, parsing_mode: ParsingMode) -> Self
The parsing mode to use, see ParsingMode for details
Examples
use lofty::{ParseOptions, ParsingMode};
// By default, `parsing_mode` is ParsingMode::Strict. Here, we don't need absolute correctness.
let parsing_options = ParseOptions::new().parsing_mode(ParsingMode::Relaxed);Trait Implementations
sourceimpl Clone for ParseOptions
impl Clone for ParseOptions
sourcefn clone(&self) -> ParseOptions
fn clone(&self) -> ParseOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for ParseOptions
impl Debug for ParseOptions
sourceimpl Default for ParseOptions
impl Default for ParseOptions
impl Copy for ParseOptions
Auto Trait Implementations
impl RefUnwindSafe for ParseOptions
impl Send for ParseOptions
impl Sync for ParseOptions
impl Unpin for ParseOptions
impl UnwindSafe for ParseOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more