Enum s2n_quic_core::stream::StreamError
source · #[non_exhaustive]pub enum StreamError {
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
Fields
This variant is marked as non-exhaustive
The Stream ID which was referenced is invalid
This could mean the ID is no longer tracked by the Connection.
StreamReset
Fields
This variant is marked as non-exhaustive
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.
SendAfterFinish
Fields
This variant is marked as non-exhaustive
A send attempt had been performed on a Stream after it was closed
MaxStreamDataSizeExceeded
Fields
This variant is marked as non-exhaustive
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.
ConnectionError
Fields
This variant is marked as non-exhaustive
The Stream was reset due to a Connection Error
NonReadable
Fields
This variant is marked as non-exhaustive
The stream is not readable
NonWritable
Fields
This variant is marked as non-exhaustive
The stream is not writable
SendingBlocked
Fields
This variant is marked as non-exhaustive
The stream is blocked on writing data
This is caused by trying to send data before polling readiness
NonEmptyOutput
Fields
This variant is marked as non-exhaustive
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<'_>) -> 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
impl From<StreamError> for Error
source§fn from(error: StreamError) -> Self
fn from(error: StreamError) -> Self
source§impl From<StreamError> for ErrorKind
impl From<StreamError> for ErrorKind
source§fn from(error: StreamError) -> Self
fn from(error: StreamError) -> Self
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 ==.