pub enum StreamShutdown {
Read {
error_code: u64,
},
Write {
error_code: u64,
},
Both {
read_error_code: u64,
write_error_code: u64,
},
}Expand description
Specifies which direction(s) of a stream to shut down.
Used with H3Controller::shutdown_stream and the internal
shutdown_stream function to control whether to send a STOP_SENDING frame
(read direction), and/or a RESET_STREAM frame (write direction)
Note: Despite its name, “shutdown” here refers to signaling the peer about
stream termination, not sending a FIN flag. STOP_SENDING asks the peer to
stop sending data, while RESET_STREAM abruptly terminates the write side.
Variants§
Read
Shut down only the read direction (sends STOP_SENDING frame with the
given error code).
Write
Shut down only the write direction (sends RESET_STREAM frame with the
given error code).
Both
Shut down both directions (sends both STOP_SENDING and RESET_STREAM
frames).
Trait Implementations§
Source§impl Clone for StreamShutdown
impl Clone for StreamShutdown
Source§fn clone(&self) -> StreamShutdown
fn clone(&self) -> StreamShutdown
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamShutdown
impl Debug for StreamShutdown
Source§impl PartialEq for StreamShutdown
impl PartialEq for StreamShutdown
impl Copy for StreamShutdown
impl Eq for StreamShutdown
impl StructuralPartialEq for StreamShutdown
Auto Trait Implementations§
impl Freeze for StreamShutdown
impl RefUnwindSafe for StreamShutdown
impl Send for StreamShutdown
impl Sync for StreamShutdown
impl Unpin for StreamShutdown
impl UnsafeUnpin for StreamShutdown
impl UnwindSafe for StreamShutdown
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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