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

pub struct Entry {
Show 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

impl Clone for Entry[src]

fn clone(&self) -> Entry[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Entry[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for Entry[src]

fn default() -> Self[src]

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

impl PartialEq<Entry> for Entry[src]

fn eq(&self, other: &Entry) -> bool[src]

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

fn ne(&self, other: &Entry) -> bool[src]

This method tests for !=.

impl StructuralPartialEq for Entry[src]

Auto Trait Implementations

impl RefUnwindSafe for Entry

impl Send for Entry

impl Sync for Entry

impl Unpin for Entry

impl UnwindSafe for Entry

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.