pub enum JsonRpcId {
I64(i64),
U64(u64),
Str(String),
}Expand description
JSON-RPC id: null, integer (signed or unsigned), or string.
I64 covers i64::MIN..=i64::MAX; U64 covers
i64::MAX + 1..=u64::MAX. Serde’s untagged deserialize tries
variants in order so 0..=i64::MAX lands in I64 and
i64::MAX + 1..=u64::MAX in U64.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JsonRpcId
impl<'de> Deserialize<'de> for JsonRpcId
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 JsonRpcId
impl StructuralPartialEq for JsonRpcId
Auto Trait Implementations§
impl Freeze for JsonRpcId
impl RefUnwindSafe for JsonRpcId
impl Send for JsonRpcId
impl Sync for JsonRpcId
impl Unpin for JsonRpcId
impl UnsafeUnpin for JsonRpcId
impl UnwindSafe for JsonRpcId
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