pub enum RawJsonRpcParams {
Array(Vec<Value>),
Object(Map<String, Value>),
}Expand description
Raw JSON-RPC request or notification parameters.
JSON-RPC params, when present, must be either an array or an object.
Variants§
Implementations§
Source§impl RawJsonRpcParams
impl RawJsonRpcParams
Sourcepub fn from_value(value: Value) -> Result<Option<Self>, Error>
pub fn from_value(value: Value) -> Result<Option<Self>, Error>
Convert a JSON value into JSON-RPC params.
Sourcepub fn into_value(self) -> Value
pub fn into_value(self) -> Value
Convert params back into a JSON value.
Trait Implementations§
Source§impl Clone for RawJsonRpcParams
impl Clone for RawJsonRpcParams
Source§fn clone(&self) -> RawJsonRpcParams
fn clone(&self) -> RawJsonRpcParams
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 moreSource§impl Debug for RawJsonRpcParams
impl Debug for RawJsonRpcParams
Source§impl<'de> Deserialize<'de> for RawJsonRpcParams
impl<'de> Deserialize<'de> for RawJsonRpcParams
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
Source§impl PartialEq for RawJsonRpcParams
impl PartialEq for RawJsonRpcParams
Source§fn eq(&self, other: &RawJsonRpcParams) -> bool
fn eq(&self, other: &RawJsonRpcParams) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RawJsonRpcParams
impl Serialize for RawJsonRpcParams
impl StructuralPartialEq for RawJsonRpcParams
Auto Trait Implementations§
impl Freeze for RawJsonRpcParams
impl RefUnwindSafe for RawJsonRpcParams
impl Send for RawJsonRpcParams
impl Sync for RawJsonRpcParams
impl Unpin for RawJsonRpcParams
impl UnsafeUnpin for RawJsonRpcParams
impl UnwindSafe for RawJsonRpcParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.