#[non_exhaustive]pub enum Error {
InvalidStream {
source: &'static Location<'static>,
},
StreamReset {
error: Error,
source: &'static Location<'static>,
},
SendAfterFinish {
source: &'static Location<'static>,
},
MaxStreamDataSizeExceeded {
source: &'static Location<'static>,
},
ConnectionError {
error: Error,
},
NonReadable {
source: &'static Location<'static>,
},
NonWritable {
source: &'static Location<'static>,
},
SendingBlocked {
source: &'static Location<'static>,
},
NonEmptyOutput {
source: &'static Location<'static>,
},
}
Expand description
Errors that a stream can encounter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidStream
The Stream ID which was referenced is invalid
This could mean the ID is no longer tracked by the Connection.
Fields
This variant is marked as non-exhaustive
StreamReset
The Stream had been reset by the peer via a RESET_STREAM
frame.
Inside this frame the peer will deliver an error code, which will be provided by the parameter.
Fields
This variant is marked as non-exhaustive
SendAfterFinish
A send attempt had been performed on a Stream after it was closed
Fields
This variant is marked as non-exhaustive
MaxStreamDataSizeExceeded
Attempting to write data would exceed the stream limit
This is caused because the maximum possible amount of data (2^62-1 bytes) had already been written to the Stream.
Fields
This variant is marked as non-exhaustive
ConnectionError
The Stream was reset due to a Connection Error
Fields
This variant is marked as non-exhaustive
NonReadable
The stream is not readable
Fields
This variant is marked as non-exhaustive
NonWritable
The stream is not writable
Fields
This variant is marked as non-exhaustive
SendingBlocked
The stream is blocked on writing data
This is caused by trying to send data before polling readiness
Fields
This variant is marked as non-exhaustive
NonEmptyOutput
The stream was provided a non-empty placeholder buffer for receiving data.
The application should ensure only empty buffers are provided to receive calls, otherwise it can lead to data loss on the stream.
Implementations§
source§impl StreamError
impl StreamError
sourcepub fn source(&self) -> &'static Location<'static>
pub fn source(&self) -> &'static Location<'static>
Returns the panic::Location
for the error
Trait Implementations§
source§impl Clone for StreamError
impl Clone for StreamError
source§fn clone(&self) -> StreamError
fn clone(&self) -> StreamError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StreamError
impl Debug for StreamError
source§impl Display for StreamError
impl Display for StreamError
source§impl Error for StreamError
impl Error for StreamError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl<'a> From<ConnectionClose<'a>> for StreamError
impl<'a> From<ConnectionClose<'a>> for StreamError
source§fn from(error: ConnectionClose<'_>) -> StreamError
fn from(error: ConnectionClose<'_>) -> StreamError
source§impl From<Error> for StreamError
impl From<Error> for StreamError
source§fn from(error: Error) -> StreamError
fn from(error: Error) -> StreamError
source§impl From<Error> for StreamError
impl From<Error> for StreamError
source§fn from(error: Error) -> StreamError
fn from(error: Error) -> StreamError
source§impl PartialEq for StreamError
impl PartialEq for StreamError
source§fn eq(&self, other: &StreamError) -> bool
fn eq(&self, other: &StreamError) -> bool
self
and other
values to be equal, and is used
by ==
.