Enum grammers_mtproto::transport::Error
source · pub enum Error {
MissingBytes,
BadLen {
got: i32,
},
BadSeq {
expected: i32,
got: i32,
},
BadCrc {
expected: u32,
got: u32,
},
}
Expand description
The error type reported by the different transports when something is wrong.
Certain transports will only produce certain variants of this error.
Unless the variant is MissingBytes
, the connection should not continue.
Variants§
MissingBytes
Not enough bytes are provided.
BadLen
The length is either too short or too long to represent a valid packet.
BadSeq
The sequence number received does not match the expected value.
BadCrc
The checksum of the packet does not match its expected value.
Trait Implementations§
source§impl Error for Error
impl Error for Error
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 PartialEq for Error
impl PartialEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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