pub trait Validate {
// Required method
fn validate(&self) -> Result<Channel, String>;
}
Expand description
Validate function for Channel
Required Methods§
Implementations on Foreign Types§
Source§impl Validate for Channel
impl Validate for Channel
Source§fn validate(&self) -> Result<Channel, String>
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();
}