Enum openrpc_types::ParamStructure
source · pub enum ParamStructure {
ByName,
ByPosition,
Either,
}
Expand description
The expected format of the parameters. As per the JSON-RPC 2.0 specification, the params of a JSON-RPC request object may be an array, object, or either (represented as by-position, by-name, and either respectively). When a method has a paramStructure value of by-name, callers of the method MUST send a JSON-RPC request object whose params field is an object. Further, the key names of the params object MUST be the same as the contentDescriptor.names for the given method. Defaults to “either”.
Variants§
Trait Implementations§
source§impl Clone for ParamStructure
impl Clone for ParamStructure
source§fn clone(&self) -> ParamStructure
fn clone(&self) -> ParamStructure
Returns a copy of the value. Read more
1.0.0 · 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 ParamStructure
impl Debug for ParamStructure
source§impl Default for ParamStructure
impl Default for ParamStructure
source§fn default() -> ParamStructure
fn default() -> ParamStructure
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ParamStructure
impl<'de> Deserialize<'de> for ParamStructure
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 Ord for ParamStructure
impl Ord for ParamStructure
source§fn cmp(&self, other: &ParamStructure) -> Ordering
fn cmp(&self, other: &ParamStructure) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ParamStructure
impl PartialEq for ParamStructure
source§fn eq(&self, other: &ParamStructure) -> bool
fn eq(&self, other: &ParamStructure) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ParamStructure
impl PartialOrd for ParamStructure
source§fn partial_cmp(&self, other: &ParamStructure) -> Option<Ordering>
fn partial_cmp(&self, other: &ParamStructure) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ParamStructure
impl Serialize for ParamStructure
impl Copy for ParamStructure
impl Eq for ParamStructure
impl StructuralPartialEq for ParamStructure
Auto Trait Implementations§
impl Freeze for ParamStructure
impl RefUnwindSafe for ParamStructure
impl Send for ParamStructure
impl Sync for ParamStructure
impl Unpin for ParamStructure
impl UnwindSafe for ParamStructure
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)