This crate makes it easier to parse, convert and write metadata (a.k.a tag) in audio files of different file types.
This crate aims to provide a unified trait for parsers and writers of different audio file formats.
This means that you can parse tags in mp3, flac, and m4a files with a single function:
Tag::default(). read_from_path() and get fields by directly calling
.artist() on its result. Without this
crate, you would otherwise need to learn different APIs in id3, mp4ameta etc. in order to parse
metadata in different file formats.
Using audiotags incurs a little overhead due to vtables if you want to guess the metadata format (from file extension). Apart from this the performance is almost the same as directly calling function provided by those 'specialized' crates.
No copies will be made if you only need to read and write metadata of one format. If you want to convert between tags, copying is unavoidable no matter if you use audiotags or use getters and setters provided by specialized libraries. audiotags is not making additional unnecessary copies.
Theoretically it is possible to achieve zero-copy conversions if all parsers can parse into a unified struct. However, this is going to be a lot of work. I might be able to implement them, but it will be no sooner than the Christmas vacation.
Read the manual for some examples.
Convert a concrete tag type into another
A builder for
Simple and safe type conversions that may fail in a controlled
way under some circumstances. It is the reciprocal of
An attempted conversion that consumes