pub struct RssFeedValidator<'a> { /* private fields */ }Expand description
RSS feed validator for validating the structure and content of an RSS feed.
Implementations§
Source§impl<'a> RssFeedValidator<'a>
impl<'a> RssFeedValidator<'a>
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validates the RSS feed structure and content.
This method performs a comprehensive validation of the RSS feed, including structure, items, dates, and version-specific requirements.
§Returns
Ok(())if the validation passes.Err(RssError::ValidationErrors)containing a list of validation errors if any are found.
§Errors
This function returns an Err(RssError::ValidationErrors) if any validation checks fail.
Sourcepub fn parse_date(date_str: &str) -> Result<OffsetDateTime>
pub fn parse_date(date_str: &str) -> Result<OffsetDateTime>
Parses a date string into a time::OffsetDateTime.
Delegates to crate::data::parse_date, which accepts both
RFC 2822 (the historical RSS 2.0 wire format — any timezone is
accepted, including +0000, +0530, EST, etc.) and ISO 8601
(used by Atom and Dublin Core). The previous implementation
hard-required a literal " GMT" suffix, rejecting every
spec-compliant feed produced outside of GMT.
§Errors
Returns RssError::DateParseError when the input matches
neither RFC 2822 nor ISO 8601.