[−][src]Enum tbot::errors::HttpsWebhook
Represents possible errors that an HTTPS webhook server may return.
Variants
SetWebhook(MethodCall)
An error during setting the webhook.
SetWebhookTimeout(Elapsed)
Calling the setWebhook
method timed out.
Tls(Error)
An error during initializing TLS.
Bind(Error)
An error during port binding.
Server(Error)
An error while running the server.
Methods
impl HttpsWebhook
[src]
pub fn is_set_webhook(&self) -> bool
[src]
Returns true
if self
is of variant SetWebhook
.
pub fn expect_set_webhook(self) -> MethodCall where
Self: Debug,
[src]
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
.
pub fn set_webhook(self) -> Option<MethodCall>
[src]
Returns Some
if self
is of variant SetWebhook
, and None
otherwise.
pub fn is_set_webhook_timeout(&self) -> bool
[src]
Returns true
if self
is of variant SetWebhookTimeout
.
pub fn expect_set_webhook_timeout(self) -> Elapsed where
Self: Debug,
[src]
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
.
pub fn set_webhook_timeout(self) -> Option<Elapsed>
[src]
Returns Some
if self
is of variant SetWebhookTimeout
, and None
otherwise.
pub fn is_tls(&self) -> bool
[src]
Returns true
if self
is of variant Tls
.
pub fn expect_tls(self) -> Error where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Tls
.
Panics
Panics if the value is not Tls
, with a panic message including the content of self
.
pub fn tls(self) -> Option<Error>
[src]
Returns Some
if self
is of variant Tls
, and None
otherwise.
pub fn is_bind(&self) -> bool
[src]
Returns true
if self
is of variant Bind
.
pub fn expect_bind(self) -> Error where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Bind
.
Panics
Panics if the value is not Bind
, with a panic message including the content of self
.
pub fn bind(self) -> Option<Error>
[src]
Returns Some
if self
is of variant Bind
, and None
otherwise.
pub fn is_server(&self) -> bool
[src]
Returns true
if self
is of variant Server
.
pub fn expect_server(self) -> Error where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Server
.
Panics
Panics if the value is not Server
, with a panic message including the content of self
.
pub fn server(self) -> Option<Error>
[src]
Returns Some
if self
is of variant Server
, and None
otherwise.
Trait Implementations
impl Debug for HttpsWebhook
[src]
impl Display for HttpsWebhook
[src]
impl Error for HttpsWebhook
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<Elapsed> for HttpsWebhook
[src]
impl From<Error> for HttpsWebhook
[src]
impl From<Error> for HttpsWebhook
[src]
impl From<Error> for HttpsWebhook
[src]
impl From<MethodCall> for HttpsWebhook
[src]
#[must_use]
fn from(error: MethodCall) -> Self
[src]
Auto Trait Implementations
impl !RefUnwindSafe for HttpsWebhook
impl Send for HttpsWebhook
impl Sync for HttpsWebhook
impl Unpin for HttpsWebhook
impl !UnwindSafe for HttpsWebhook
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,