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
source: &'static Location<'static>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
error: Errorsource: &'static Location<'static>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
source: &'static Location<'static>A send attempt had been performed on a Stream after it was closed
MaxStreamDataSizeExceeded
Fields
This variant is marked as non-exhaustive
source: &'static Location<'static>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
error: ErrorThe Stream was reset due to a Connection Error
NonReadable
Fields
This variant is marked as non-exhaustive
source: &'static Location<'static>The stream is not readable
NonWritable
Fields
This variant is marked as non-exhaustive
source: &'static Location<'static>The stream is not writable
SendingBlocked
Fields
This variant is marked as non-exhaustive
source: &'static Location<'static>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
source: &'static Location<'static>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
sourceimpl 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
sourceimpl Clone for StreamError
impl Clone for StreamError
sourcefn clone(&self) -> StreamError
fn clone(&self) -> StreamError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for StreamError
impl Debug for StreamError
sourceimpl Display for StreamError
impl Display for StreamError
sourceimpl Error for StreamError
impl Error for StreamError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<'a> From<ConnectionClose<'a>> for StreamError
impl<'a> From<ConnectionClose<'a>> for StreamError
sourcefn from(error: ConnectionClose<'_>) -> Self
fn from(error: ConnectionClose<'_>) -> Self
Converts to this type from the input type.
sourceimpl From<Error> for StreamError
impl From<Error> for StreamError
sourceimpl From<Error> for StreamError
impl From<Error> for StreamError
sourceimpl From<StreamError> for Error
impl From<StreamError> for Error
sourcefn from(error: StreamError) -> Self
fn from(error: StreamError) -> Self
Converts to this type from the input type.
sourceimpl From<StreamError> for ErrorKind
impl From<StreamError> for ErrorKind
sourcefn from(error: StreamError) -> Self
fn from(error: StreamError) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<StreamError> for StreamError
impl PartialEq<StreamError> for StreamError
sourcefn eq(&self, other: &StreamError) -> bool
fn eq(&self, other: &StreamError) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &StreamError) -> bool
fn ne(&self, other: &StreamError) -> bool
This method tests for !=.
sourceimpl TryInto for StreamError
impl TryInto for StreamError
sourcefn application_error(&self) -> Option<Error>
fn application_error(&self) -> Option<Error>
Returns the associated Error, if any
impl Copy for StreamError
impl Eq for StreamError
impl StructuralEq for StreamError
impl StructuralPartialEq for StreamError
Auto Trait Implementations
impl RefUnwindSafe for StreamError
impl Send for StreamError
impl Sync for StreamError
impl Unpin for StreamError
impl UnwindSafe for StreamError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more