pub struct PendingRequests { /* private fields */ }Expand description
Pending request tracker for correlated request-response.
Implementations§
Source§impl PendingRequests
impl PendingRequests
Sourcepub fn set_chain_manager(&mut self, cm: Arc<ChainManager>)
pub fn set_chain_manager(&mut self, cm: Arc<ChainManager>)
Attach a chain manager for exochain audit logging.
Sourcepub fn register(&mut self, request: MeshRequest)
pub fn register(&mut self, request: MeshRequest)
Register a pending request.
Sourcepub fn try_complete(
&mut self,
response: &MeshIpcEnvelope,
) -> Option<MeshRequest>
pub fn try_complete( &mut self, response: &MeshIpcEnvelope, ) -> Option<MeshRequest>
Try to match a response to a pending request, removing it on match.
Sourcepub fn evict_timed_out(&mut self) -> Vec<String>
pub fn evict_timed_out(&mut self) -> Vec<String>
Remove timed-out requests. Returns their correlation IDs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PendingRequests
impl RefUnwindSafe for PendingRequests
impl Send for PendingRequests
impl Sync for PendingRequests
impl Unpin for PendingRequests
impl UnsafeUnpin for PendingRequests
impl UnwindSafe for PendingRequests
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more