pub struct ResponseQueue<RSP> { /* private fields */ }Expand description
Responses, retrievable in order or by ticket (pyuvm’s ResponseQueue).
Implementations§
Source§impl<RSP> ResponseQueue<RSP>
impl<RSP> ResponseQueue<RSP>
Sourcepub fn get_response(&self, txn_id: Option<TxnId>) -> GetResponse<RSP> ⓘ
pub fn get_response(&self, txn_id: Option<TxnId>) -> GetResponse<RSP> ⓘ
None → whatever is next; Some(id) → that ticket’s answer, however
many others arrive first.
Sourcepub fn try_get_response(&self, txn_id: Option<TxnId>) -> Option<RSP>
pub fn try_get_response(&self, txn_id: Option<TxnId>) -> Option<RSP>
Is it ready yet? Returns None rather than waiting.
The non-blocking half of the pair, as try_put/try_get are to
put/get and try_next_item is to get_next_item. A sequence with
several requests outstanding needs it: blocking on one ticket forces
the collection order back to the order they were issued, and hides the
very thing an out-of-order responder is doing.
Trait Implementations§
Auto Trait Implementations§
impl<RSP> !RefUnwindSafe for ResponseQueue<RSP>
impl<RSP> !Send for ResponseQueue<RSP>
impl<RSP> !Sync for ResponseQueue<RSP>
impl<RSP> !UnwindSafe for ResponseQueue<RSP>
impl<RSP> Freeze for ResponseQueue<RSP>
impl<RSP> Unpin for ResponseQueue<RSP>
impl<RSP> UnsafeUnpin for ResponseQueue<RSP>
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