#[non_exhaustive]pub enum StreamError {
StreamError {
code: Code,
reason: String,
},
RemoteTerminate {
code: Code,
},
ConnectionError(ConnectionError),
HeaderTooBig {
actual_size: u64,
max_size: u64,
},
RemoteClosing,
Undefined(Box<dyn Error + Send + Sync>),
}Available on crate feature
h3 only.Expand description
This enum represents a stream error
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
StreamError
The error occurred on the stream
RemoteTerminate
The remote peer terminated the corresponding stream side
Either Reset on peers sending side or StopSending on peers receiving side
ConnectionError(ConnectionError)
The error occurred on the connection
HeaderTooBig
Error is used when violating the MAX_FIELD_SECTION_SIZE
This can mean different things depending on the context When sending a request, this means, that the request cannot be sent because the header is larger then permitted by the server When receiving a request, this means, that the server sent a
Fields
RemoteClosing
Received a GoAway frame from the remote
Stream operations cannot be performed
Undefined(Box<dyn Error + Send + Sync>)
Undefined error propagated by the quic layer
Implementations§
Source§impl StreamError
impl StreamError
Sourcepub fn is_h3_no_error(&self) -> bool
pub fn is_h3_no_error(&self) -> bool
Returns if the error is H3_NO_ERROR
Trait Implementations§
Source§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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for StreamError
impl !RefUnwindSafe for StreamError
impl Send for StreamError
impl Sync for StreamError
impl Unpin for StreamError
impl !UnwindSafe for StreamError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more