Trait Validate

Source
pub trait Validate {
    // Required method
    fn validate(&self) -> Result<Channel, String>;
}
Expand description

Validate function for Channel

Required Methods§

Source

fn validate(&self) -> Result<Channel, String>

Validate Channel

Implementations on Foreign Types§

Source§

impl Validate for Channel

Source§

fn validate(&self) -> Result<Channel, String>

Validate Channel

§Examples
extern crate rss;
extern crate feed;

use feed::{FromUrl, ChannelGetters, Validate};
use rss::Channel;

fn main()
{
    let url = "https://feedpress.me/usererror.xml";

    let channel = Channel::from_url(url).unwrap();
    channel.validate().unwrap();
}

Implementors§