pub fn parse_with_limits(
data: &[u8],
limits: ParserLimits,
) -> Result<ParsedFeed>Expand description
Parse feed with custom parser limits
This allows controlling resource usage when parsing untrusted feeds.
§Examples
use feedparser_rs::{parse_with_limits, ParserLimits};
let xml = b"<rss version=\"2.0\"><channel><title>Test</title></channel></rss>";
let limits = ParserLimits::strict();
let feed = parse_with_limits(xml, limits).unwrap();§Errors
Returns an error if:
- Feed size exceeds limits
- Format is unknown or unsupported
- Fatal parsing error occurs