Struct id3::Encoder

source · []
pub struct Encoder { /* private fields */ }
Expand description

The Encoder may be used to encode tags with custom settings.

Implementations

Constructs a new Encoder with the following configuration:

  • Version is ID3v2.4
  • Unsynchronization is disabled due to compatibility issues
  • No compression
  • File is not marked as altered

Sets the padding that is written after the tag.

Should be only used when writing to a MP3 file

Sets the ID3 version.

Enables or disables the unsynchronisation scheme.

This avoids patterns that resemble MP3-frame headers from being encoded. If you are encoding to MP3 files and wish to be compatible with very old tools, you probably want this enabled.

Enables or disables compression.

Informs the encoder whether the file this tag belongs to has been changed.

This subsequently discards any tags that have their File Alter Preservation bits set and that have a relation to the file contents:

AENC, ETCO, EQUA, MLLT, POSS, SYLT, SYTC, RVAD, TENC, TLEN, TSIZ

Encodes the specified Tag using the settings set in the Encoder.

Note that the plain tag is written, regardless of the original contents. To safely encode a tag to an MP3 file, use Encoder::encode_to_path.

Encodes a Tag and replaces any existing tag in the file.

Encodes a Tag and replaces any existing tag in the file pointed to by the specified path.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.