pub struct Replies { /* private fields */ }Implementations§
Source§impl Replies
impl Replies
pub fn new() -> Replies
pub fn is_closed(&self) -> bool
Sourcepub fn wait(
&self,
id: u64,
deadline: Instant,
cancel: &AtomicBool,
) -> Option<Reply>
pub fn wait( &self, id: u64, deadline: Instant, cancel: &AtomicBool, ) -> Option<Reply>
Block until the reply for id arrives, the deadline passes, the channel
closes, or cancel is set. Cancel is not signalled through the condvar,
so the wait is capped at 100 ms per iteration to keep polling it.
Returns None for every non-delivery ending. An already-delivered reply
is claimed before any of those checks run, so a reply that landed before
the call wins even against an expired deadline.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Replies
impl RefUnwindSafe for Replies
impl Send for Replies
impl Sync for Replies
impl Unpin for Replies
impl UnsafeUnpin for Replies
impl UnwindSafe for Replies
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