pub enum ReadError {
Reset(VarInt),
ConnectionLost(ConnectionError),
ClosedStream,
IllegalOrderedRead,
ZeroRttRejected,
BufferTooShort,
}
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()
.
BufferTooShort
The stream is larger than the user-supplied buffer capacity.
Can only occur when using read_to_end()
.
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 StreamErrorIncoming
Available on crate feature h3
only.
impl From<ReadError> for StreamErrorIncoming
Available on crate feature
h3
only.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<StoppedError> for ReadError
impl From<StoppedError> for ReadError
Source§fn from(e: StoppedError) -> Self
fn from(e: StoppedError) -> 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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more