Enum s2n_quic_transport::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: Error
source: &'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: Error
The 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<'a> From<ConnectionClose<'a>> for StreamError
impl<'a> From<ConnectionClose<'a>> for StreamError
sourcefn from(error: ConnectionClose<'_>) -> StreamError
fn from(error: ConnectionClose<'_>) -> StreamError
Converts to this type from the input type.
sourceimpl From<Error> for StreamError
impl From<Error> for StreamError
sourcefn from(error: Error) -> StreamError
fn from(error: Error) -> StreamError
Converts to this type from the input type.
sourceimpl From<Error> for StreamError
impl From<Error> for StreamError
sourcefn from(error: Error) -> StreamError
fn from(error: Error) -> StreamError
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more