pub struct Entry {Show 33 fields
pub id: Option<String>,
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<String>,
pub author_detail: Option<Person>,
pub authors: Vec<Person>,
pub contributors: Vec<Person>,
pub publisher: Option<String>,
pub publisher_detail: Option<Person>,
pub tags: Vec<Tag>,
pub enclosures: Vec<Enclosure>,
pub comments: Option<String>,
pub source: Option<Source>,
pub itunes: Option<ItunesEntryMeta>,
pub dc_creator: Option<String>,
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 geo: Option<GeoLocation>,
pub license: Option<String>,
}Expand description
Feed entry/item
Fields§
§id: Option<String>Unique entry identifier
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
Detailed author information
All authors
contributors: Vec<Person>Contributors
publisher: Option<String>Publisher name
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<ItunesEntryMeta>iTunes episode metadata (if present)
dc_creator: Option<String>Dublin Core creator (author fallback)
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.)
geo: Option<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"));Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)