Struct twilight_http::request::channel::webhook::UpdateWebhook
source · pub struct UpdateWebhook<'a> { /* private fields */ }
Expand description
Update a webhook by ID.
Implementations§
source§impl<'a> UpdateWebhook<'a>
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) -> 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.
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<'_>
§type Output = Result<Response<Webhook>, Error>
type Output = Result<Response<Webhook>, Error>
The output that the future will produce on completion.
§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> Send for UpdateWebhook<'a>
impl<'a> Sync for UpdateWebhook<'a>
impl<'a> Unpin for UpdateWebhook<'a>
impl<'a> !UnwindSafe for UpdateWebhook<'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