pub struct AnalysisTrack {
Show 34 fields pub analyzer_version: String, pub platform: String, pub detailed_status: String, pub timestamp: i64, pub analysis_time: f64, pub input_process: String, pub num_samples: i32, pub duration: f64, pub analysis_sample_rate: i32, pub analysis_channels: i32, pub end_fade_in: f64, pub start_fade_out: f64, pub loudness: f64, pub tempo: f64, pub tempo_confidence: f64, pub time_signature: i32, pub time_signature_confidence: f64, pub key: i32, pub key_confidence: f64, pub mode: i32, pub mode_confidence: f64, pub code_string: String, pub code_version: String, pub echoprint_string: String, pub echoprint_version: String, pub synch_string: String, pub synch_version: String, pub rhythm_string: String, pub rhythm_version: String, pub bars: Vec<Bar>, pub beats: Vec<Beat>, pub sections: Vec<Section>, pub segments: Vec<Segment>, pub tatums: Vec<Tatum>,
}
Expand description

Struct to represent a Track’s audio analysis

Fields§

§analyzer_version: String§platform: String§detailed_status: String§timestamp: i64§analysis_time: f64§input_process: String§num_samples: i32§duration: f64§analysis_sample_rate: i32§analysis_channels: i32§end_fade_in: f64§start_fade_out: f64§loudness: f64§tempo: f64§tempo_confidence: f64§time_signature: i32§time_signature_confidence: f64§key: i32§key_confidence: f64§mode: i32§mode_confidence: f64§code_string: String§code_version: String§echoprint_string: String§echoprint_version: String§synch_string: String§synch_version: String§rhythm_string: String§rhythm_version: String§bars: Vec<Bar>§beats: Vec<Beat>§sections: Vec<Section>§segments: Vec<Segment>§tatums: Vec<Tatum>

Implementations§

source§

impl AnalysisTrack

source

pub fn new(raw_object: &JsonValue) -> Result<AnalysisTrack, SpotifyError>

Takes JsonValue representing audion analysis and formats it into AnalysisTrack struct

Arguments
  • raw_object - JsonValue object representing audio analysis for a track from API request

Trait Implementations§

source§

impl Debug for AnalysisTrack

Implements the Debug trait for AnalysisTrack struct

source§

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

Formats the value using the given formatter. Read more

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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same<T> for T

§

type Output = T

Should always be Self
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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more