pub enum HttpWebhook {
SetWebhook(MethodCall),
SetWebhookTimeout(Elapsed),
Server(Error),
}Expand description
Represents possible errors that a webhook server may return.
Variants§
SetWebhook(MethodCall)
An error while setting the webhook.
SetWebhookTimeout(Elapsed)
Calling the setWebhook method timed out.
Server(Error)
An error while running the server.
Implementations§
Source§impl HttpWebhook
impl HttpWebhook
Sourcepub fn is_set_webhook(&self) -> bool
pub fn is_set_webhook(&self) -> bool
Returns true if self is of variant SetWebhook.
Sourcepub fn expect_set_webhook(self) -> MethodCallwhere
Self: Debug,
pub fn expect_set_webhook(self) -> MethodCallwhere
Self: Debug,
Unwraps the value, yielding the content of SetWebhook.
§Panics
Panics if the value is not SetWebhook, with a panic message including the content of self.
Sourcepub fn set_webhook(self) -> Option<MethodCall>
pub fn set_webhook(self) -> Option<MethodCall>
Returns Some if self is of variant SetWebhook, and None otherwise.
Sourcepub fn is_set_webhook_timeout(&self) -> bool
pub fn is_set_webhook_timeout(&self) -> bool
Returns true if self is of variant SetWebhookTimeout.
Sourcepub fn expect_set_webhook_timeout(self) -> Elapsedwhere
Self: Debug,
pub fn expect_set_webhook_timeout(self) -> Elapsedwhere
Self: Debug,
Unwraps the value, yielding the content of SetWebhookTimeout.
§Panics
Panics if the value is not SetWebhookTimeout, with a panic message including the content of self.
Sourcepub fn set_webhook_timeout(self) -> Option<Elapsed>
pub fn set_webhook_timeout(self) -> Option<Elapsed>
Returns Some if self is of variant SetWebhookTimeout, and None otherwise.
Sourcepub fn expect_server(self) -> Errorwhere
Self: Debug,
pub fn expect_server(self) -> Errorwhere
Self: Debug,
Trait Implementations§
Source§impl Debug for HttpWebhook
impl Debug for HttpWebhook
Source§impl Display for HttpWebhook
impl Display for HttpWebhook
Source§impl Error for HttpWebhook
impl Error for HttpWebhook
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Elapsed> for HttpWebhook
impl From<Elapsed> for HttpWebhook
Source§impl From<Error> for HttpWebhook
impl From<Error> for HttpWebhook
Source§impl From<MethodCall> for HttpWebhook
impl From<MethodCall> for HttpWebhook
Source§fn from(error: MethodCall) -> Self
fn from(error: MethodCall) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HttpWebhook
impl !RefUnwindSafe for HttpWebhook
impl Send for HttpWebhook
impl Sync for HttpWebhook
impl Unpin for HttpWebhook
impl UnsafeUnpin for HttpWebhook
impl !UnwindSafe for HttpWebhook
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