pub struct UpdateChannelPermission<'a> { /* private fields */ }
Expand description
Update the permissions for a role or a user in a channel.
§Examples:
Create permission overrides for a role to view the channel, but not send messages:
use twilight_model::{
guild::Permissions,
http::permission_overwrite::{PermissionOverwrite, PermissionOverwriteType},
id::Id,
};
let channel_id = Id::new(123);
let permission_overwrite = PermissionOverwrite {
allow: Some(Permissions::VIEW_CHANNEL),
deny: Some(Permissions::SEND_MESSAGES),
id: Id::new(432),
kind: PermissionOverwriteType::Role,
};
client
.update_channel_permission(channel_id, &permission_overwrite)
.await?;
Trait Implementations§
source§impl<'a> AuditLogReason<'a> for UpdateChannelPermission<'a>
impl<'a> AuditLogReason<'a> for UpdateChannelPermission<'a>
source§impl IntoFuture for UpdateChannelPermission<'_>
impl IntoFuture for UpdateChannelPermission<'_>
source§type Output = Result<Response<EmptyBody>, Error>
type Output = Result<Response<EmptyBody>, Error>
The output that the future will produce on completion.
source§type IntoFuture = ResponseFuture<EmptyBody>
type IntoFuture = ResponseFuture<EmptyBody>
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
source§impl TryIntoRequest for UpdateChannelPermission<'_>
impl TryIntoRequest for UpdateChannelPermission<'_>
Auto Trait Implementations§
impl<'a> Freeze for UpdateChannelPermission<'a>
impl<'a> !RefUnwindSafe for UpdateChannelPermission<'a>
impl<'a> Send for UpdateChannelPermission<'a>
impl<'a> Sync for UpdateChannelPermission<'a>
impl<'a> Unpin for UpdateChannelPermission<'a>
impl<'a> !UnwindSafe for UpdateChannelPermission<'a>
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