1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
use crate::{Entry, Error, Feed}; use quick_xml::de::from_str; use std::str::FromStr; impl FromStr for Feed { type Err = Error; fn from_str(input: &str) -> Result<Feed, Error> { let rss: Feed = from_str(input)?; Ok(rss) } } impl FromStr for Entry { type Err = Error; fn from_str(input: &str) -> Result<Entry, Error> { let rss: Entry = from_str(input)?; Ok(rss) } }