[][src]Enum grammers_mtproto::errors::RequestError

pub enum RequestError {
    RPCError(RpcError),
    Dropped,
    BadMessage {
        code: i32,
    },
    Deserialize(DeserializeError),
}

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.

Fields of BadMessage

code: i32

The code of the bad message error.

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.

Implementations

impl RequestError[src]

pub fn should_retransmit(&self) -> bool[src]

Trait Implementations

impl Debug for RequestError[src]

impl From<DeserializeError> for RequestError[src]

impl From<DeserializeError> for RequestError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.