Struct feed_rs::model::Entry[][src]

pub struct Entry {
Show 13 fields pub id: String, pub title: Option<Text>, pub updated: Option<DateTime<Utc>>, pub authors: Vec<Person>, pub content: Option<Content>, pub links: Vec<Link>, pub summary: Option<Text>, pub categories: Vec<Category>, pub contributors: Vec<Person>, pub published: Option<DateTime<Utc>>, pub source: Option<String>, pub rights: Option<Text>, pub media: Vec<MediaObject>,
}
Expand description

An item within a feed

Fields

id: String

A unique identifier for this item with a feed. If not supplied it is initialised to a hash of the first link or a UUID if not available.

  • Atom (required): Identifies the entry using a universally unique and permanent URI.
  • RSS 2 (optional) “guid”: A string that uniquely identifies the item.
  • RSS 1: does not specify a unique ID as a separate item, but does suggest the URI should be “the same as the link” so we use a hash of the link if found
  • JSON Feed: is unique for that item for that feed over time.
title: Option<Text>

Title of this item within the feed

  • Atom, RSS 1(required): Contains a human readable title for the entry.
  • RSS 2 (optional): The title of the item.
  • JSON Feed: The title of the item.
updated: Option<DateTime<Utc>>

Time at which this item was last modified. If not provided in the source, or invalid, it is None.

  • Atom (required): Indicates the last time the entry was modified in a significant way.
  • RSS doesn’t specify this field.
  • JSON Feed: the last modification date of this item
authors: Vec<Person>

Authors of this item

  • Atom (recommended): Collection of authors defined at the entry level.
  • RSS 2 (optional): Email address of the author of the item.
  • JSON Feed: the author of the item
content: Option<Content>

The content of the item

  • Atom (recommended): Contains or links to the complete content of the entry.
  • RSS 2 (optional) “content:encoded”: The HTML form of the content
  • JSON Feed: the html content of the item, or the text content if no html is specified
links: Vec<Link>

Links associated with this item

  • Atom (recommended): Identifies a related Web page.
  • RSS 2 (optional): The URL of the item.
  • RSS 1 (required): The item’s URL.
  • JSON Feed: the url and external URL for the item is the first items, then each subsequent attachment
summary: Option<Text>

A short summary of the item

  • Atom (recommended): Conveys a short summary, abstract, or excerpt of the entry.
  • RSS 1+2 (optional): The item synopsis.
  • JSON Feed: the summary for the item, or the text content if no summary is provided and both text and html content are specified
categories: Vec<Category>

Structured classification of the item

  • Atom (optional): Specifies a category that the entry belongs to. A feed may have multiple category elements.
  • RSS 2 (optional): Includes the item in one or more categories.
  • JSON Feed: the supplied item tags
contributors: Vec<Person>

Atom (optional): Names one contributor to the entry. A feed may have multiple contributor elements.

published: Option<DateTime<Utc>>

Time at which this item was first published

  • Atom (optional): Contains the time of the initial creation or first availability of the entry.
  • RSS 2 (optional) “pubDate”: Indicates when the item was published.
  • JSON Feed: the date at which the item was published
source: Option<String>

Atom (optional): If an entry is copied from one feed into another feed, then this contains the source feed metadata.

rights: Option<Text>

Atom (optional): Conveys information about rights, e.g. copyrights, held in and over the feed.

media: Vec<MediaObject>

Extension for MediaRSS - https://www.rssboard.org/media-rss A MediaObject will be created in two cases:

  1. each “media:group” element encountered in the feed
  2. a default for any other “media:*” elements found at the item level See the Atom tests for youtube and newscred for examples

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

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

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.