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
    module
    json_api::value
    Represent and interact with JSON API values.
    enum
    json_api::Value
    Represents any valid JSON API value.
    struct
    json_api::value::collections::map::Values
    An iterator over the values of a Map.
    method
    json_api::value::collections::map::Map::values
    Return an iterator visiting all values in the order in …
    struct
    json_api::value::collections::map::ValuesMut
    A mutable iterator over the values of a Map.
    method
    json_api::value::collections::map::Map::values_mut
    Return an iterator visiting all values mutably in the …
    function
    json_api::to_value
    Convert a T into a Value.
    function
    json_api::from_value
    Interpret a Value as a type T.
    method
    json_api::Value::clone
    &Value -> Value
    method
    json_api::Value::is_f64
    &Value -> bool
    Returns true if the Value is a number that can be …
    method
    json_api::Value::is_i64
    &Value -> bool
    Returns true if the Value is an integer between i64::MIN …
    method
    json_api::Value::is_u64
    &Value -> bool
    Returns true if the Value is an integer between 0 and …
    method
    json_api::Value::is_null
    &Value -> bool
    Returns true if the Value is null.
    method
    json_api::Value::is_array
    &Value -> bool
    Returns true if the Value is an array.
    method
    json_api::Value::is_number
    &Value -> bool
    Returns true if the Value is a number.
    method
    json_api::Value::is_object
    &Value -> bool
    Returns true if the Value is an object.
    method
    json_api::Value::is_string
    &Value -> bool
    Returns true if the Value is a string.
    method
    json_api::Value::is_boolean
    &Value -> bool
    Returns true if the Value is a boolean.
    method
    json_api::Value::as_f64
    &Value -> Option<f64>
    Optionally get the underlying number as an f64. Returns …
    method
    json_api::Value::as_i64
    &Value -> Option<i64>
    Optionally get the underlying number as an i64. Returns …
    method
    json_api::Value::as_u64
    &Value -> Option<u64>
    Optionally get the underlying number as an u64. Returns …
    method
    json_api::Value::as_bool
    &Value -> Option<bool>
    Optionally get the inner boolean value. Returns None if …
    method
    json_api::Value::as_null
    &Value -> Option<()>
    Returns Some(()) if the Value is null.
    method
    json_api::Value::eq
    &Value, &usize -> bool
    method
    json_api::Value::from
    Option<T> -> Value
    where
    T: Into<Value>
    method
    json_api::Value::as_str
    &Value -> Option<&str>
    Optionally get the underlying string as a string slice. …
    method
    json_api::Value::as_object
    &Value -> Option<&Map>
    Optionally get a reference to the inner map. Returns None …
    method
    json_api::Value::serialize
    &Value, S -> Result
    function
    json_api::from_value
    Value -> Result<T, Error>
    Interpret a Value as a type T.
    method
    json_api::Value::fmt
    &Value, &mut Formatter -> Result
    method
    json_api::Value::as_array
    &Value -> Option<&[Value]>
    Optionally get the underlying vector as a slice. Returns …
    method
    json_api::Value::as_object_mut
    &mut Value -> Option<&mut Map>
    Optionally get a mutable reference to the inner map. …
    method
    json_api::Value::as_array_mut
    &mut Value -> Option<&mut [Value]>
    Optionally get the underlying vector as a mutable slice. …
    method
    json_api::query::Builder::filter
    &mut Builder, K, V -> &mut Builder
    where
    V: Into<Value>
    method
    json_api::Value::default
    -> Value
    method
    json_api::Value::from
    Map -> Value
    method
    json_api::Value::deserialize
    D -> Result<Value>
    method
    json_api::Value::from_str
    &str -> Result<Value, FromStr::Err>
    function
    json_api::to_value
    T -> Result<Value, Error>
    Convert a T into a Value.
    method
    json_api::Value::from_iter
    I -> Value
    method
    json_api::Value::clone
    &Value -> Value