Struct twilight_http::request::channel::webhook::UpdateWebhookWithToken
source · [−]pub struct UpdateWebhookWithToken<'a> { /* private fields */ }
Expand description
Update a webhook, with a token, by ID.
Implementations
sourceimpl<'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) -> Result<Self, ValidationError>
pub fn name(self, name: &'a str) -> Result<Self, ValidationError>
Change the name of the webhook.
Errors
Returns an error of type WebhookUsername
if the webhook’s name is
invalid.
sourcepub fn exec(self) -> ResponseFuture<Webhook>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<Webhook>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.
Trait Implementations
sourceimpl TryIntoRequest for UpdateWebhookWithToken<'_>
impl TryIntoRequest for UpdateWebhookWithToken<'_>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for UpdateWebhookWithToken<'a>
impl<'a> Send for UpdateWebhookWithToken<'a>
impl<'a> Sync for UpdateWebhookWithToken<'a>
impl<'a> Unpin for UpdateWebhookWithToken<'a>
impl<'a> !UnwindSafe for UpdateWebhookWithToken<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more