pub struct RequestId(/* private fields */);Expand description
Correlates an envelope back to the inbound request (HTTP call, RPC, CLI invocation) that
caused it, so an outbound message can be traced to its trigger. Always host-supplied:
there is deliberately no new()/Default, since a minted request id would claim an
inbound request exists when none does (ADR 0038). A host wraps the id it already has with
Self::from_uuid.
use reliar_core::RequestId;
use uuid::Uuid;
// Wrap the inbound request's own id — never minted.
let inbound = Uuid::now_v7();
let request_id = RequestId::from_uuid(inbound);
assert_eq!(request_id, RequestId::from_uuid(request_id.as_uuid()));Implementations§
Source§impl RequestId
impl RequestId
Trait Implementations§
impl Copy for RequestId
Source§impl<'de> Deserialize<'de> for RequestId
Available on crate feature serde only.
impl<'de> Deserialize<'de> for RequestId
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RequestId
Source§impl Ord for RequestId
impl Ord for RequestId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for RequestId
impl PartialOrd for RequestId
impl StructuralPartialEq for RequestId
Auto Trait Implementations§
impl Freeze for RequestId
impl RefUnwindSafe for RequestId
impl Send for RequestId
impl Sync for RequestId
impl Unpin for RequestId
impl UnsafeUnpin for RequestId
impl UnwindSafe for RequestId
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