#[non_exhaustive]pub struct CreateWebhook {
pub name: CompactString,
pub avatar: Option<ImageData>,
}Expand description
The body of Create Webhook.
The name (1-80 characters) cannot contain clyde or discord.
discord.js counterpart: ChannelWebhookCreateOptions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: CompactStringThe default name of the webhook’s messages.
avatar: Option<ImageData>The default avatar of the webhook’s messages.
Implementations§
Source§impl CreateWebhook
impl CreateWebhook
Sourcepub fn new(name: impl Into<CompactString>) -> Self
pub fn new(name: impl Into<CompactString>) -> Self
A webhook named name, with the default avatar.
discord.js counterpart: ChannelWebhookCreateOptions.
Trait Implementations§
Source§impl Clone for CreateWebhook
impl Clone for CreateWebhook
Source§impl Debug for CreateWebhook
impl Debug for CreateWebhook
impl Eq for CreateWebhook
Source§impl Hash for CreateWebhook
impl Hash for CreateWebhook
Source§impl PartialEq for CreateWebhook
impl PartialEq for CreateWebhook
Source§impl Serialize for CreateWebhook
impl Serialize for CreateWebhook
impl StructuralPartialEq for CreateWebhook
Auto Trait Implementations§
impl !Freeze for CreateWebhook
impl Forget for CreateWebhook
impl Move for CreateWebhook
impl RefUnwindSafe for CreateWebhook
impl Send for CreateWebhook
impl Sync for CreateWebhook
impl Unpin for CreateWebhook
impl UnsafeUnpin for CreateWebhook
impl UnwindSafe for CreateWebhook
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