pub struct ItemRef<'a> { /* private fields */ }
Expand description

An Item implemented with a borrowed reference to a JSON object.

Implementations

Returns the inner Map as a reference.

Clones the inner Map reference and returns an owned type.

A required unique identifier for an item.

Important

The ID should be unique across all items which have ever appeared in the feed. An item with the same exact ID as another item (even if it is no longer in the current JSON feed items array) are considered the same item.

Version 1.0 Incompatibility

While JSON Feed 1.0 permitted values which could be coerced into JSON strings (e.g. JSON numbers), this model supports only JSON strings. JSON Feed 1.1 strongly suggests to only use strings. In practice, the vast majority of feeds use strings.

If you wish to support non-String IDs, you can directly access the underlying Map with as_map_mut or an equivalent method and read the JSON value.

The optional URL which the item represents.

An optional related external URL to the item.

An optional title for the item.

An optional HTML string representing the content.

An optional plain text string representing the content.

An optional summary of the item.

An optional URL of an image representing the item.

An optional URL of a banner image representing the item.

The date which the item was published in RFC 3339 format.

The date which the item was modified in RFC 3339 format.

An optional author.

Deprecation

The author field is deprecated in favor of the authors field as of JSON Feed 1.1.

An optional array of authors.

An optional array of plain text tags.

The optional language which the feed data is written in.

Valid values are from RFC 5646.

An optional array of relevant resources for the item.

Verifies if the JSON data complies with a specific Version of the JSON Feed spec.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

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

This method tests for !=.

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.