Enum xio_webapi::Response[][src]

pub enum Response<T: Default + MayBeSkipped> {
    Ok {
        data: T,
    },
    Error {
        message: String,
    },
}

A message wrapping the response of a XIO Web API request.

Variants

A success response, optionally containing data.

Fields of Ok

The data embedded in the response.

An error response.

Fields of Error

A message describing the error.

Methods

impl<T: Default + MayBeSkipped> Response<T>
[src]

Build a successful response.

Build an error response.

Trait Implementations

impl<T: Clone + Default + MayBeSkipped> Clone for Response<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug + Default + MayBeSkipped> Debug for Response<T>
[src]

Formats the value using the given formatter. Read more

impl<T: PartialEq + Default + MayBeSkipped> PartialEq for Response<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq + Default + MayBeSkipped> Eq for Response<T>
[src]

Auto Trait Implementations

impl<T> Send for Response<T> where
    T: Send

impl<T> Sync for Response<T> where
    T: Sync