pub struct Feed {Show 18 fields
pub feed_type: FeedType,
pub id: String,
pub title: Option<Text>,
pub updated: Option<DateTime<Utc>>,
pub authors: Vec<Person>,
pub description: Option<Text>,
pub links: Vec<Link>,
pub categories: Vec<Category>,
pub contributors: Vec<Person>,
pub generator: Option<Generator>,
pub icon: Option<Image>,
pub language: Option<String>,
pub logo: Option<Image>,
pub published: Option<DateTime<Utc>>,
pub rating: Option<MediaRating>,
pub rights: Option<Text>,
pub ttl: Option<u32>,
pub entries: Vec<Entry>,
}
Expand description
Combined model for a syndication feed (i.e. RSS1, RSS 2, Atom, JSON Feed)
The model is based on the Atom standard as a start with RSS1+2 mapped on to it e.g.
- Atom
- Feed -> Feed
- Entry -> Entry
- RSS 1 + 2
- Channel -> Feed
- Item -> Entry
Certain elements are not mapped given their limited utility:
- RSS 2:
- channel - docs (pointer to the spec), cloud (for callbacks), textInput (text box e.g. for search)
- item - comments (link to comments on the article), source (pointer to the channel, but our data model links items to a channel)
- RSS 1:
- channel - rdf:about attribute (pointer to feed), textinput (text box e.g. for search)
Fields§
§feed_type: FeedType
Type of this feed (e.g. RSS2, Atom etc)
id: String
A unique identifier for this feed
- Atom (required): Identifies the feed using a universally unique and permanent URI.
- RSS doesn’t require an ID so it is initialised to the hash of the first link or a UUID if not found
title: Option<Text>
The title of the feed
- Atom (required): Contains a human readable title for the feed. Often the same as the title of the associated website. This value should not be blank.
- RSS 1 + 2 (required) “title”: The name of the channel. It’s how people refer to your service.
- JSON Feed: is the name of the feed
updated: Option<DateTime<Utc>>
The time at which the feed was last modified. If not provided in the source, or invalid, it is None
.
- Atom (required): Indicates the last time the feed was modified in a significant way.
- RSS 2 (optional) “lastBuildDate”: The last time the content of the channel changed.
Atom (recommended): Collection of authors defined at the feed level. JSON Feed: specifies the feed author.
description: Option<Text>
Description of the feed
- Atom (optional): Contains a human-readable description or subtitle for the feed (from
). - RSS 1 + 2 (required): Phrase or sentence describing the channel.
- JSON Feed: description of the feed
links: Vec<Link>
Links to related pages
- Atom (recommended): Identifies a related Web page.
- RSS 1 + 2 (required): The URL to the HTML website corresponding to the channel.
- JSON Feed: the homepage and feed URLs
categories: Vec<Category>
Structured classification of the feed
- Atom (optional): Specifies a category that the feed belongs to. A feed may have multiple category elements.
- RSS 2 (optional) “category”: Specify one or more categories that the channel belongs to.
contributors: Vec<Person>
People who have contributed to the feed
- Atom (optional): Names one contributor to the feed. A feed may have multiple contributor elements.
- RSS 2 (optional) “managingEditor”: Email address for person responsible for editorial content.
- RSS 2 (optional) “webMaster”: Email address for person responsible for technical issues relating to channel.
generator: Option<Generator>
Information on the software used to build the feed
- Atom (optional): Identifies the software used to generate the feed, for debugging and other purposes.
- RSS 2 (optional): A string indicating the program used to generate the channel.
icon: Option<Image>
A small icon
- Atom (optional): Identifies a small image which provides iconic visual identification for the feed.
- JSON Feed: is the URL of an image for the feed suitable to be used in a source list.
language: Option<String>
RSS 2 (optional): The language the channel is written in.
logo: Option<Image>
An image used to visually identify the feed
- Atom (optional): Identifies a larger image which provides visual identification for the feed.
- RSS 1 + 2 (optional) “image”: Specifies a GIF, JPEG or PNG image that can be displayed with the channel.
- JSON Feed: is the URL of an image for the feed suitable to be used in a timeline
published: Option<DateTime<Utc>>
RSS 2 (optional): The publication date for the content in the channel.
rating: Option<MediaRating>
Rating for the content
- Populated from the media or itunes namespaces
rights: Option<Text>
Rights restricting content within the feed
- Atom (optional): Conveys information about rights, e.g. copyrights, held in and over the feed.
- RSS 2 (optional) “copyright”: Copyright notice for content in the channel.
ttl: Option<u32>
RSS 2 (optional): It’s a number of minutes that indicates how long a channel can be cached before refreshing from the source.
entries: Vec<Entry>
The individual items within the feed
- Atom (optional): Individual entries within the feed (e.g. a blog post)
- RSS 1+2 (optional): Individual items within the channel.
Trait Implementations§
impl StructuralPartialEq for Feed
Auto Trait Implementations§
impl Freeze for Feed
impl RefUnwindSafe for Feed
impl Send for Feed
impl Sync for Feed
impl Unpin for Feed
impl UnwindSafe for Feed
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)