Enum iroh_blobs::protocol::Closed
source · #[repr(u16)]pub enum Closed {
StreamDropped = 0,
ProviderTerminating = 1,
RequestReceived = 2,
}
Expand description
Reasons to close connections or stop streams.
A QUIC connection can be closed and a stream can request the other side to
stop sending data. Both closing and stopping have an associated error_code
, closing
also adds a reason
as some arbitrary bytes.
This enum exists so we have a single namespace for error_code
s used.
Variants§
StreamDropped = 0
The RecvStream
was dropped.
Used implicitly when a RecvStream
is dropped without explicit call to
RecvStream::stop
. We don’t use this explicitly but this is here as
documentation as to what happened to 0
.
ProviderTerminating = 1
The provider is terminating.
When a provider terminates all connections and associated streams are closed.
RequestReceived = 2
The provider has received the request.
Only a single request is allowed on a stream, if more data is received after this a provider may send this error code in a STOP_STREAM frame.
Implementations§
Trait Implementations§
source§impl PartialEq for Closed
impl PartialEq for Closed
impl Copy for Closed
impl Eq for Closed
impl StructuralPartialEq for Closed
Auto Trait Implementations§
impl Freeze for Closed
impl RefUnwindSafe for Closed
impl Send for Closed
impl Sync for Closed
impl Unpin for Closed
impl UnwindSafe for Closed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§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
§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
§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
key
and return true
if they are equal.