Expand description
This module contains errors that can be returned by the library.
This module contains errors:
HandlerError
ExtractionError
SessionErrorKind
TelegramErrorKind
ConvertToTypeError
Check the documentation for each error to see what it means.
Re-exports§
pub use convert::ConvertToType as ConvertToTypeError;
pub use event::ErrorKind as EventErrorKind;
pub use extractor::Error as ExtractionError;
pub use handler::Error as HandlerError;
pub use middleware::Error as MiddlewareError;
pub use session::ErrorKind as SessionErrorKind;
pub use telegram::ErrorKind as TelegramErrorKind;
Modules§
- This module contains the error
ConvertToType
that can occur when type be converted to the desired type. For example, if you try to convert anUpdate
to aMessage
type, but the update represents aCallbackQuery
, you got this error. - This module contains the error types that can occur when processing an event
- This module contains the
Error
struct, which is a wrapper for any error that can occur when processing a handler. We use this wrapper aroundanyhow::Error
, because it allows us to wrap any error type, including custom errors and don’t useanyhow::Error
directly. - This module contains the
Error
struct, which is a wrapper for any error that can occur when processing a middleware. We use this wrapper aroundanyhow::Error
, because it allows us to wrap any error type, including custom errors and don’t useanyhow::Error
directly. - This module contains the
ErrorKind
enum, which is a wrapper for any error that can occur when processing sending request to the Telegram Bot API and parsing responses from it. Usually it’s a wrapper forTelegramErrorKind
errors, but it can also been a wrapper for any other error that can occur when sending request or parsing response, for exampleserde_json::Error
. - This module contains the
ErrorKind
enum that reprensents Telegram Bot API errors.