pub struct InFlight {
pub request: SerializedRequest,
pub channel_size: usize,
pub tx: Sender<TransportResult<Response>>,
}Expand description
An in-flight JSON-RPC request.
This struct contains the request that was sent, as well as a channel to receive the response on.
Fields§
§request: SerializedRequestThe request
channel_size: usizeThe number of items to buffer in the subscription channel.
tx: Sender<TransportResult<Response>>The channel to send the response on.
Implementations§
Source§impl InFlight
impl InFlight
Sourcepub fn new(
request: SerializedRequest,
channel_size: usize,
) -> (Self, Receiver<TransportResult<Response>>)
pub fn new( request: SerializedRequest, channel_size: usize, ) -> (Self, Receiver<TransportResult<Response>>)
Create a new in-flight request.
Sourcepub fn is_subscription(&self) -> bool
pub fn is_subscription(&self) -> bool
Check if the request is a subscription.
Sourcepub const fn request(&self) -> &SerializedRequest
pub const fn request(&self) -> &SerializedRequest
Get a reference to the serialized request.
This is used to (re-)send the request over the transport.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InFlight
impl !RefUnwindSafe for InFlight
impl Send for InFlight
impl Sync for InFlight
impl Unpin for InFlight
impl !UnwindSafe for InFlight
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> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 96 bytes