[−][src]Enum grammers_mtproto::errors::DeserializeError
The error type for the deserialization of server messages.
Variants
The server's authorization key did not match our expectations.
The server's message ID did not match our expectations.
Fields of BadMessageId
got: i64
The server's message length was not strictly positive.
Fields of NegativeMessageLength
got: i32
The server's message length was past the buffer.
The error occured at the transport level, making it impossible to deserialize any data. The absolute value indicates the HTTP error code. Some known, possible codes are:
-
404, if the authorization key used was not found, meaning that the server is not aware of the key used by the client, so it cannot be used to securely communicate with it.
-
429, if too many transport connections are established to the same IP address in a too-short lapse of time.
Fields of TransportError
code: i32
The received buffer is too small to contain a valid response message, or the response seemed valid at first but trying to deserialize it proved the buffer to be too small.
The server responded with compressed data which we failed to decompress.
While deserializing the response types one of them had a constructor that did not match our expectations. The invalid ID is contained within this variant.
Fields of UnexpectedConstructor
id: u32
DecryptionError(DecryptionError)
Attempting to decrypt the message failed in some way.
Trait Implementations
impl Clone for DeserializeError
[src]
fn clone(&self) -> DeserializeError
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for DeserializeError
[src]
impl Debug for DeserializeError
[src]
impl Display for DeserializeError
[src]
impl Error for DeserializeError
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<DecryptionError> for DeserializeError
[src]
fn from(error: DecryptionError) -> Self
[src]
impl From<DeserializeError> for DeserializeError
[src]
fn from(error: DeserializeError) -> Self
[src]
impl From<DeserializeError> for RequestError
[src]
fn from(error: DeserializeError) -> Self
[src]
Auto Trait Implementations
impl RefUnwindSafe for DeserializeError
impl Send for DeserializeError
impl Sync for DeserializeError
impl Unpin for DeserializeError
impl UnwindSafe for DeserializeError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,