pub struct Entry {Show 34 fields
pub id: Option<SmallString>,
pub title: Option<String>,
pub title_detail: Option<TextConstruct>,
pub link: Option<String>,
pub links: Vec<Link>,
pub summary: Option<String>,
pub summary_detail: Option<TextConstruct>,
pub content: Vec<Content>,
pub published: Option<DateTime<Utc>>,
pub updated: Option<DateTime<Utc>>,
pub created: Option<DateTime<Utc>>,
pub expired: Option<DateTime<Utc>>,
pub author: Option<SmallString>,
pub author_detail: Option<Person>,
pub authors: Vec<Person>,
pub contributors: Vec<Person>,
pub publisher: Option<SmallString>,
pub publisher_detail: Option<Person>,
pub tags: Vec<Tag>,
pub enclosures: Vec<Enclosure>,
pub comments: Option<String>,
pub source: Option<Source>,
pub itunes: Option<Box<ItunesEntryMeta>>,
pub dc_creator: Option<SmallString>,
pub dc_date: Option<DateTime<Utc>>,
pub dc_subject: Vec<String>,
pub dc_rights: Option<String>,
pub media_thumbnails: Vec<MediaThumbnail>,
pub media_content: Vec<MediaContent>,
pub podcast_transcripts: Vec<PodcastTranscript>,
pub podcast_persons: Vec<PodcastPerson>,
pub podcast: Option<Box<PodcastEntryMeta>>,
pub geo: Option<Box<GeoLocation>>,
pub license: Option<String>,
}Expand description
Feed entry/item
Fields§
§id: Option<SmallString>Unique entry identifier (stored inline for IDs ≤24 bytes)
title: Option<String>Entry title
title_detail: Option<TextConstruct>Detailed title with metadata
link: Option<String>Primary link
links: Vec<Link>All links associated with this entry
summary: Option<String>Short description/summary
summary_detail: Option<TextConstruct>Detailed summary with metadata
content: Vec<Content>Full content blocks
published: Option<DateTime<Utc>>Publication date
updated: Option<DateTime<Utc>>Last update date
created: Option<DateTime<Utc>>Creation date
expired: Option<DateTime<Utc>>Expiration date
Primary author name (stored inline for names ≤24 bytes)
Detailed author information
All authors
contributors: Vec<Person>Contributors
publisher: Option<SmallString>Publisher name (stored inline for names ≤24 bytes)
publisher_detail: Option<Person>Detailed publisher information
Tags/categories
enclosures: Vec<Enclosure>Media enclosures (audio, video, etc.)
comments: Option<String>Comments URL or text
source: Option<Source>Source feed reference
itunes: Option<Box<ItunesEntryMeta>>iTunes episode metadata (if present)
dc_creator: Option<SmallString>Dublin Core creator (author fallback) - stored inline for names ≤24 bytes
dc_date: Option<DateTime<Utc>>Dublin Core date (publication date fallback)
dc_subject: Vec<String>Dublin Core subjects (tags)
dc_rights: Option<String>Dublin Core rights (copyright)
media_thumbnails: Vec<MediaThumbnail>Media RSS thumbnails
media_content: Vec<MediaContent>Media RSS content items
podcast_transcripts: Vec<PodcastTranscript>Podcast 2.0 transcripts for this episode
podcast_persons: Vec<PodcastPerson>Podcast 2.0 persons for this episode (hosts, guests, etc.)
podcast: Option<Box<PodcastEntryMeta>>Podcast 2.0 episode metadata
geo: Option<Box<GeoLocation>>GeoRSS location data
license: Option<String>License URL (Creative Commons, etc.)
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn with_capacity() -> Self
pub fn with_capacity() -> Self
Creates Entry with pre-allocated capacity for collections
Pre-allocates space for typical entry fields:
- 1-2 links (alternate, related)
- 1 content block
- 1 author
- 2-3 tags
- 0-1 enclosures
- 2 podcast transcripts (typical for podcasts with multiple languages)
- 4 podcast persons (host, co-hosts, guests)
§Examples
use feedparser_rs::Entry;
let entry = Entry::with_capacity();Sourcepub fn set_title(&mut self, text: TextConstruct)
pub fn set_title(&mut self, text: TextConstruct)
Sets title field with TextConstruct, storing both simple and detailed versions
§Examples
use feedparser_rs::{Entry, TextConstruct};
let mut entry = Entry::default();
entry.set_title(TextConstruct::text("Great Article"));
assert_eq!(entry.title.as_deref(), Some("Great Article"));Sourcepub fn set_summary(&mut self, text: TextConstruct)
pub fn set_summary(&mut self, text: TextConstruct)
Sets summary field with TextConstruct, storing both simple and detailed versions
§Examples
use feedparser_rs::{Entry, TextConstruct};
let mut entry = Entry::default();
entry.set_summary(TextConstruct::text("A summary"));
assert_eq!(entry.summary.as_deref(), Some("A summary"));Sets author field with Person, storing both simple and detailed versions
§Examples
use feedparser_rs::{Entry, Person};
let mut entry = Entry::default();
entry.set_author(Person::from_name("Jane Doe"));
assert_eq!(entry.author.as_deref(), Some("Jane Doe"));Sourcepub fn set_publisher(&mut self, person: Person)
pub fn set_publisher(&mut self, person: Person)
Sets publisher field with Person, storing both simple and detailed versions
§Examples
use feedparser_rs::{Entry, Person};
let mut entry = Entry::default();
entry.set_publisher(Person::from_name("ACME Corp"));
assert_eq!(entry.publisher.as_deref(), Some("ACME Corp"));Sourcepub fn set_alternate_link(&mut self, href: String, max_links: usize)
pub fn set_alternate_link(&mut self, href: String, max_links: usize)
Sets the primary link and adds it to the links collection
This is a convenience method that:
- Sets the
linkfield (if not already set) - Adds an “alternate” link to the
linkscollection
§Examples
use feedparser_rs::Entry;
let mut entry = Entry::default();
entry.set_alternate_link("https://example.com/post/1".to_string(), 10);
assert_eq!(entry.link.as_deref(), Some("https://example.com/post/1"));
assert_eq!(entry.links.len(), 1);
assert_eq!(entry.links[0].rel.as_deref(), Some("alternate"));