Struct json_api::doc::Identifier [] [src]

pub struct Identifier {
    pub id: String,
    pub kind: Key,
    pub meta: Map,
    // some fields omitted
}

Identifies an individual resource. Commonly found in an object's relationships.

Identifiers share their equality and hashing behavior with Object. For more information, check out the resource identifier objects section of the JSON API specification.

Fields

A string that contains a unique identfier for this resource type (kind). 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 identifier is deserialized. For more information, check out the identification 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.

Methods

impl Identifier
[src]

[src]

Returns a new Identifier.

Example

use json_api::doc::Identifier;
let mut ident = Identifier::new("users".parse()?, "1".to_owned());

Trait Implementations

impl Clone for Identifier
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Identifier
[src]

[src]

Formats the value using the given formatter.

impl Eq for Identifier
[src]

impl From<Object> for Identifier
[src]

[src]

Performs the conversion.

impl<'a> From<&'a Object> for Identifier
[src]

[src]

Performs the conversion.

impl Hash for Identifier
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for Identifier
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<Object> for Identifier
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Render<Identifier> for Identifier
[src]

[src]

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

impl PrimaryData for Identifier
[src]

[src]