[][src]Struct deezer::models::genre::Genre

pub struct Genre {
    pub id: u64,
    pub name: String,
    pub picture: String,
    pub picture_small: String,
    pub picture_medium: String,
    pub picture_big: String,
    pub picture_xl: String,
}

Contains all the information provided for a Genre.

Examples

You can query a genre by id via the DeezerObject::get() method:

let genre = Genre::get(0).await?.unwrap();

Or you can use DeezerClient::genre():

let deezer = DeezerClient::new();
let genre = deezer.genre(0).await?.unwrap();

To fetch all genres use DeezerEnumerable::get_all():

let genres = Genre::get_all().await?;

Or DeezerClient::genres():

let deezer = DeezerClient::new();
let genres = deezer.genres().await?;

Fields

id: u64

The editorial's Deezer id

name: String

The editorial's name

picture: String

The url of the genre picture.

picture_small: String

The url of the genre picture in size small.

picture_medium: String

The url of the genre picture in size medium.

picture_big: String

The url of the genre picture in size big.

picture_xl: String

The url of the genre picture in size xl.

Trait Implementations

impl Debug for Genre[src]

impl DeezerEnumerable for Genre[src]

impl DeezerObject for Genre[src]

impl<'de> Deserialize<'de> for Genre[src]

impl Serialize for Genre[src]

Auto Trait Implementations

impl RefUnwindSafe for Genre

impl Send for Genre

impl Sync for Genre

impl Unpin for Genre

impl UnwindSafe for Genre

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

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.