Crate xkcd [−] [src]
A library providing Rust bindings for the XKCD web API.
The library provides a XkcdRequestSender
trait which can be implemented by
various request senders. These implementations may then be used to execute
requests to the API.
If the hyper
feature is enabled during compilation, then this library
provides an implementation of the XkcdRequestSender
trait for the
hyper::Client
of the hyper
library.
Response bodies are deserialized from JSON into structs via the
serde_json
library.
Reexports
pub use self::model::XkcdResponse; |
Modules
comics |
Retrieves information on XKCD comics. |
model |
Struct and enum definitions of values in the XKCD API model. |
random |
Retrieves information on a random XKCD comic. |
Enums
Error |
Represents errors which occur while using the XKCD API. |
HttpRequestError |
Represents errors which occur when sending an HTTP request to the XKCD API. |
Traits
XkcdRequestSender |
Functionality for sending requests to the XKCD API via HTTPS. |
Type Definitions
Result |
A convenient alias type for results for |