Skip to main content

Validate

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

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

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§