pub struct UpdateWebhookWithToken<'a> { /* private fields */ }Expand description
Update a webhook, with a token, by ID.
Implementations§
Source§impl<'a> UpdateWebhookWithToken<'a>
impl<'a> UpdateWebhookWithToken<'a>
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 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 IntoFuture for UpdateWebhookWithToken<'_>
impl IntoFuture for UpdateWebhookWithToken<'_>
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 UpdateWebhookWithToken<'_>
impl TryIntoRequest for UpdateWebhookWithToken<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for UpdateWebhookWithToken<'a>
impl<'a> !UnwindSafe for UpdateWebhookWithToken<'a>
impl<'a> Forget for UpdateWebhookWithToken<'a>
impl<'a> Freeze for UpdateWebhookWithToken<'a>
impl<'a> Move for UpdateWebhookWithToken<'a>
impl<'a> Send for UpdateWebhookWithToken<'a>
impl<'a> Sync for UpdateWebhookWithToken<'a>where
RawVecInner: Sync,
NonZero<i32>: Sync,
NonZero<u64>: 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 UpdateWebhookWithToken<'a>
impl<'a> UnsafeUnpin for UpdateWebhookWithToken<'a>where
&'a str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
&'static str: UnsafeUnpin,
&'a Client: UnsafeUnpin,
PhantomData<fn(WebhookMarker) -> WebhookMarker>: UnsafeUnpin,
NonZeroU64Inner: 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