Struct triseratops::tag::container::TagContainer[][src]

pub struct TagContainer { /* fields omitted */ }

Provides a streamlined interface for retrieving Serato tag data.

If you're not interested in the low-level format details, just use this instead of the low-level structs (e.g. Markers, Markers2, etc.)

Some of the data in Serato's tags is redundant and may contradict each other. This class implements the same merge strategies for inconsistent data that Serato uses, too.

Implementations

impl TagContainer[src]

pub fn new() -> Self[src]

Create an empty Serato tag container.

pub fn parse_autotags(
    &mut self,
    input: &[u8],
    tag_format: TagFormat
) -> Result<(), Error>
[src]

Parse the Serato Autotags tag.

pub fn parse_beatgrid(
    &mut self,
    input: &[u8],
    tag_format: TagFormat
) -> Result<(), Error>
[src]

Parse the Serato BeatGrid tag.

pub fn parse_markers(
    &mut self,
    input: &[u8],
    tag_format: TagFormat
) -> Result<(), Error>
[src]

Parse the Serato Markers_ tag.

pub fn parse_markers2(
    &mut self,
    input: &[u8],
    tag_format: TagFormat
) -> Result<(), Error>
[src]

Parse the Serato Markers2 tag.

pub fn parse_overview(
    &mut self,
    input: &[u8],
    tag_format: TagFormat
) -> Result<(), Error>
[src]

Parse the Serato Overview tag.

pub fn auto_gain(&self) -> Option<f64>[src]

Returns the auto_gain value from the Serato Autotags tag.

pub fn gain_db(&self) -> Option<f64>[src]

Returns the gain_db value from the Serato Autotags tag.

pub fn beatgrid(&self) -> Option<(&Vec<NonTerminalMarker>, &TerminalMarker)>[src]

Returns the beatgrid from the Serato BeatGrid tag.

pub fn bpm_locked(&self) -> Option<bool>[src]

Returns BPM lock status from the Serato Markers2 tag.

pub fn cues(&self) -> Vec<Cue>[src]

Returns cues from the Serato Markers_ and Serato Markers2 tags.

This retrieves the Serato Markers2 cues first, then overwrite the values with those from Serato Markers_. This is what Serato does too (i.e. if Serato Markers_ and Serato Markers2 contradict each other, Serato will use the values from Serato Markers_).

pub fn loops(&self) -> Vec<Loop>[src]

Returns loops from the Serato Markers_ and Serato Markers2 tags.

This retrieves the Serato Markers2 loops first, then overwrite the values with those from Serato Markers_. This is what Serato does too (i.e. if Serato Markers_ and Serato Markers2 contradict each other, Serato will use the values from Serato Markers_).

pub fn flips(&self) -> Vec<Flip>[src]

Returns flips from the Serato Markers2 tag.

pub fn track_color(&self) -> Option<Color>[src]

Returns the track color from the Serato Markers_ and Serato Markers2 tags.

This retrieves the Serato Markers2 track color first, then overwrites the value with the one from Serato Markers_. This is what Serato does too (i.e. if Serato Markers_ and Serato Markers2 contradict each other, Serato will use the value from Serato Markers_).

pub fn overview(&self) -> Option<&Vec<Vec<u8>>>[src]

Returns the waveform overview data color from the Serato Overview tag.

Trait Implementations

impl Default for TagContainer[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.