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

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

Implementations

Returns the inner Map as a reference.

Returns the inner Map as a mutable 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.

Sets the ID.

Removes the ID.

The optional URL which the item represents.

Sets the URL.

Removes the URL.

An optional related external URL to the item.

Sets the external URL.

Removes the external URL.

An optional title for the item.

Sets the title.

Removes the title.

An optional HTML string representing the content.

Sets the HTML content.

Removes the HTML content.

An optional plain text string representing the content.

Sets the plain text content.

Removes the plain text content.

An optional summary of the item.

Sets the summary.

Removes the summary.

An optional URL of an image representing the item.

Sets the image.

Removes the image.

An optional URL of a banner image representing the item.

Sets the banner image.

Removes the banner image.

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

Sets the date published.

Removes the date published.

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

Sets the date modified.

Removes the date modified.

An optional author.

Deprecation

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

An optional author.

Deprecation

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

Sets the author.

Removes the author.

An optional array of authors.

An optional array of authors.

Sets the authors.

Removes the authors.

An optional array of plain text tags.

Sets the tags.

Removes the tags.

The optional language which the feed data is written in.

Valid values are from RFC 5646.

Sets the language.

Removes the language.

An optional array of relevant resources for the item.

An optional array of relevant resources for the item.

Sets the attachments.

Removes the attachments.

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

Trait Implementations

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

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.

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.