Struct serenity::model::permissions::Permissions[][src]

pub struct Permissions { /* fields omitted */ }

A set of permissions that can be assigned to Users and Roles via PermissionOverwrites, roles globally in a Guild, and to GuildChannels.

Methods

impl Permissions

CREATE_INVITE: Permissions = Permissions{bits: 1,}

Allows for the creation of RichInvites.

KICK_MEMBERS: Permissions = Permissions{bits: 2,}

Allows for the kicking of guild members.

BAN_MEMBERS: Permissions = Permissions{bits: 4,}

Allows the banning of guild members.

ADMINISTRATOR: Permissions = Permissions{bits: 8,}

Allows all permissions, bypassing channel permission overwrites.

MANAGE_CHANNELS: Permissions = Permissions{bits: 16,}

Allows management and editing of guild channels.

MANAGE_GUILD: Permissions = Permissions{bits: 32,}

Allows management and editing of the guild.

ADD_REACTIONS: Permissions = Permissions{bits: 64,}

Members with this permission can add new Reactions to a Message. Members can still react using reactions already added to messages without this permission.

VIEW_AUDIT_LOG: Permissions = Permissions{bits: 128,}

Allows viewing a guild's audit logs.

PRIORITY_SPEAKER: Permissions = Permissions{bits: 256,}

Allows the use of priority speaking in voice channels.

READ_MESSAGES: Permissions = Permissions{bits: 1024,}

Allows reading messages in a guild channel. If a user does not have this permission, then they will not be able to see the channel.

SEND_MESSAGES: Permissions = Permissions{bits: 2048,}

Allows sending messages in a guild channel.

SEND_TTS_MESSAGES: Permissions = Permissions{bits: 4096,}

Allows the sending of text-to-speech messages in a channel.

MANAGE_MESSAGES: Permissions = Permissions{bits: 8192,}

Allows the deleting of other messages in a guild channel.

Note: This does not allow the editing of other messages.

EMBED_LINKS: Permissions = Permissions{bits: 16384,}

Allows links from this user - or users of this role - to be embedded, with potential data such as a thumbnail, description, and page name.

ATTACH_FILES: Permissions = Permissions{bits: 32768,}

Allows uploading of files.

READ_MESSAGE_HISTORY: Permissions = Permissions{bits: 65536,}

Allows the reading of a channel's message history.

MENTION_EVERYONE: Permissions = Permissions{bits: 131072,}

Allows the usage of the @everyone mention, which will notify all users in a channel. The @here mention will also be available, and can be used to mention all non-offline users.

Note: You probably want this to be disabled for most roles and users.

USE_EXTERNAL_EMOJIS: Permissions = Permissions{bits: 262144,}

Allows the usage of custom emojis from other guilds.

This does not dictate whether custom emojis in this guild can be used in other guilds.

CONNECT: Permissions = Permissions{bits: 1048576,}

Allows the joining of a voice channel.

SPEAK: Permissions = Permissions{bits: 2097152,}

Allows the user to speak in a voice channel.

MUTE_MEMBERS: Permissions = Permissions{bits: 4194304,}

Allows the muting of members in a voice channel.

DEAFEN_MEMBERS: Permissions = Permissions{bits: 8388608,}

Allows the deafening of members in a voice channel.

MOVE_MEMBERS: Permissions = Permissions{bits: 16777216,}

Allows the moving of members from one voice channel to another.

USE_VAD: Permissions = Permissions{bits: 33554432,}

Allows the usage of voice-activity-detection in a voice channel.

If this is disabled, then Members must use push-to-talk.

CHANGE_NICKNAME: Permissions = Permissions{bits: 67108864,}

Allows members to change their own nickname in the guild.

MANAGE_NICKNAMES: Permissions = Permissions{bits: 134217728,}

Allows members to change other members' nicknames.

MANAGE_ROLES: Permissions = Permissions{bits: 268435456,}

Allows management and editing of roles below their own.

MANAGE_WEBHOOKS: Permissions = Permissions{bits: 536870912,}

Allows management of webhooks.

MANAGE_EMOJIS: Permissions = Permissions{bits: 1073741824,}

Allows management of emojis created without the use of an Integration.

Returns an empty set of flags.

Returns the set containing all flags.

Returns the raw value of the flags currently stored.

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

Returns true if no flags are currently stored.

Returns true if all flags are currently set.

Returns true if there are flags common to both self and other.

Returns true all of the flags in other are contained within self.

Inserts the specified flags in-place.

Removes the specified flags in-place.

Toggles the specified flags in-place.

Inserts or removes the specified flags depending on the passed value.

impl Permissions
[src]

Shorthand for checking that the set of permissions contains the Add Reactions permission.

Shorthand for checking that the set of permissions contains the Administrator permission.

Shorthand for checking that the set of permissions contains the Attach Files permission.

Shorthand for checking that the set of permissions contains the Ban Members permission.

Shorthand for checking that the set of permissions contains the Change Nickname permission.

Shorthand for checking that the set of permissions contains the Connect permission.

Shorthand for checking that the set of permissions contains the View Audit Log permission.

Shorthand for checking that the set of permission contains the Priority Speaker permission.

Shorthand for checking that the set of permissions contains the Create Invite permission.

Shorthand for checking that the set of permissions contains the Deafen Members permission.

Shorthand for checking that the set of permissions contains the Embed Links permission.

Shorthand for checking that the set of permissions contains the Use External Emojis permission.

Shorthand for checking that the set of permissions contains the Kick Members permission.

Shorthand for checking that the set of permissions contains the Manage Channels permission.

Shorthand for checking that the set of permissions contains the Manage Emojis permission.

Shorthand for checking that the set of permissions contains the Manage Guild permission.

Shorthand for checking that the set of permissions contains the Manage Messages permission.

Shorthand for checking that the set of permissions contains the Manage Nicknames permission.

Shorthand for checking that the set of permissions contains the Manage Roles permission.

Shorthand for checking that the set of permissions contains the Manage Webhooks permission.

Shorthand for checking that the set of permissions contains the Mention Everyone permission.

Shorthand for checking that the set of permissions contains the Move Members permission.

Shorthand for checking that the set of permissions contains the Mute Members permission.

Shorthand for checking that the set of permissions contains the Read Message History permission.

Shorthand for checking that the set of permissions contains the Read Messages permission.

Shorthand for checking that the set of permissions contains the Send Messages permission.

Shorthand for checking that the set of permissions contains the Send TTS Messages permission.

Shorthand for checking that the set of permissions contains the Speak permission.

Shorthand for checking that the set of permissions contains the Use External Emojis permission.

Shorthand for checking that the set of permissions contains the Use VAD permission.

Trait Implementations

impl Copy for Permissions
[src]

impl PartialEq for Permissions
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Permissions
[src]

impl Clone for Permissions
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialOrd for Permissions
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Permissions
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Hash for Permissions
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Permissions

Formats the value using the given formatter. Read more

impl Binary for Permissions

Formats the value using the given formatter.

impl Octal for Permissions

Formats the value using the given formatter.

impl LowerHex for Permissions

Formats the value using the given formatter.

impl UpperHex for Permissions

Formats the value using the given formatter.

impl BitOr for Permissions

The resulting type after applying the | operator.

Returns the union of the two sets of flags.

impl BitOrAssign for Permissions

Adds the set of flags.

impl BitXor for Permissions

The resulting type after applying the ^ operator.

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign for Permissions

Toggles the set of flags.

impl BitAnd for Permissions

The resulting type after applying the & operator.

Returns the intersection between the two sets of flags.

impl BitAndAssign for Permissions

Disables all flags disabled in the set.

impl Sub for Permissions

The resulting type after applying the - operator.

Returns the set difference of the two sets of flags.

impl SubAssign for Permissions

Disables all flags enabled in the set.

impl Not for Permissions

The resulting type after applying the ! operator.

Returns the complement of this set of flags.

impl Extend<Permissions> for Permissions

Extends a collection with the contents of an iterator. Read more

impl FromIterator<Permissions> for Permissions

Creates a value from an iterator. Read more

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

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Permissions
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl Send for Permissions

impl Sync for Permissions