pub enum Error {
Td(error),
Json(Error),
Auth(AuthorizationState),
Cancelled,
MessageFailed(MessageKey, error),
MessageDeleted(MessageKey),
UnexpectedResponse(&'static str),
Disconnected,
}Expand description
An inspectable client failure.
TDLib codes and messages are preserved rather than classified into a
library-defined retry policy. This enum does not represent every unsolicited
update or native log message.
Variants§
Td(error)
TDLib reported an error, preserving its original code and message.
Returned for request failures or delivered as an unsolicited diagnostic
through on_error.
Json(Error)
A request could not be serialized or native output could not be decoded.
Auth(AuthorizationState)
The bot helper encountered an authorization state it does not handle.
Cancelled
Token-triggered cleanup won according to the operation’s cancellation rules.
MessageFailed(MessageKey, error)
A tracked send failed; contains its temporary key and the native error.
MessageDeleted(MessageKey)
A tracked temporary message was deleted by a non-cache update.
UnexpectedResponse(&'static str)
The native response did not have the shape required by this operation.
Disconnected
The owner is unavailable, admission is closed, or a reply was abandoned during teardown.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()