pub enum RequestId {
Num(u64),
Str(String),
Null,
}Expand description
Per-request correlation id.
JSON-RPC 2.0 permits numeric, string, or null ids. Servers echo the id unchanged in the matching response. Null is reserved for notifications (fire-and-forget) — DIG RPC does not currently use notifications but we accept the variant for spec compliance.
Variants§
Num(u64)
Numeric id (the typical choice).
Str(String)
String id (useful for UUID correlation).
Null
Null id (spec-allowed for notifications).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RequestId
impl<'de> Deserialize<'de> for RequestId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq 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