Struct Channel

Source
pub struct Channel {
Show 22 fields pub title: String, pub link: String, pub description: String, pub language: Option<String>, pub copyright: Option<String>, pub managing_editor: Option<String>, pub webmaster: Option<String>, pub pub_date: Option<String>, pub last_build_date: Option<String>, pub categories: Vec<Category>, pub generator: Option<String>, pub docs: Option<String>, pub cloud: Option<Cloud>, pub ttl: Option<String>, pub image: Option<Image>, pub text_input: Option<TextInput>, pub skip_hours: Vec<String>, pub skip_days: Vec<String>, pub items: Vec<Item>, pub extensions: ExtensionMap, pub itunes_ext: Option<ITunesChannelExtension>, pub dublin_core_ext: Option<DublinCoreExtension>,
}
Expand description

A representation of the <channel> element.

Fields§

§title: String

The name of the channel.

§link: String

The URL for the website corresponding to the channel.

§description: String

A description of the channel.

§language: Option<String>

The language of the channel.

§copyright: Option<String>

The copyright notice for the channel.

§managing_editor: Option<String>

The email address for the managing editor.

§webmaster: Option<String>

The email address for the webmaster.

§pub_date: Option<String>

The publication date for the content of the channel.

§last_build_date: Option<String>

The date that the contents of the channel last changed.

§categories: Vec<Category>

The categories the channel belongs to.

§generator: Option<String>

The program used to generate the channel.

§docs: Option<String>

A URL that points to the documentation for the RSS format.

§cloud: Option<Cloud>

The cloud to register with to be notified of updates to the channel.

§ttl: Option<String>

The number of minutes the channel can be cached before refreshing.

§image: Option<Image>

An image that can be displayed with the channel.

§text_input: Option<TextInput>

A text input box that can be displayed with the channel.

§skip_hours: Vec<String>

A hint to tell the aggregator which hours it can skip.

§skip_days: Vec<String>

A hint to tell the aggregator which days it can skip.

§items: Vec<Item>

The items in the channel.

§extensions: ExtensionMap

The extensions for the channel.

§itunes_ext: Option<ITunesChannelExtension>

The iTunes extension for the channel.

§dublin_core_ext: Option<DublinCoreExtension>

The Dublin Core extension for the channel.

Implementations§

Source§

impl Channel

Source

pub fn read_from<R: BufRead>(reader: R) -> Result<Channel, Error>

Attempt to read the RSS channel from the speficied reader.

§Example
let reader: BufRead = ...;
let channel = Channel::read_from(reader).unwrap();

Trait Implementations§

Source§

impl Clone for Channel

Source§

fn clone(&self) -> Channel

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Channel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Channel

Source§

fn default() -> Channel

Returns the “default value” for a type. Read more
Source§

impl FromStr for Channel

Source§

fn from_str(s: &str) -> Result<Channel, Error>

Attempt to read the RSS channel from the speficied str.

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

impl PartialEq for Channel

Source§

fn eq(&self, other: &Channel) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Channel

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.