pub enum RpcId {
Null,
Number(i64),
String(String),
}Expand description
JSON-RPC 2.0 id: a number, a string, or null. Null is required by JSON-RPC 2.0 §5 on an error response to a request whose id couldn’t be determined (parse error / invalid request), so the host must be able to receive it — otherwise a worker’s parse-error reply fails to deserialize and its error is silently swallowed. (The host never sends a null id.)
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RpcId
impl<'de> Deserialize<'de> for RpcId
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 RpcId
impl StructuralPartialEq for RpcId
Auto Trait Implementations§
impl Freeze for RpcId
impl RefUnwindSafe for RpcId
impl Send for RpcId
impl Sync for RpcId
impl Unpin for RpcId
impl UnsafeUnpin for RpcId
impl UnwindSafe for RpcId
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