Struct carapax::types::ResponseError
source · pub struct ResponseError { /* private fields */ }
Expand description
Represents a response error.
Implementations§
source§impl ResponseError
impl ResponseError
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns a human-readable description of the error.
sourcepub fn error_code(&self) -> Option<i64>
pub fn error_code(&self) -> Option<i64>
Returns an error code.
sourcepub fn retry_after(&self) -> Option<u64>
pub fn retry_after(&self) -> Option<u64>
Returns a number of seconds left to wait before the request can be repeated.
sourcepub fn migrate_to_chat_id(&self) -> Option<i64>
pub fn migrate_to_chat_id(&self) -> Option<i64>
Returns a new identifier of a group which has been migrated to a supergroup.
Trait Implementations§
source§impl Clone for ResponseError
impl Clone for ResponseError
source§fn clone(&self) -> ResponseError
fn clone(&self) -> ResponseError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ResponseError
impl Debug for ResponseError
source§impl Display for ResponseError
impl Display for ResponseError
source§impl Error for ResponseError
impl Error for ResponseError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<ResponseError> for ExecuteError
impl From<ResponseError> for ExecuteError
source§fn from(original: ResponseError) -> ExecuteError
fn from(original: ResponseError) -> ExecuteError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ResponseError
impl RefUnwindSafe for ResponseError
impl Send for ResponseError
impl Sync for ResponseError
impl Unpin for ResponseError
impl UnwindSafe for ResponseError
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more