pub struct Autotags {
    pub version: Version,
    pub bpm: f64,
    pub auto_gain: f64,
    pub gain_db: f64,
}
Expand description

Represents the Serato AutoTags tag.

It stores BPM an gain values.

Example

use triseratops::tag::{Autotags, format::id3::ID3Tag};

// First, read the tag data from the ID3 GEOB tag (the tag name can be accessed using the
// Autotags::ID3_TAG), then parse the data like this:
fn parse(data: &[u8]) {
    let content = Autotags::parse_id3(data).expect("Failed to parse data!");
    println!("{:?}", content);
}

Fields§

§version: Version

The tag version.

§bpm: f64

The track’s number of beats per minute (BPM).

§auto_gain: f64

The track’s autogain values (probably comparable to ReplayGain).

§gain_db: f64

The track’s gain value (manual?).

Trait Implementations§

source§

impl Clone for Autotags

source§

fn clone(&self) -> Autotags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Autotags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl EnvelopedTag for Autotags

source§

fn parse_enveloped(input: &[u8]) -> Result<Self, Error>

source§

fn write_enveloped(&self, writer: &mut impl Write) -> Result<usize, Error>

source§

impl FLACTag for Autotags

source§

const FLAC_COMMENT: &'static str = "SERATO_AUTOGAIN"

Name of the VORBIS_COMMENT that this data is stored in.
source§

fn parse_flac(input: &[u8]) -> Result<Self, Error>

source§

fn write_flac(&self, writer: &mut impl Write) -> Result<usize, Error>

source§

impl ID3Tag for Autotags

source§

const ID3_TAG: &'static str = Self::NAME

Name of the ID3 tag that this data is stored in.
source§

fn parse_id3(input: &[u8]) -> Result<Self, Error>

source§

fn write_id3(&self, writer: &mut impl Write) -> Result<usize, Error>

source§

impl MP4Tag for Autotags

source§

const MP4_ATOM_FREEFORM_NAME: &'static str = "autgain"

The mean part of the freeform MP4_ATOM that this data is stored in.
source§

const MP4_ATOM_FREEFORM_MEAN: &'static str = "com.serato.dj"

The mean part of the freeform MP4_ATOM that this data is stored in.
source§

fn parse_mp4(input: &[u8]) -> Result<Self, Error>

source§

fn write_mp4(&self, writer: &mut impl Write) -> Result<usize, Error>

source§

impl Tag for Autotags

source§

const NAME: &'static str = "Serato Autotags"

source§

fn parse(input: &[u8]) -> Result<Self, Error>

source§

fn write(&self, writer: &mut impl Write) -> Result<usize, Error>

source§

impl Copy for Autotags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.