pub struct WebhookId(/* private fields */);
Expand description
An identifier for a Webhook
Implementations§
Source§impl WebhookId
impl WebhookId
Sourcepub async fn to_webhook(self, http: impl AsRef<Http>) -> Result<Webhook, Error>
pub async fn to_webhook(self, http: impl AsRef<Http>) -> Result<Webhook, Error>
Requests Webhook
over REST API.
Note: Requires the Manage Webhooks permission.
§Errors
Returns an Error::Http
if the http client errors or if Discord returns an error. Such
as if the WebhookId
does not exist.
May also return an Error::Json
if there is an error in deserialising the response.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WebhookId
impl<'de> Deserialize<'de> for WebhookId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WebhookId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WebhookId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for WebhookId
impl Ord for WebhookId
Source§impl PartialOrd for WebhookId
impl PartialOrd for WebhookId
Source§impl Serialize for WebhookId
impl Serialize for WebhookId
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
impl Copy for WebhookId
impl Eq for WebhookId
impl StructuralPartialEq for WebhookId
Auto Trait Implementations§
impl Freeze for WebhookId
impl RefUnwindSafe for WebhookId
impl Send for WebhookId
impl Sync for WebhookId
impl Unpin for WebhookId
impl UnwindSafe for WebhookId
Blanket Implementations§
Source§impl<T> ArgumentConvert for Twhere
T: FromStr,
impl<T> ArgumentConvert for Twhere
T: FromStr,
Source§fn convert<'life0, 'async_trait>(
__arg0: impl CacheHttp + 'async_trait,
__arg1: Option<GuildId>,
__arg2: Option<ChannelId>,
s: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<T, <T as ArgumentConvert>::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn convert<'life0, 'async_trait>(
__arg0: impl CacheHttp + 'async_trait,
__arg1: Option<GuildId>,
__arg2: Option<ChannelId>,
s: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<T, <T as ArgumentConvert>::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Parses a string
s
as a command parameter of this type.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
Source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.