pub struct MetadataConfig { /* private fields */ }Expand description
Configuration controlling which metadata fields to embed in audio files.
Uses a set of MetadataField variants. Default enables all fields except Comment.
Use is_enabled() to check whether a field should be embedded.
Implementations§
Source§impl MetadataConfig
impl MetadataConfig
Sourcepub fn all() -> Self
pub fn all() -> Self
Creates a config with all fields enabled.
§Returns
A MetadataConfig with every MetadataField enabled.
Sourcepub fn is_enabled(&self, field: MetadataField) -> bool
pub fn is_enabled(&self, field: MetadataField) -> bool
Sourcepub fn set(&mut self, field: MetadataField, enabled: bool)
pub fn set(&mut self, field: MetadataField, enabled: bool)
Enables or disables a specific field.
§Arguments
field- The metadata field to toggleenabled-trueto enable,falseto disable
Trait Implementations§
Source§impl Clone for MetadataConfig
impl Clone for MetadataConfig
Source§fn clone(&self) -> MetadataConfig
fn clone(&self) -> MetadataConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetadataConfig
impl Debug for MetadataConfig
Source§impl Default for MetadataConfig
impl Default for MetadataConfig
Source§impl PartialEq for MetadataConfig
impl PartialEq for MetadataConfig
impl StructuralPartialEq for MetadataConfig
Auto Trait Implementations§
impl Freeze for MetadataConfig
impl RefUnwindSafe for MetadataConfig
impl Send for MetadataConfig
impl Sync for MetadataConfig
impl Unpin for MetadataConfig
impl UnsafeUnpin for MetadataConfig
impl UnwindSafe for MetadataConfig
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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