#[non_exhaustive]pub struct Webhook {
pub id: WebhookId,
pub kind: WebhookType,
pub guild_id: Option<GuildId>,
pub channel_id: Option<ChannelId>,
pub user: Option<Box<User>>,
pub name: Option<CompactString>,
pub avatar: Option<ImageHash>,
pub token: Option<CompactString>,
pub application_id: Option<ApplicationId>,
pub source_guild: Option<SourceGuild>,
pub source_channel: Option<SourceChannel>,
pub url: Option<CompactString>,
}Expand description
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.id: WebhookIdThe webhook’s ID.
kind: WebhookTypeWhat kind of webhook this is.
guild_id: Option<GuildId>The guild the webhook belongs to.
channel_id: Option<ChannelId>The channel the webhook posts to.
user: Option<Box<User>>Who created the webhook (absent when the webhook is fetched with its token).
name: Option<CompactString>The default name of the webhook’s messages.
avatar: Option<ImageHash>The default avatar hash.
token: Option<CompactString>The secret token used to execute the webhook (incoming webhooks only).
application_id: Option<ApplicationId>The application that created the webhook.
source_guild: Option<SourceGuild>The guild of the followed channel (channel follower webhooks only).
source_channel: Option<SourceChannel>The followed channel (channel follower webhooks only).
url: Option<CompactString>The URL to execute the webhook (from the webhook.incoming OAuth2 flow).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Webhook
impl<'de> Deserialize<'de> for Webhook
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Webhook
impl StructuralPartialEq for Webhook
Auto Trait Implementations§
impl Freeze for Webhook
impl RefUnwindSafe for Webhook
impl Send for Webhook
impl Sync for Webhook
impl Unpin for Webhook
impl UnsafeUnpin for Webhook
impl UnwindSafe for Webhook
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