pub struct Markers {
    pub version: Version,
    pub entries: Vec<Marker>,
    pub track_color: Color,
}
Expand description

Represents the Serato Markers_ tag.

It contains the the first 5 cue points, the first 9 loops and the color of the track.

This seems to be a legacy tag, since it lacks some information such as cue labels and all information of the Serato Markers_ tag is also part of the [Serato Markers2](super::markers2] tag. If the two tags contradict each other, Serato DJ will prefer the data from the Serato Markers_ tag.

Example

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

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

Fields§

§version: Version

The tag version.

§entries: Vec<Marker>

The marker entries.

§track_color: Color

The color of the track in Serato’s library view.

Implementations§

source§

impl Markers

source

pub fn cues(&self) -> Vec<(u8, &Marker)>

source

pub fn loops(&self) -> Vec<(u8, &Marker)>

source

pub fn track_color(&self) -> Color

Trait Implementations§

source§

impl Clone for Markers

source§

fn clone(&self) -> Markers

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 Markers

source§

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

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

impl EnvelopedTag for Markers

source§

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

source§

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

source§

impl ID3Tag for Markers

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 Markers

source§

const MP4_ATOM_FREEFORM_NAME: &'static str = "markers"

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§

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§

impl Tag for Markers

source§

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

source§

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

source§

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

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.