Struct json_api::doc::NewObject [] [src]

pub struct NewObject {
    pub attributes: Map,
    pub id: Option<String>,
    pub kind: Key,
    pub links: Map<Key, Link>,
    pub meta: Map,
    pub relationships: Map<Key, Relationship>,
    // some fields omitted
}

A resource that does not already exist. Commonly found in the document of a POST request.

For more information, check out the creating resources section of the JSON API specification.

Fields

Contains some of the object's data. If this value of this field is empty, it will not be serialized. For more information, check out the attributes section of the JSON API specification.

An optional string that contains a unique identfier for this resource type (kind). A Some value here should be interpreted as client-generated id. For more information, check out the identification section of the JSON API specification.

Describes resources that share common attributes and relationships. This field is derived from the type field if the object is deserialized. For more information, check out the identification section of the JSON API specification.

Contains relevant links. If this value of this field is empty, it will not be serialized. For more information, check out the links section of the JSON API specification.

Non-standard meta information. If this value of this field is empty, it will not be serialized. For more information, check out the meta information section of the JSON API specification.

Describes relationships between this object and other resource objects. If this value of this field is empty, it will not be serialized. For more information, check out the relationships section of the JSON API specification.

Methods

impl NewObject
[src]

[src]

Returns a new NewObject.

Example

use json_api::doc::NewObject;
let mut obj = NewObject::new("users".parse()?);

Trait Implementations

impl Clone for NewObject
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for NewObject
[src]

[src]

Formats the value using the given formatter.

impl PrimaryData for NewObject
[src]

[src]

impl Render<NewObject> for NewObject
[src]

[src]

Attempts to render the given type as a document. Read more