pub struct Webhook<'a> {
pub id: Snowflake,
pub webhook_type: u8,
pub guild_id: Option<Snowflake>,
pub channel_id: Option<Snowflake>,
pub user: Option<User<'a>>,
pub name: Option<TitanString<'a>>,
pub avatar: Option<TitanString<'a>>,
pub token: Option<TitanString<'a>>,
pub application_id: Option<Snowflake>,
pub source_guild: Option<WebhookSourceGuild>,
pub source_channel: Option<WebhookSourceChannel>,
pub url: Option<TitanString<'a>>,
}Expand description
A Discord webhook.
Fields§
§id: SnowflakeThe ID of the webhook.
webhook_type: u8The type of the webhook.
guild_id: Option<Snowflake>The guild ID this webhook is for.
channel_id: Option<Snowflake>The channel ID this webhook is for.
user: Option<User<'a>>The user this webhook was created by.
name: Option<TitanString<'a>>The default name of the webhook.
avatar: Option<TitanString<'a>>The default avatar of the webhook.
token: Option<TitanString<'a>>The secure token of the webhook.
application_id: Option<Snowflake>The bot/OAuth2 application that created this webhook.
source_guild: Option<WebhookSourceGuild>The guild of the channel that this webhook is following.
source_channel: Option<WebhookSourceChannel>The channel that this webhook is following.
url: Option<TitanString<'a>>The URL used for executing the webhook.
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Webhook<'a>
impl<'de, 'a> Deserialize<'de> for Webhook<'a>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Webhook<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Webhook<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Serialize for Webhook<'a>
impl<'a> Serialize for Webhook<'a>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Webhook<'a>
impl<'a> RefUnwindSafe for Webhook<'a>
impl<'a> Send for Webhook<'a>
impl<'a> Sync for Webhook<'a>
impl<'a> Unpin for Webhook<'a>
impl<'a> UnwindSafe for Webhook<'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