Enum grammers_mtproto::mtp::RequestError
source · pub enum RequestError {
RpcError(RpcError),
Dropped,
BadMessage {
code: i32,
},
Deserialize(DeserializeError),
}
Expand description
This error occurs when a Remote Procedure call was unsuccessful.
The request should be retransmited when this happens, unless the
variant is InvalidParameters
.
Variants§
RpcError(RpcError)
The parameters used in the request were invalid and caused a Remote Procedure Call error.
Dropped
The call was dropped (cancelled), so the server will not process it.
BadMessage
The message sent to the server was invalid, and the request must be retransmitted.
Deserialize(DeserializeError)
The deserialization of the response that was meant to confirm this request failed, so while the server technically responded to the request its answer is useless as it could not be understood properly.
Trait Implementations§
source§impl Clone for RequestError
impl Clone for RequestError
source§fn clone(&self) -> RequestError
fn clone(&self) -> RequestError
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 RequestError
impl Debug for RequestError
source§impl Display for RequestError
impl Display for RequestError
source§impl Error for RequestError
impl Error for RequestError
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<DeserializeError> for RequestError
impl From<DeserializeError> for RequestError
source§fn from(error: DeserializeError) -> Self
fn from(error: DeserializeError) -> Self
Converts to this type from the input type.
source§impl From<Error> for RequestError
impl From<Error> for RequestError
source§impl PartialEq for RequestError
impl PartialEq for RequestError
source§fn eq(&self, other: &RequestError) -> bool
fn eq(&self, other: &RequestError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RequestError
Auto Trait Implementations§
impl Freeze for RequestError
impl RefUnwindSafe for RequestError
impl Send for RequestError
impl Sync for RequestError
impl Unpin for RequestError
impl UnwindSafe for RequestError
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