Trait xapirpc::RpcHelpers
[−]
[src]
pub trait RpcHelpers { fn from_json(value: &Value) -> Value; fn as_json(&self) -> Value; fn rpc_value(&self) -> Result<&Value, Box<Error + Send + Sync>>; }
Utilities to extract RPC response value and convert them to serde json values
Required Methods
fn from_json(value: &Value) -> Value
Translate the json value into an equivalent xmlrpc value. This is not 1-1, as we have no reasonable way to detect base64, date or i32 values from json.
fn as_json(&self) -> Value
Convert the RPC value to a serde json value
fn rpc_value(&self) -> Result<&Value, Box<Error + Send + Sync>>
Get the "Value" field from a RPC response