pub struct ObjectParams { /* private fields */ }
Expand description
Parameter builder to build valid “object or “named” parameters.
This is the equivalent of a JSON Map object { key: value }
.
§Examples
use thin_jsonrpc_client::params::ObjectParams;
let params = ObjectParams::new()
.insert("param1", 1)
.insert("param2", "abc");
// Use RPC parameters...
Implementations§
Source§impl ObjectParams
impl ObjectParams
Trait Implementations§
Source§impl Clone for ObjectParams
impl Clone for ObjectParams
Source§fn clone(&self) -> ObjectParams
fn clone(&self) -> ObjectParams
Returns a duplicate 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 ObjectParams
impl Debug for ObjectParams
Source§impl IntoRpcParams for ObjectParams
impl IntoRpcParams for ObjectParams
Source§fn into_rpc_params(self) -> RpcParams
fn into_rpc_params(self) -> RpcParams
Return the params. These are expected to be encoded to JSON,
and take the form of either an array or object of parameters.
Can return
None
to avoid allocation when returning no parameters.Auto Trait Implementations§
impl Freeze for ObjectParams
impl RefUnwindSafe for ObjectParams
impl Send for ObjectParams
impl Sync for ObjectParams
impl Unpin for ObjectParams
impl UnwindSafe for ObjectParams
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