pub struct FeedMeta {Show 33 fields
pub title: Option<String>,
pub title_detail: Option<TextConstruct>,
pub link: Option<String>,
pub links: Vec<Link>,
pub subtitle: Option<String>,
pub subtitle_detail: Option<TextConstruct>,
pub updated: Option<DateTime<Utc>>,
pub published: 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 language: Option<SmallString>,
pub rights: Option<String>,
pub rights_detail: Option<TextConstruct>,
pub generator: Option<String>,
pub generator_detail: Option<Generator>,
pub image: Option<Image>,
pub icon: Option<String>,
pub logo: Option<String>,
pub tags: Vec<Tag>,
pub id: Option<String>,
pub ttl: Option<u32>,
pub itunes: Option<Box<ItunesFeedMeta>>,
pub podcast: Option<Box<PodcastMeta>>,
pub dc_creator: Option<SmallString>,
pub dc_publisher: Option<SmallString>,
pub dc_rights: Option<String>,
pub license: Option<String>,
pub syndication: Option<Box<SyndicationMeta>>,
pub geo: Option<Box<GeoLocation>>,
}Expand description
Feed metadata
Fields§
§title: Option<String>Feed title
title_detail: Option<TextConstruct>Detailed title with metadata
link: Option<String>Primary feed link
links: Vec<Link>All links associated with this feed
subtitle: Option<String>Feed subtitle/description
subtitle_detail: Option<TextConstruct>Detailed subtitle with metadata
updated: Option<DateTime<Utc>>Last update date
published: Option<DateTime<Utc>>Initial publication date (RSS pubDate, Atom published)
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
language: Option<SmallString>Feed language (e.g., “en-us”) - stored inline as lang codes are ≤24 bytes
rights: Option<String>Copyright/rights statement
rights_detail: Option<TextConstruct>Detailed rights with metadata
generator: Option<String>Generator name
generator_detail: Option<Generator>Detailed generator information
image: Option<Image>Feed image
icon: Option<String>Icon URL (small image)
logo: Option<String>Logo URL (larger image)
Feed-level tags/categories
id: Option<String>Unique feed identifier
ttl: Option<u32>Time-to-live (update frequency hint) in minutes
itunes: Option<Box<ItunesFeedMeta>>iTunes podcast metadata (if present)
podcast: Option<Box<PodcastMeta>>Podcast 2.0 namespace metadata (if present)
dc_creator: Option<SmallString>Dublin Core creator (author fallback) - stored inline for names ≤24 bytes
dc_publisher: Option<SmallString>Dublin Core publisher (stored inline for names ≤24 bytes)
dc_rights: Option<String>Dublin Core rights (copyright)
license: Option<String>License URL (Creative Commons, etc.)
Syndication module metadata (RSS 1.0)
geo: Option<Box<GeoLocation>>Geographic location from GeoRSS namespace (feed level)
Implementations§
Source§impl FeedMeta
impl FeedMeta
Sourcepub fn with_rss_capacity() -> Self
pub fn with_rss_capacity() -> Self
Creates FeedMeta with capacity hints for typical RSS 2.0 feeds
Pre-allocates collections based on common RSS 2.0 field usage:
- 1-2 links (channel link, self link)
- 1 author (managingEditor)
- 0-3 tags (categories)
§Examples
use feedparser_rs::FeedMeta;
let meta = FeedMeta::with_rss_capacity();Sourcepub fn with_atom_capacity() -> Self
pub fn with_atom_capacity() -> Self
Creates FeedMeta with capacity hints for typical Atom 1.0 feeds
Pre-allocates collections based on common Atom 1.0 field usage:
- 3-5 links (alternate, self, related, etc.)
- 1-2 authors
- 1 contributor
- 3-5 tags (categories)
§Examples
use feedparser_rs::FeedMeta;
let meta = FeedMeta::with_atom_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::{FeedMeta, TextConstruct};
let mut meta = FeedMeta::default();
meta.set_title(TextConstruct::text("Example Feed"));
assert_eq!(meta.title.as_deref(), Some("Example Feed"));Sourcepub fn set_subtitle(&mut self, text: TextConstruct)
pub fn set_subtitle(&mut self, text: TextConstruct)
Sets subtitle field with TextConstruct, storing both simple and detailed versions
§Examples
use feedparser_rs::{FeedMeta, TextConstruct};
let mut meta = FeedMeta::default();
meta.set_subtitle(TextConstruct::text("A great feed"));
assert_eq!(meta.subtitle.as_deref(), Some("A great feed"));Sourcepub fn set_rights(&mut self, text: TextConstruct)
pub fn set_rights(&mut self, text: TextConstruct)
Sets rights field with TextConstruct, storing both simple and detailed versions
§Examples
use feedparser_rs::{FeedMeta, TextConstruct};
let mut meta = FeedMeta::default();
meta.set_rights(TextConstruct::text("© 2025 Example"));
assert_eq!(meta.rights.as_deref(), Some("© 2025 Example"));Sourcepub fn set_generator(&mut self, generator: Generator)
pub fn set_generator(&mut self, generator: Generator)
Sets generator field with Generator, storing both simple and detailed versions
§Examples
use feedparser_rs::{FeedMeta, Generator};
let mut meta = FeedMeta::default();
let generator = Generator {
value: "Example Generator".to_string(),
uri: None,
version: None,
};
meta.set_generator(generator);
assert_eq!(meta.generator.as_deref(), Some("Example Generator"));Sets author field with Person, storing both simple and detailed versions
§Examples
use feedparser_rs::{FeedMeta, Person};
let mut meta = FeedMeta::default();
meta.set_author(Person::from_name("John Doe"));
assert_eq!(meta.author.as_deref(), Some("John 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::{FeedMeta, Person};
let mut meta = FeedMeta::default();
meta.set_publisher(Person::from_name("ACME Corp"));
assert_eq!(meta.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::FeedMeta;
let mut meta = FeedMeta::default();
meta.set_alternate_link("https://example.com".to_string(), 10);
assert_eq!(meta.link.as_deref(), Some("https://example.com"));
assert_eq!(meta.links.len(), 1);
assert_eq!(meta.links[0].rel.as_deref(), Some("alternate"));