pub struct UpdateWebhook<'a> { /* private fields */ }Expand description
Update a webhook by ID.
Implementations§
Source§impl<'a> UpdateWebhook<'a>
Update a webhook by its ID.
impl<'a> UpdateWebhook<'a>
Update a webhook by its ID.
Sourcepub const fn avatar(self, avatar: Option<&'a str>) -> Self
pub const fn avatar(self, avatar: Option<&'a str>) -> Self
Set the avatar of the webhook.
This must be a Data URI, in the form of
data:image/{type};base64,{data} where {type} is the image MIME type
and {data} is the base64-encoded image. See Discord Docs/Image Data.
Sourcepub const fn channel_id(self, channel_id: Id<ChannelMarker>) -> Self
pub const fn channel_id(self, channel_id: Id<ChannelMarker>) -> Self
Move this webhook to a new channel.
Sourcepub fn name(self, name: &'a str) -> Self
pub fn name(self, name: &'a str) -> Self
Change the name of the webhook.
§Errors
Returns an error of type WebhookUsername if the webhook’s name is
invalid.
Trait Implementations§
Source§impl<'a> AuditLogReason<'a> for UpdateWebhook<'a>
impl<'a> AuditLogReason<'a> for UpdateWebhook<'a>
Source§impl IntoFuture for UpdateWebhook<'_>
impl IntoFuture for UpdateWebhook<'_>
Source§type Output = Result<Response<Webhook>, Error>
type Output = Result<Response<Webhook>, Error>
The output that the future will produce on completion.
Source§type IntoFuture = ResponseFuture<Webhook>
type IntoFuture = ResponseFuture<Webhook>
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 UpdateWebhook<'_>
impl TryIntoRequest for UpdateWebhook<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for UpdateWebhook<'a>
impl<'a> !UnwindSafe for UpdateWebhook<'a>
impl<'a> Forget for UpdateWebhook<'a>
impl<'a> Freeze for UpdateWebhook<'a>where
&'a str: Freeze,
PhantomData<fn(ChannelMarker) -> ChannelMarker>: Freeze,
NonZero<u64>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
NonZero<i32>: Freeze,
&'static str: Freeze,
&'a Client: Freeze,
PhantomData<fn(WebhookMarker) -> WebhookMarker>: Freeze,
impl<'a> Move for UpdateWebhook<'a>
impl<'a> Send for UpdateWebhook<'a>
impl<'a> Sync for UpdateWebhook<'a>where
NonZero<u64>: Sync,
RawVecInner: Sync,
NonZero<i32>: Sync,
BoxRaw<[Pos]>: Sync,
Bytes: Sync,
Arc<Config>: Sync,
Arc<Resolver<GenericConnector<TokioRuntimeProvider>>>: Sync,
Arc<ClientConfig>: Sync,
Arc<dyn ResolveServerName + Send + Sync>: Sync,
Arc<dyn Executor<Pin<Box<dyn Future<Output = ()> + Send>>> + Send + Sync>: Sync,
Arc<dyn Timer + Send + Sync>: Sync,
Arc<Mutex<PoolInner<PoolClient<Full<Bytes>>, (Scheme, Authority)>>>: Sync,
BoxRaw<str>: Sync,
Arc<Chan<(Message, Option<Box<dyn FnOnce(Option<Bucket>) -> bool + Send>>), Semaphore>>: Sync,
Arc<Atomic<bool>>: Sync,
impl<'a> Unpin for UpdateWebhook<'a>
impl<'a> UnsafeUnpin for UpdateWebhook<'a>where
&'a str: UnsafeUnpin,
PhantomData<fn(ChannelMarker) -> ChannelMarker>: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
&'static str: UnsafeUnpin,
&'a Client: UnsafeUnpin,
PhantomData<fn(WebhookMarker) -> WebhookMarker>: UnsafeUnpin,
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