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 RequestResponse
behaviour is still waiting for a
a response to be sent via RequestResponse::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> !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