#[non_exhaustive]pub enum ConnectionRequestId {
Number(i32),
String,
}Expand description
Non-sensitive identity for a JSON-RPC request.
Numeric IDs retain their value for correlation. String IDs are represented only by their kind because their peer-controlled contents may be sensitive.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Number(i32)
A numeric JSON-RPC request ID.
String
A string JSON-RPC request ID, with its contents redacted.
Trait Implementations§
Source§impl Clone for ConnectionRequestId
impl Clone for ConnectionRequestId
Source§fn clone(&self) -> ConnectionRequestId
fn clone(&self) -> ConnectionRequestId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ConnectionRequestId
Source§impl Debug for ConnectionRequestId
impl Debug for ConnectionRequestId
impl Eq for ConnectionRequestId
Source§impl From<&NumberOrString> for ConnectionRequestId
impl From<&NumberOrString> for ConnectionRequestId
Source§impl PartialEq for ConnectionRequestId
impl PartialEq for ConnectionRequestId
impl StructuralPartialEq for ConnectionRequestId
Auto Trait Implementations§
impl Freeze for ConnectionRequestId
impl RefUnwindSafe for ConnectionRequestId
impl Send for ConnectionRequestId
impl Sync for ConnectionRequestId
impl Unpin for ConnectionRequestId
impl UnsafeUnpin for ConnectionRequestId
impl UnwindSafe for ConnectionRequestId
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