[−][src]Struct deezer::models::genre::Genre
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?;
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]
pub fn get_all_api_url() -> String
[src]
#[must_use]pub fn get_all<'async_trait>(
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, DeezerError>> + Send + 'async_trait>> where
Self: Send + 'async_trait,
[src]
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, DeezerError>> + Send + 'async_trait>> where
Self: Send + 'async_trait,
impl DeezerObject for Genre
[src]
pub fn get_api_url(id: u64) -> String
[src]
#[must_use]pub fn get<'async_trait>(
id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, DeezerError>> + Send + 'async_trait>> where
Self: Send + 'async_trait,
[src]
id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, DeezerError>> + Send + 'async_trait>> where
Self: Send + 'async_trait,
impl<'de> Deserialize<'de> for Genre
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,