Struct serenity::model::permissions::Permissions [−][src]
pub struct Permissions { pub bits: u64, }
Expand description
A set of permissions that can be assigned to User
s and Role
s via
PermissionOverwrite
s, roles globally in a Guild
, and to
GuildChannel
s.
Fields
bits: u64
The flags making up the permissions.
Note
Do not modify this yourself; use the provided methods. Do the same when creating, unless you’re absolutely certain that you’re giving valid permission flags.
Implementations
Allows for the creation of RichInvite
s.
Allows for the kicking of guild members.
Allows the banning of guild members.
Allows all permissions, bypassing channel permission overwrites.
Allows management and editing of guild channels.
Allows management and editing of the guild.
Allows viewing a guild’s audit logs.
Allows the use of priority speaking in voice channels.
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.
Allows sending messages in a guild channel.
Allows the sending of text-to-speech messages in a channel.
Allows the deleting of other messages in a guild channel.
Note: This does not allow the editing of other messages.
Allows links from this user - or users of this role - to be embedded, with potential data such as a thumbnail, description, and page name.
Allows uploading of files.
Allows the reading of a channel’s message history.
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.
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.
Allows the joining of a voice channel.
Allows the user to speak in a voice channel.
Allows the muting of members in a voice channel.
Allows the deafening of members in a voice channel.
Allows the moving of members from one voice channel to another.
Allows members to change their own nickname in the guild.
Allows members to change other members’ nicknames.
Allows management and editing of roles below their own.
Allows management of webhooks.
Allows management of emojis created without the use of an
Integration
.
Allows for requesting to speak in stage channels.
Allows using slash commands.
Returns an empty set of flags
Returns the set containing all flags.
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.
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
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.
Returns a list of names of all contained permissions.
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 permission contains the Stream 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 Request To 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 Slash Commands permission.
Trait Implementations
Returns the intersection between the two sets of flags.
type Output = Permissions
type Output = Permissions
The resulting type after applying the &
operator.
Disables all flags disabled in the set.
Returns the union of the two sets of flags.
type Output = Permissions
type Output = Permissions
The resulting type after applying the |
operator.
Adds the set of flags.
Returns the left flags, but with all the right flags toggled.
type Output = Permissions
type Output = Permissions
The resulting type after applying the ^
operator.
Toggles the set of flags.
Deserialize this value from the given Serde deserializer. Read more
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Creates a value from an iterator. Read more
Returns the complement of this set of flags.
type Output = Permissions
type Output = Permissions
The resulting type after applying the !
operator.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Returns the set difference of the two sets of flags.
type Output = Permissions
type Output = Permissions
The resulting type after applying the -
operator.
Disables all flags enabled in the set.
Auto Trait Implementations
impl RefUnwindSafe for Permissions
impl Send for Permissions
impl Sync for Permissions
impl Unpin for Permissions
impl UnwindSafe for Permissions
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V