Struct Pending
pub(super) struct Pending {
pub(super) msg_id: u16,
pub(super) response: Sender<Result<Message, Error>>,
sent: Instant,
reserved: Duration,
}Expand description
A request that waits for its response.
Fields§
§msg_id: u16§response: Sender<Result<Message, Error>>§sent: Instant§reserved: DurationImplementations§
§impl Pending
impl Pending
pub(super) fn new(
msg_id: u16,
response: Sender<Result<Message, Error>>,
sent: Instant,
timeout: Duration,
) -> Self
pub(super) fn new( msg_id: u16, response: Sender<Result<Message, Error>>, sent: Instant, timeout: Duration, ) -> Self
Returns a request sent at sent that times out after timeout.
fn is_expired(&self, now: Instant) -> bool
fn is_expired(&self, now: Instant) -> bool
Returns true if the caller stopped waiting for the response and a
late response is no longer expected at now.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Pending
impl !UnwindSafe for Pending
impl Freeze for Pending
impl Send for Pending
impl Sync for Pending
impl Unpin for Pending
impl UnsafeUnpin for Pending
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