#[non_exhaustive]pub struct ParsedFeed {
pub feed: FeedMeta,
pub entries: Vec<Entry>,
pub bozo: bool,
pub bozo_exception: Option<String>,
pub encoding: String,
pub version: FeedVersion,
pub namespaces: HashMap<String, String>,
pub status: Option<u16>,
pub href: Option<String>,
pub etag: Option<String>,
pub modified: Option<String>,
pub headers: Option<HashMap<String, String>>,
}Expand description
Parsed feed result
This is the main result type returned by the parser, analogous to
Python feedparser’s FeedParserDict.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.feed: FeedMetaFeed metadata
entries: Vec<Entry>Feed entries/items
bozo: boolTrue if parsing encountered errors
bozo_exception: Option<String>Description of parsing error (if bozo is true)
encoding: StringDetected or declared encoding
version: FeedVersionDetected feed format version
namespaces: HashMap<String, String>XML namespaces (prefix -> URI)
status: Option<u16>HTTP status code (if fetched from URL)
href: Option<String>Final URL after redirects (if fetched from URL)
etag: Option<String>ETag header from HTTP response
modified: Option<String>Last-Modified header from HTTP response
headers: Option<HashMap<String, String>>HTTP response headers (if fetched from URL)
Implementations§
Source§impl ParsedFeed
impl ParsedFeed
Sourcepub fn with_capacity(entry_count: usize) -> Self
pub fn with_capacity(entry_count: usize) -> Self
Creates a ParsedFeed with pre-allocated capacity for entries
This method pre-allocates space for the expected number of entries, reducing memory allocations during parsing.
§Arguments
entry_count- Expected number of entries in the feed
§Examples
use feedparser_rs::ParsedFeed;
let feed = ParsedFeed::with_capacity(50);
assert_eq!(feed.encoding, "utf-8");Trait Implementations§
Source§impl Clone for ParsedFeed
impl Clone for ParsedFeed
Source§impl Debug for ParsedFeed
impl Debug for ParsedFeed
Auto Trait Implementations§
impl Forget for ParsedFeed
impl Freeze for ParsedFeedwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const (): Freeze,
PhantomData<Link>: Freeze,
PhantomData<(String, Value)>: Freeze,
PhantomData<Person>: Freeze,
PhantomData<Tag>: Freeze,
*const ItunesFeedMeta is !null: Freeze,
PhantomData<ItunesFeedMeta>: Freeze,
*const PodcastMeta is !null: Freeze,
PhantomData<PodcastMeta>: Freeze,
*const SyndicationMeta is !null: Freeze,
PhantomData<SyndicationMeta>: Freeze,
*const GeoLocation is !null: Freeze,
PhantomData<GeoLocation>: Freeze,
PhantomData<MediaThumbnail>: Freeze,
PhantomData<MediaContent>: Freeze,
PhantomData<u32>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Entry>: Freeze,
PhantomData<(String, String)>: Freeze,
impl Move for ParsedFeed
impl RefUnwindSafe for ParsedFeed
impl Send for ParsedFeedwhere
RawVecInner: Send,
Repr: Send,
Arc<str>: Send,
RawTable<(String, Value)>: Send,
BoxRaw<ItunesFeedMeta>: Send,
BoxRaw<PodcastMeta>: Send,
BoxRaw<SyndicationMeta>: Send,
BoxRaw<GeoLocation>: Send,
BoxRaw<ItunesEntryMeta>: Send,
BoxRaw<PodcastEntryMeta>: Send,
RawTable<(String, String)>: Send,
impl Sync for ParsedFeedwhere
RawVecInner: Sync,
Repr: Sync,
Arc<str>: Sync,
RawTable<(String, Value)>: Sync,
BoxRaw<ItunesFeedMeta>: Sync,
BoxRaw<PodcastMeta>: Sync,
BoxRaw<SyndicationMeta>: Sync,
BoxRaw<GeoLocation>: Sync,
BoxRaw<ItunesEntryMeta>: Sync,
BoxRaw<PodcastEntryMeta>: Sync,
RawTable<(String, String)>: Sync,
impl Unpin for ParsedFeedwhere
*const u8 is !null: Unpin,
*const (): Unpin,
Arc<str>: Unpin,
*const LeafNode<String, Value> is !null: Unpin,
Box<(String, Value)>: Unpin,
Box<ItunesFeedMeta>: Unpin,
Box<PodcastMeta>: Unpin,
Box<SyndicationMeta>: Unpin,
Box<GeoLocation>: Unpin,
Box<ItunesEntryMeta>: Unpin,
Box<PodcastEntryMeta>: Unpin,
impl UnsafeUnpin for ParsedFeedwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const (): UnsafeUnpin,
PhantomData<Link>: UnsafeUnpin,
PhantomData<(String, Value)>: UnsafeUnpin,
PhantomData<Person>: UnsafeUnpin,
PhantomData<Tag>: UnsafeUnpin,
*const ItunesFeedMeta is !null: UnsafeUnpin,
PhantomData<ItunesFeedMeta>: UnsafeUnpin,
*const PodcastMeta is !null: UnsafeUnpin,
PhantomData<PodcastMeta>: UnsafeUnpin,
*const SyndicationMeta is !null: UnsafeUnpin,
PhantomData<SyndicationMeta>: UnsafeUnpin,
*const GeoLocation is !null: UnsafeUnpin,
PhantomData<GeoLocation>: UnsafeUnpin,
PhantomData<MediaThumbnail>: UnsafeUnpin,
PhantomData<MediaContent>: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Entry>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for ParsedFeedwhere
RawVecInner: UnwindSafe,
*const (): UnwindSafe,
Arc<str>: UnwindSafe,
HashMap<String, Value>: UnwindSafe,
BoxRaw<ItunesFeedMeta>: UnwindSafe,
BoxRaw<PodcastMeta>: UnwindSafe,
BoxRaw<SyndicationMeta>: UnwindSafe,
BoxRaw<GeoLocation>: UnwindSafe,
BoxRaw<ItunesEntryMeta>: UnwindSafe,
BoxRaw<PodcastEntryMeta>: UnwindSafe,
HashMap<String, String>: UnwindSafe,
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
Mutably borrows from an owned value. Read more