pub struct CreateCommandPermission(/* private fields */);
Expand description
A builder for creating an CommandPermission
.
Implementations§
Source§impl CreateCommandPermission
impl CreateCommandPermission
Sourcepub fn role(id: RoleId, allow: bool) -> Self
pub fn role(id: RoleId, allow: bool) -> Self
Creates a permission overwrite for a specific role
Sourcepub fn user(id: UserId, allow: bool) -> Self
pub fn user(id: UserId, allow: bool) -> Self
Creates a permission overwrite for a specific user
Sourcepub fn channel(id: ChannelId, allow: bool) -> Self
pub fn channel(id: ChannelId, allow: bool) -> Self
Creates a permission overwrite for a specific channel
Sourcepub fn everyone(guild_id: GuildId, allow: bool) -> Self
pub fn everyone(guild_id: GuildId, allow: bool) -> Self
Creates a permission overwrite for a everyone in a guild
Sourcepub fn all_channels(guild_id: GuildId, allow: bool) -> Self
pub fn all_channels(guild_id: GuildId, allow: bool) -> Self
Creates a permission overwrite for all channels in a guild
Trait Implementations§
Source§impl Clone for CreateCommandPermission
impl Clone for CreateCommandPermission
Source§fn clone(&self) -> CreateCommandPermission
fn clone(&self) -> CreateCommandPermission
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CreateCommandPermission
impl Debug for CreateCommandPermission
Auto Trait Implementations§
impl Freeze for CreateCommandPermission
impl RefUnwindSafe for CreateCommandPermission
impl Send for CreateCommandPermission
impl Sync for CreateCommandPermission
impl Unpin for CreateCommandPermission
impl UnwindSafe for CreateCommandPermission
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more