Docs.rs
  • json-api-0.4.1
    • json-api 0.4.1
    • Permalink
    • Docs.rs crate page
    • MIT/Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • zacharygolba
    • Dependencies
      • error-chain ^0.11 normal
      • http ^0.1 normal
      • ordermap ^0.3 normal
      • percent-encoding ^1.0 normal
      • serde ^1.0 normal
      • serde_derive ^1.0 normal
      • serde_json ^1.0 normal
      • serde_qs ^0.3 normal
    • Versions
    • 92.71% of the crate is documented
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate json_api

json_api0.4.1

  • All Items

Crate Items

  • Re-exports
  • Modules
  • Macros
  • Structs
  • Enums
  • Traits
  • Functions

Crates

  • json_api

Crate json_api

Source
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 Error struct, the Result alias, 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 Resource trait.

Structs§

Error
The Error type.

Enums§

Document
Represents a compound JSON API document.
Value
Represents any valid JSON API value.

Traits§

Resource
A trait indicating that the given type can be represented as a resource.

Functions§

from_doc
Interpret a Document<T> as a type U.
from_reader
Deserialize a Document<T> from an IO stream of JSON text and then iterpret it as a type U.
from_slice
Deserialize a Document<T> from bytes of JSON text and then iterpret it as a type U.
from_str
Deserialize a Document<T> from a string of JSON text and then iterpret it as a type U.
from_value
Interpret a Value as a type T.
to_doc
Render type T as a Document<U>.
to_string
Render type T as a Document<U> and then serialize it as a string of JSON.
to_string_pretty
Render type T as a Document<U> and then serialize it as a pretty-printed string of JSON.
to_value
Convert a T into a Value.
to_vec
Render type T as a Document<U> and then serialize it as a JSON byte vector.
to_vec_pretty
Render type T as a Document<U> and then serialize it as a pretty-printed JSON byte vector.
to_writer
Render type T as a Document<U> and then serialize it as JSON into the IO stream.
to_writer_pretty
Render type T as a Document<U> and then serialize it as pretty-printed JSON into the IO stream.

Results

Settings
Help
    struct
    json_api::doc::NewObject
    A resource that does not already exist. Commonly found in …
    struct field
    json_api::doc::NewObject::id
    NewObject -> Option
    An optional string that contains a unique identfier for …
    struct field
    json_api::doc::NewObject::kind
    NewObject -> Key
    Describes resources that share common attributes and …
    struct field
    json_api::doc::NewObject::meta
    NewObject -> Map
    Non-standard meta information. If this value of this field …
    struct field
    json_api::doc::NewObject::links
    NewObject -> Map
    Contains relevant links. If this value of this field is …
    struct field
    json_api::doc::NewObject::attributes
    NewObject -> Map
    Contains some of the object’s data. If this value of …
    struct field
    json_api::doc::NewObject::relationships
    NewObject -> Map
    Describes relationships between this object and other …
    method
    json_api::doc::NewObject::clone
    &NewObject -> NewObject
    method
    json_api::doc::NewObject::serialize
    &NewObject, __S -> Result
    method
    json_api::doc::NewObject::fmt
    &NewObject, &mut Formatter -> Result
    method
    json_api::doc::NewObject::render
    NewObject, Option<&Query> -> Result<Document<NewObject>, Error>
    method
    json_api::doc::NewObject::new
    Key -> NewObject
    Returns a new NewObject.
    method
    json_api::doc::NewObject::deserialize
    __D -> Result<NewObject>
    method
    json_api::doc::NewObject::clone
    &NewObject -> NewObject