Expand description
Idiomatic types for building a robust JSON API.
Re-exports§
pub extern crate http;
Modules§
- doc
- Components of a JSON API document.
- error
- The
Errorstruct, theResultalias, and other tools to handle failure. - query
- An API for working with well-known query parameters.
- value
- Represent and interact with JSON API values.
- view
- Low-level utilies for generically rendering a document.
Macros§
- resource
- A DSL for implementing the
Resourcetrait.
Structs§
- Error
- The Error type.
Enums§
Traits§
- Resource
- A trait indicating that the given type can be represented as a resource.
Functions§
- from_
doc - Interpret a
Document<T>as a typeU. - from_
reader - Deserialize a
Document<T>from an IO stream of JSON text and then iterpret it as a typeU. - from_
slice - Deserialize a
Document<T>from bytes of JSON text and then iterpret it as a typeU. - from_
str - Deserialize a
Document<T>from a string of JSON text and then iterpret it as a typeU. - from_
value - Interpret a
Valueas a typeT. - to_doc
- Render type
Tas aDocument<U>. - to_
string - Render type
Tas aDocument<U>and then serialize it as a string of JSON. - to_
string_ pretty - Render type
Tas aDocument<U>and then serialize it as a pretty-printed string of JSON. - to_
value - Convert a
Tinto aValue. - to_vec
- Render type
Tas aDocument<U>and then serialize it as a JSON byte vector. - to_
vec_ pretty - Render type
Tas aDocument<U>and then serialize it as a pretty-printed JSON byte vector. - to_
writer - Render type
Tas aDocument<U>and then serialize it as JSON into the IO stream. - to_
writer_ pretty - Render type
Tas aDocument<U>and then serialize it as pretty-printed JSON into the IO stream.