Struct libp2p::request_response::ResponseChannel
source · pub struct ResponseChannel<TResponse> { /* private fields */ }
Expand description
A channel for sending a response to an inbound request.
Implementations§
source§impl<TResponse> ResponseChannel<TResponse>
impl<TResponse> ResponseChannel<TResponse>
sourcepub fn is_open(&self) -> bool
pub fn is_open(&self) -> bool
Checks whether the response channel is still open, i.e.
the Behaviour
is still waiting for a
a response to be sent via Behaviour::send_response
and this response channel.
If the response channel is no longer open then the inbound request timed out waiting for the response.
Trait Implementations§
Auto Trait Implementations§
impl<TResponse> Freeze for ResponseChannel<TResponse>
impl<TResponse> !RefUnwindSafe for ResponseChannel<TResponse>
impl<TResponse> Send for ResponseChannel<TResponse>where
TResponse: Send,
impl<TResponse> Sync for ResponseChannel<TResponse>where
TResponse: Send,
impl<TResponse> Unpin for ResponseChannel<TResponse>
impl<TResponse> !UnwindSafe for ResponseChannel<TResponse>
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