[][src]Struct xmlrpc::Fault

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

An application-specific error code.

fault_string: String

Human-readable error description.

Implementations

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]

impl Display for Fault[src]

impl Eq for Fault[src]

impl Error for Fault[src]

impl PartialEq<Fault> for Fault[src]

impl StructuralEq for Fault[src]

impl StructuralPartialEq for Fault[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.