FeedMeta

Struct FeedMeta 

Source
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)

§author: Option<SmallString>

Primary author name (stored inline for names ≤24 bytes)

§author_detail: Option<Person>

Detailed author information

§authors: Vec<Person>

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 URL (larger image)

§tags: Vec<Tag>

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: Option<Box<SyndicationMeta>>

Syndication module metadata (RSS 1.0)

§geo: Option<Box<GeoLocation>>

Geographic location from GeoRSS namespace (feed level)

Implementations§

Source§

impl FeedMeta

Source

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();
Source

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();
Source

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"));
Source

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"));
Source

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"));
Source

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"));
Source

pub fn set_author(&mut self, person: Person)

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"));
Source

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"));

Sets the primary link and adds it to the links collection

This is a convenience method that:

  1. Sets the link field (if not already set)
  2. Adds an “alternate” link to the links collection
§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"));

Trait Implementations§

Source§

impl Clone for FeedMeta

Source§

fn clone(&self) -> FeedMeta

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FeedMeta

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for FeedMeta

Source§

fn default() -> FeedMeta

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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more