[][src]Struct twilight_model::guild::Permissions

pub struct Permissions { /* fields omitted */ }

Implementations

impl Permissions[src]

pub const CREATE_INVITE: Permissions[src]

pub const KICK_MEMBERS: Permissions[src]

pub const BAN_MEMBERS: Permissions[src]

pub const ADMINISTRATOR: Permissions[src]

pub const MANAGE_CHANNELS: Permissions[src]

pub const MANAGE_GUILD: Permissions[src]

pub const ADD_REACTIONS: Permissions[src]

pub const VIEW_AUDIT_LOG: Permissions[src]

pub const PRIORITY_SPEAKER: Permissions[src]

pub const STREAM: Permissions[src]

pub const VIEW_CHANNEL: Permissions[src]

pub const SEND_MESSAGES: Permissions[src]

pub const SEND_TTS_MESSAGES: Permissions[src]

pub const MANAGE_MESSAGES: Permissions[src]

pub const ATTACH_FILES: Permissions[src]

pub const READ_MESSAGE_HISTORY: Permissions[src]

pub const MENTION_EVERYONE: Permissions[src]

pub const USE_EXTERNAL_EMOJIS: Permissions[src]

pub const VIEW_GUILD_INSIGHTS: Permissions[src]

pub const CONNECT: Permissions[src]

pub const SPEAK: Permissions[src]

pub const MUTE_MEMBERS: Permissions[src]

pub const DEAFEN_MEMBERS: Permissions[src]

pub const MOVE_MEMBERS: Permissions[src]

pub const USE_VAD: Permissions[src]

pub const CHANGE_NICKNAME: Permissions[src]

pub const MANAGE_NICKNAMES: Permissions[src]

pub const MANAGE_ROLES: Permissions[src]

pub const MANAGE_WEBHOOKS: Permissions[src]

pub const MANAGE_EMOJIS: Permissions[src]

pub const fn empty() -> Permissions[src]

Returns an empty set of flags

pub const fn all() -> Permissions[src]

Returns the set containing all flags.

pub const fn bits(&self) -> u64[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u64) -> Option<Permissions>[src]

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

pub const fn from_bits_truncate(bits: u64) -> Permissions[src]

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

pub const unsafe fn from_bits_unchecked(bits: u64) -> Permissions[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: Permissions) -> bool[src]

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

pub const fn contains(&self, other: Permissions) -> bool[src]

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

pub fn insert(&mut self, other: Permissions)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: Permissions)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: Permissions)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: Permissions, value: bool)[src]

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

Trait Implementations

impl Binary for Permissions[src]

impl BitAnd<Permissions> for Permissions[src]

type Output = Permissions

The resulting type after applying the & operator.

pub fn bitand(self, other: Permissions) -> Permissions[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<Permissions> for Permissions[src]

pub fn bitand_assign(&mut self, other: Permissions)[src]

Disables all flags disabled in the set.

impl BitOr<Permissions> for Permissions[src]

type Output = Permissions

The resulting type after applying the | operator.

pub fn bitor(self, other: Permissions) -> Permissions[src]

Returns the union of the two sets of flags.

impl BitOrAssign<Permissions> for Permissions[src]

pub fn bitor_assign(&mut self, other: Permissions)[src]

Adds the set of flags.

impl BitXor<Permissions> for Permissions[src]

type Output = Permissions

The resulting type after applying the ^ operator.

pub fn bitxor(self, other: Permissions) -> Permissions[src]

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

impl BitXorAssign<Permissions> for Permissions[src]

pub fn bitxor_assign(&mut self, other: Permissions)[src]

Toggles the set of flags.

impl Clone for Permissions[src]

impl Copy for Permissions[src]

impl Debug for Permissions[src]

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

impl Eq for Permissions[src]

impl Extend<Permissions> for Permissions[src]

impl FromIterator<Permissions> for Permissions[src]

impl Hash for Permissions[src]

impl LowerHex for Permissions[src]

impl Not for Permissions[src]

type Output = Permissions

The resulting type after applying the ! operator.

pub fn not(self) -> Permissions[src]

Returns the complement of this set of flags.

impl Octal for Permissions[src]

impl Ord for Permissions[src]

impl PartialEq<Permissions> for Permissions[src]

impl PartialOrd<Permissions> for Permissions[src]

impl Serialize for Permissions[src]

impl StructuralEq for Permissions[src]

impl StructuralPartialEq for Permissions[src]

impl Sub<Permissions> for Permissions[src]

type Output = Permissions

The resulting type after applying the - operator.

pub fn sub(self, other: Permissions) -> Permissions[src]

Returns the set difference of the two sets of flags.

impl SubAssign<Permissions> for Permissions[src]

pub fn sub_assign(&mut self, other: Permissions)[src]

Disables all flags enabled in the set.

impl UpperHex for Permissions[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Instrument for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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.