Enum teloxide_core::errors::RequestError
source · [−]pub enum RequestError {
Api(ApiError),
MigrateToChatId(i64),
RetryAfter(Duration),
Network(Error),
InvalidJson {
source: Error,
raw: Box<str>,
},
Io(Error),
}Expand description
An error caused by sending a request to Telegram.
Variants
Api(ApiError)
A Telegram API error.
MigrateToChatId(i64)
The group has been migrated to a supergroup with the specified identifier.
RetryAfter(Duration)
In case of exceeding flood control, the number of seconds left to wait before the request can be repeated.
Network(Error)
Network error while sending a request to Telegram.
InvalidJson
Error while parsing a response from Telegram.
If you’ve received this error, please, open an issue with the description of the error.
Io(Error)
Occurs when trying to send a file to Telegram.
Trait Implementations
sourceimpl AsResponseParameters for RequestError
impl AsResponseParameters for RequestError
fn response_parameters(&self) -> Option<ResponseParameters>
fn retry_after(&self) -> Option<Duration>
fn migrate_to_chat_id(&self) -> Option<i64>
sourceimpl Debug for RequestError
impl Debug for RequestError
sourceimpl Display for RequestError
impl Display for RequestError
sourceimpl Error for RequestError
impl Error for RequestError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for RequestError
impl Send for RequestError
impl Sync for RequestError
impl Unpin for RequestError
impl !UnwindSafe for RequestError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Erasable for T
impl<T> Erasable for T
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
