[][src]Struct rss::Enclosure

pub struct Enclosure { /* fields omitted */ }

Represents an enclosure in an RSS item.

Methods

impl Enclosure[src]

pub fn url(&self) -> &str[src]

Return the URL of this enclosure.

Examples

use rss::Enclosure;

let mut enclosure = Enclosure::default();
enclosure.set_url("http://example.com/audio.mp3");
assert_eq!(enclosure.url(), "http://example.com/audio.mp3");

pub fn set_url<V>(&mut self, url: V) where
    V: Into<String>, 
[src]

Set the URL of this enclosure.

Examples

use rss::Enclosure;

let mut enclosure = Enclosure::default();
enclosure.set_url("http://example.com/audio.mp3");

pub fn length(&self) -> &str[src]

Return the content length of this enclosure.

Examples

use rss::Enclosure;

let mut enclosure = Enclosure::default();
enclosure.set_length("1000");
assert_eq!(enclosure.length(), "1000");

pub fn set_length<V>(&mut self, length: V) where
    V: Into<String>, 
[src]

Set the content length of this enclosure.

Examples

use rss::Enclosure;

let mut enclosure = Enclosure::default();
enclosure.set_length("1000");

pub fn mime_type(&self) -> &str[src]

Return the MIME type of this enclosure.

Examples

use rss::Enclosure;

let mut enclosure = Enclosure::default();
enclosure.set_mime_type("audio/mpeg");
assert_eq!(enclosure.mime_type(), "audio/mpeg");

pub fn set_mime_type<V>(&mut self, mime_type: V) where
    V: Into<String>, 
[src]

Set the MIME type of this enclosure.

Examples

use rss::Enclosure;

let mut enclosure = Enclosure::default();
enclosure.set_mime_type("audio/mpeg");

impl Enclosure[src]

pub fn from_xml<R: BufRead>(
    reader: &mut Reader<R>,
    atts: Attributes
) -> Result<Self, Error>
[src]

Builds an Enclosure from source XML

Trait Implementations

impl PartialEq<Enclosure> for Enclosure[src]

impl Clone for Enclosure[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Enclosure[src]

impl Debug for Enclosure[src]

Auto Trait Implementations

impl Send for Enclosure

impl Sync for Enclosure

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]