Enum twitch_oauth2::Scope

source ·
#[non_exhaustive]
pub enum Scope {
Show 67 variants AnalyticsReadExtensions, AnalyticsReadGames, BitsRead, ChannelBot, ChannelEditCommercial, ChannelManageAds, ChannelManageBroadcast, ChannelManageExtensions, ChannelManageModerators, ChannelManagePolls, ChannelManagePredictions, ChannelManageRaids, ChannelManageRedemptions, ChannelManageSchedule, ChannelManageVideos, ChannelManageVips, ChannelModerate, ChannelReadAds, ChannelReadCharity, ChannelReadEditors, ChannelReadGoals, ChannelReadHypeTrain, ChannelReadPolls, ChannelReadPredictions, ChannelReadRedemptions, ChannelReadStreamKey, ChannelReadSubscriptions, ChannelReadVips, ChannelSubscriptions, ChatEdit, ChatRead, ClipsEdit, ModerationRead, ModeratorManageAnnouncements, ModeratorManageAutoMod, ModeratorManageAutomodSettings, ModeratorManageBannedUsers, ModeratorManageBlockedTerms, ModeratorManageChatMessages, ModeratorManageChatSettings, ModeratorManageShieldMode, ModeratorManageShoutouts, ModeratorReadAutomodSettings, ModeratorReadBlockedTerms, ModeratorReadChatSettings, ModeratorReadChatters, ModeratorReadFollowers, ModeratorReadShieldMode, ModeratorReadShoutouts, UserBot, UserEdit, UserEditBroadcast, UserEditFollows, UserManageBlockedUsers, UserManageChatColor, UserManageWhispers, UserReadBlockedUsers, UserReadBroadcast, UserReadChat, UserReadEmail, UserReadFollows, UserReadModeratedChannels, UserReadSubscriptions, UserWriteChat, WhispersEdit, WhispersRead, Other(Cow<'static, str>),
}
Expand description

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AnalyticsReadExtensions

View analytics data for the Twitch Extensions owned by the authenticated account.

analytics:read:extensions

§

AnalyticsReadGames

View analytics data for the games owned by the authenticated account.

analytics:read:games

§

BitsRead

View Bits information for a channel.

bits:read

§

ChannelBot

Allows the client’s bot users access to a channel.

channel:bot

§

ChannelEditCommercial

Run commercials on a channel.

channel:edit:commercial

§

ChannelManageAds

Manage ads schedule on a channel.

channel:manage:ads

§

ChannelManageBroadcast

Manage a channel’s broadcast configuration, including updating channel configuration and managing stream markers and stream tags.

channel:manage:broadcast

§

ChannelManageExtensions

Manage a channel’s Extension configuration, including activating Extensions.

channel:manage:extensions

§

ChannelManageModerators

Add or remove the moderator role from users in your channel.

channel:manage:moderators

§

ChannelManagePolls

Manage a channel’s polls.

channel:manage:polls

§

ChannelManagePredictions

Manage of channel’s Channel Points Predictions

channel:manage:predictions

§

ChannelManageRaids

Manage a channel raiding another channel.

channel:manage:raids

§

ChannelManageRedemptions

Manage Channel Points custom rewards and their redemptions on a channel.

channel:manage:redemptions

§

ChannelManageSchedule

Manage a channel’s stream schedule.

channel:manage:schedule

§

ChannelManageVideos

Manage a channel’s videos, including deleting videos.

channel:manage:videos

§

ChannelManageVips

Add or remove the VIP role from users in your channel.

channel:manage:vips

§

ChannelModerate

Perform moderation actions in a channel. The user requesting the scope must be a moderator in the channel.

channel:moderate

§

ChannelReadAds

Read the ads schedule and details on your channel.

channel:read:ads

§

ChannelReadCharity

Read charity campaign details and user donations on your channel.

channel:read:charity

§

ChannelReadEditors

View a list of users with the editor role for a channel.

channel:read:editors

§

ChannelReadGoals

View Creator Goals for a channel.

channel:read:goals

§

ChannelReadHypeTrain

View Hype Train information for a channel.

channel:read:hype_train

§

ChannelReadPolls

View a channel’s polls.

channel:read:polls

§

ChannelReadPredictions

View a channel’s Channel Points Predictions.

channel:read:predictions

§

ChannelReadRedemptions

View Channel Points custom rewards and their redemptions on a channel.

channel:read:redemptions

§

ChannelReadStreamKey

View an authorized user’s stream key.

channel:read:stream_key

§

ChannelReadSubscriptions

View a list of all subscribers to a channel and check if a user is subscribed to a channel.

channel:read:subscriptions

§

ChannelReadVips

Read the list of VIPs in your channel.

channel:read:vips

§

ChannelSubscriptions

👎Deprecated: Use ChannelReadSubscriptions (channel:read:subscriptions) instead

Read all subscribers to your channel.

channel_subscriptions

§

ChatEdit

Send live stream chat and rooms messages.

chat:edit

§

ChatRead

View live stream chat and rooms messages.

chat:read

§

ClipsEdit

Manage Clips for a channel.

clips:edit

§

ModerationRead

View a channel’s moderation data including Moderators, Bans, Timeouts, and Automod settings.

moderation:read

§

ModeratorManageAnnouncements

Send announcements in channels where you have the moderator role.

moderator:manage:announcements

§

ModeratorManageAutoMod

Manage messages held for review by AutoMod in channels where you are a moderator.

moderator:manage:automod

§

ModeratorManageAutomodSettings

Manage a broadcaster’s AutoMod settings

moderator:manage:automod_settings

§

ModeratorManageBannedUsers

Ban and unban users.

moderator:manage:banned_users

§

ModeratorManageBlockedTerms

Manage a broadcaster’s list of blocked terms.

moderator:manage:blocked_terms

§

ModeratorManageChatMessages

Delete chat messages in channels where you have the moderator role

moderator:manage:chat_messages

§

ModeratorManageChatSettings

View a broadcaster’s chat room settings.

moderator:manage:chat_settings

§

ModeratorManageShieldMode

Manage a broadcaster’s Shield Mode status.

moderator:manage:shield_mode

§

ModeratorManageShoutouts

Manage a broadcaster’s shoutouts.

moderator:manage:shoutouts

§

ModeratorReadAutomodSettings

View a broadcaster’s AutoMod settings.

moderator:read:automod_settings

§

ModeratorReadBlockedTerms

View a broadcaster’s list of blocked terms.

moderator:read:blocked_terms

§

ModeratorReadChatSettings

View a broadcaster’s chat room settings.

moderator:read:chat_settings

§

ModeratorReadChatters

View the chatters in a broadcaster’s chat room.

moderator:read:chatters

§

ModeratorReadFollowers

Read the followers of a broadcaster.

moderator:read:followers

§

ModeratorReadShieldMode

View a broadcaster’s Shield Mode status.

moderator:read:shield_mode

§

ModeratorReadShoutouts

View a broadcaster’s shoutouts.

moderator:read:shoutouts

§

UserBot

Allows client’s bot to act as this user.

user:bot

§

UserEdit

Manage a user object.

user:edit

§

UserEditBroadcast

Edit your channel’s broadcast configuration, including extension configuration. (This scope implies user:read:broadcast capability.)

user:edit:broadcast

§

UserEditFollows

👎Deprecated: Not used anymore, see https://discuss.dev.twitch.tv/t/deprecation-of-create-and-delete-follows-api-endpoints/32351

[DEPRECATED] Was previously used for “Create User Follows” and “Delete User Follows.

user:edit:follows

§

UserManageBlockedUsers

Manage the block list of a user.

user:manage:blocked_users

§

UserManageChatColor

Update the color used for the user’s name in chat.Update User Chat Color

user:manage:chat_color

§

UserManageWhispers

Read whispers that you send and receive, and send whispers on your behalf.

user:manage:whispers

§

UserReadBlockedUsers

View the block list of a user.

user:read:blocked_users

§

UserReadBroadcast

View a user’s broadcasting configuration, including Extension configurations.

user:read:broadcast

§

UserReadChat

View live stream chat and room messages.

user:read:chat

§

UserReadEmail

View a user’s email address.

user:read:email

§

UserReadFollows

View the list of channels a user follows.

user:read:follows

§

UserReadModeratedChannels

Read the list of channels you have moderator privileges in.

user:read:moderated_channels

§

UserReadSubscriptions

View if an authorized user is subscribed to specific channels.

user:read:subscriptions

§

UserWriteChat

Send messages in a chat room.

user:write:chat

§

WhispersEdit

Send whisper messages.

whispers:edit

§

WhispersRead

View your whisper messages.

whispers:read

§

Other(Cow<'static, str>)

Other scope that is not implemented.

Implementations§

source§

impl Scope

source

pub fn all() -> Vec<Scope>

Get a vec of all defined twitch Scopes.

Please note that this may not work for you, as some auth flows and “apis” don’t accept all scopes

source

pub const fn all_slice() -> &'static [Scope]

Get a slice of all defined twitch Scopes.

Please note that this may not work for you, as some auth flows and “apis” don’t accept all scopes

source

pub const fn description(&self) -> &'static str

Get a description for the token

source

pub fn parse<C>(s: C) -> Scope
where C: Into<Cow<'static, str>>,

Make a scope from a cow string

source

pub fn as_str(&self) -> &str

Get the scope as a borrowed string.

source

pub const fn as_static_str(&self) -> &'static str

Get the scope as a static string slice.

§Panics

This function panics if the scope can’t be represented as a static string slice

source§

impl Scope

source

pub const fn to_validator(self) -> Validator

Get the scope as a validator.

Trait Implementations§

source§

impl Borrow<str> for Scope

source§

fn borrow(&self) -> &str

Immutably borrows from an owned value. Read more
source§

impl Clone for Scope

source§

fn clone(&self) -> Scope

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Scope

source§

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

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Scope

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Scope

source§

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

Formats the value using the given formatter. Read more
source§

impl From<Scope> for String

source§

fn from(s: Scope) -> Self

Converts to this type from the input type.
source§

impl From<Scope> for Validator

source§

fn from(scope: Scope) -> Self

Converts to this type from the input type.
source§

impl From<String> for Scope

source§

fn from(s: String) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Scope

source§

fn eq(&self, other: &Scope) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Scope

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Scope

source§

impl StructuralPartialEq for Scope

Auto Trait Implementations§

§

impl Freeze for Scope

§

impl RefUnwindSafe for Scope

§

impl Send for Scope

§

impl Sync for Scope

§

impl Unpin for Scope

§

impl UnwindSafe for Scope

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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> 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 T
where 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 for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

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
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
source§

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