Expand description
A unique ID used to correlate requests and responses together.
Variants
Number(i64)
Numeric ID.
String(String)
String ID.
Null
Null ID.
While null
is considered a valid request ID by the JSON-RPC 2.0 specification, its use is
strongly discouraged because the specification also uses a null
value to indicate an
unknown ID in the Response
object.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Id
impl<'de> Deserialize<'de> for Id
sourcefn 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
sourceimpl From<NumberOrString> for Id
impl From<NumberOrString> for Id
sourcefn from(num_or_str: NumberOrString) -> Self
fn from(num_or_str: NumberOrString) -> Self
Converts to this type from the input type.
impl Eq for Id
impl StructuralEq for Id
impl StructuralPartialEq for Id
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more