Struct dazeus::Response [] [src]

pub struct Response { /* fields omitted */ }

The response from a command send to the DaZeus server.

Methods

impl Response
[src]

Create a new response based upon a failure message.

This is used where the API expected a response returned but the DaZeus core could not provide a valid response.

Create a new response based upon a successful operation.

This is used when the API expected a response, but the DaZeus core was not called.

Create a new response based on a Json object.

This is used by the bindings to create a new Response based on a json blob returned by the DaZeus core instance.

Retrieve a property from the data object or return a default if it doesn't exist.

Retrieve a property from the data object.

Returns Some(data) if the property exists, or None if the property doesn't exist.

Retrieve a string from the data object.

Returns Some(str) if the property exists and it was a string property, or None if the property doesn't exist, or if it isn't of type Json::String.

Retrieve a string from the data object, or return a default if no such string can be found.

Returns whether or not a property with the given name exists.

Check whether a Response contains a success property and whether it was true.

Trait Implementations

impl Debug for Response
[src]

Formats the value using the given formatter.

impl Clone for Response
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Response
[src]

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

This method tests for !=.