#[non_exhaustive]pub enum StreamError {
#[non_exhaustive] InvalidStream {
source: &'static Location<'static>,
},
#[non_exhaustive] StreamReset {
error: Error,
source: &'static Location<'static>,
},
#[non_exhaustive] SendAfterFinish {
source: &'static Location<'static>,
},
#[non_exhaustive] MaxStreamDataSizeExceeded {
source: &'static Location<'static>,
},
#[non_exhaustive] ConnectionError {
error: Error,
},
#[non_exhaustive] NonReadable {
source: &'static Location<'static>,
},
#[non_exhaustive] NonWritable {
source: &'static Location<'static>,
},
#[non_exhaustive] SendingBlocked {
source: &'static Location<'static>,
},
#[non_exhaustive] NonEmptyOutput {
source: &'static Location<'static>,
},
}Expand description
Errors that a stream can encounter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[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
#[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
#[non_exhaustive]SendAfterFinish
A send attempt had been performed on a Stream after it was closed
Fields
This variant is marked as non-exhaustive
#[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
#[non_exhaustive]ConnectionError
The Stream was reset due to a Connection Error
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]NonReadable
The stream is not readable
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]NonWritable
The stream is not writable
Fields
This variant is marked as non-exhaustive
#[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
#[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
Available on crate feature std only.
impl Error for StreamError
std only.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 From<ConnectionClose<'_>> for StreamError
impl From<ConnectionClose<'_>> for StreamError
Source§fn from(error: ConnectionClose<'_>) -> Self
fn from(error: ConnectionClose<'_>) -> Self
Source§impl From<Error> for StreamError
impl From<Error> for StreamError
Source§impl From<Error> for StreamError
impl From<Error> for StreamError
Source§impl From<StreamError> for Error
Available on crate feature std only.
impl From<StreamError> for Error
std only.Source§fn from(error: StreamError) -> Self
fn from(error: StreamError) -> Self
Source§impl From<StreamError> for ErrorKind
Available on crate feature std only.
impl From<StreamError> for ErrorKind
std only.