[][src]Enum spotify_oauth::SpotifyScope

pub enum SpotifyScope {
    UserReadRecentlyPlayed,
    UserTopRead,
    UserLibraryModify,
    UserLibraryRead,
    PlaylistReadPrivate,
    PlaylistModifyPublic,
    PlaylistModifyPrivate,
    PlaylistReadCollaborative,
    UserReadEmail,
    UserReadBirthDate,
    UserReadPrivate,
    UserReadPlaybackState,
    UserModifyPlaybackState,
    UserReadCurrentlyPlaying,
    AppRemoteControl,
    Streaming,
    UserFollowRead,
    UserFollowModify,
}

Spotify Scopes for the API. This enum implements FromStr and ToString / Display through strum.

All the Spotify API scopes can be found here.

Example

use spotify_oauth::SpotifyScope;
use std::str::FromStr;

// Convert string into scope.
let scope = SpotifyScope::from_str("streaming").unwrap();
assert_eq!(scope, SpotifyScope::Streaming);

// It can also convert the scope back into a string.
assert_eq!(scope.to_string(), "streaming");

// Or the enum can be used normally.
assert_eq!(SpotifyScope::Streaming, scope);

Variants

UserReadRecentlyPlayedUserTopReadUserLibraryModifyUserLibraryReadPlaylistReadPrivatePlaylistModifyPublicPlaylistModifyPrivatePlaylistReadCollaborativeUserReadEmailUserReadBirthDateUserReadPrivateUserReadPlaybackStateUserModifyPlaybackStateUserReadCurrentlyPlayingAppRemoteControlStreamingUserFollowReadUserFollowModify

Trait Implementations

impl Clone for SpotifyScope[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<SpotifyScope> for SpotifyScope[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Display for SpotifyScope[src]

impl Debug for SpotifyScope[src]

impl FromStr for SpotifyScope[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Serialize for SpotifyScope[src]

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

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[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.

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

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

impl<'a, T> TryFrom<&'a str> for T where
    T: FromStr

type Err = <T as FromStr>::Err

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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