pub enum ReadError {
Reset(VarInt),
ConnectionLost(ConnectionError),
ClosedStream,
IllegalOrderedRead,
ZeroRttRejected,
}
Expand description
Errors that arise from reading from a stream.
Variants§
Reset(VarInt)
The peer abandoned transmitting data on this stream
Carries an application-defined error code.
ConnectionLost(ConnectionError)
The connection was lost
ClosedStream
The stream has already been stopped, finished, or reset
IllegalOrderedRead
Attempted an ordered read following an unordered read
Performing an unordered read allows discontinuities to arise in the receive buffer of a stream which cannot be recovered, making further ordered reads impossible.
ZeroRttRejected
This was a 0-RTT stream and the server rejected it
Can only occur on clients for 0-RTT streams, which can be opened using
Connecting::into_0rtt()
.
Trait Implementations§
Source§impl Error for ReadError
impl Error for ReadError
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()
Source§impl From<ConnectionError> for ReadError
impl From<ConnectionError> for ReadError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Converts to this type from the input type.
Source§impl From<ReadError> for ReadExactError
impl From<ReadError> for ReadExactError
Source§impl From<ReadError> for ReadToEndError
impl From<ReadError> for ReadToEndError
Source§impl From<ReadableError> for ReadError
impl From<ReadableError> for ReadError
Source§fn from(e: ReadableError) -> Self
fn from(e: ReadableError) -> Self
Converts to this type from the input type.
Source§impl From<ResetError> for ReadError
impl From<ResetError> for ReadError
Source§fn from(e: ResetError) -> Self
fn from(e: ResetError) -> Self
Converts to this type from the input type.
impl Eq for ReadError
impl StructuralPartialEq for ReadError
Auto Trait Implementations§
impl !Freeze for ReadError
impl RefUnwindSafe for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnwindSafe for ReadError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)