fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s.parse::<atom_syndication::Feed>() {
            Ok(feed) => Ok(Feed::Atom(feed)),
            _ => match s.parse::<rss::Channel>() {
                Ok(channel) => Ok(Feed::RSS(channel)),
                _ => Err("Could not parse XML as Atom or RSS from input"),
            },
        }
    }
/// Each supported enum value is tested after the other.
/// We first try to load atom, then RSS.
/// If none work, an error is returned

Each supported enum value is tested after the other.
We first try to load atom, then RSS.
If none work, an error is returned
Each supported enum value is tested after the other . We first try to load atom then RSS . If none work an error is returned
fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s.parse::<atom_syndication::Feed>() {
            Ok(feed) => Ok(Feed::Atom(feed)),
            _ => match s.parse::<rss::Channel>() {
                Ok(channel) => Ok(Feed::RSS(channel)),
                _ => Err("Could not parse XML as Atom or RSS from input"),
            },
        }
    }
fn from_str ( s : & str ) -> Result < Self , Self :: Err > { match s . parse :: < atom_syndication :: Feed > ( ) { Ok ( feed ) => Ok ( Feed :: Atom ( feed ) ) , _ => match s . parse :: < rss :: Channel > ( ) { Ok ( channel ) => Ok ( Feed :: RSS ( channel ) ) , _ => Err ( " " ) , } , } }
Each supported enum value is tested after the other.
Each supported enum value is tested after the other .
s
&str
s
&str