pub trait Validate {
// Required method
fn validate(&self) -> Result<Channel, String>;
}Expand description
Validate function for Channel
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
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();
}