pub struct MeshRequest {
pub request: MeshIpcEnvelope,
pub correlation_id: String,
pub sent_at: Instant,
pub timeout: Duration,
}Expand description
A correlated mesh request awaiting response.
Fields§
§request: MeshIpcEnvelopeRequest envelope.
correlation_id: StringCorrelation ID for matching response.
sent_at: InstantWhen the request was sent.
timeout: DurationTimeout duration.
Implementations§
Source§impl MeshRequest
impl MeshRequest
Sourcepub fn new(envelope: MeshIpcEnvelope, timeout: Duration) -> Self
pub fn new(envelope: MeshIpcEnvelope, timeout: Duration) -> Self
Create a new mesh request with an auto-generated correlation ID.
Sourcepub fn is_timed_out(&self) -> bool
pub fn is_timed_out(&self) -> bool
Check if the request has timed out.
Sourcepub fn matches_response(&self, response: &MeshIpcEnvelope) -> bool
pub fn matches_response(&self, response: &MeshIpcEnvelope) -> bool
Check if a response envelope matches this request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MeshRequest
impl RefUnwindSafe for MeshRequest
impl Send for MeshRequest
impl Sync for MeshRequest
impl Unpin for MeshRequest
impl UnsafeUnpin for MeshRequest
impl UnwindSafe for MeshRequest
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