#[non_exhaustive]pub enum DriveError<E> {
Io(Error),
Handshake(E),
TooLong,
TimedOut,
}Expand description
Why driving a handshake failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io(Error)
The transport failed or closed before the handshake finished.
Handshake(E)
The handshake refused the peer or failed.
TooLong
A peer sent a frame longer than MAX_MESSAGE.
TimedOut
The deadline of an _until loop passed before the handshake was complete.
Trait Implementations§
Source§impl<E: Debug> Debug for DriveError<E>
impl<E: Debug> Debug for DriveError<E>
Source§impl<E: Error + 'static> Display for DriveError<E>
impl<E: Error + 'static> Display for DriveError<E>
Source§impl<E: Error + 'static> Error for DriveError<E>
impl<E: Error + 'static> Error for DriveError<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl<E> !RefUnwindSafe for DriveError<E>
impl<E> !UnwindSafe for DriveError<E>
impl<E> Freeze for DriveError<E>where
E: Freeze,
impl<E> Send for DriveError<E>where
E: Send,
impl<E> Sync for DriveError<E>where
E: Sync,
impl<E> Unpin for DriveError<E>where
E: Unpin,
impl<E> UnsafeUnpin for DriveError<E>where
E: UnsafeUnpin,
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