Struct xmlrpc::Fault
[−]
[src]
pub struct Fault { pub fault_code: i32, pub fault_string: String, }
A <fault>
response, indicating that a request failed.
The XML-RPC specification requires that a <faultCode>
and <faultString>
is returned in the
<fault>
case, further describing the error.
Fields
fault_code: i32
fault_string: String
Methods
impl Fault
[src]
pub fn from_value(value: &Value) -> Option<Self>
[src]
Creates a Fault
from a Value
.
The Value
must be a Value::Struct
with a faultCode
and faultString
field (and no
other fields).
Returns None
if the value isn't a valid Fault
.
pub fn to_value(&self) -> Value
[src]
Turns this Fault
into an equivalent Value
.
The returned value can be parsed back into a Fault
using Fault::from_value
or returned
as a <fault>
error response by serializing it into a <fault></fault>
tag.
Trait Implementations
impl Debug for Fault
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Fault
[src]
fn eq(&self, __arg_0: &Fault) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Fault) -> bool
[src]
This method tests for !=
.
impl Eq for Fault
[src]
impl Display for Fault
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more