Struct rss::Enclosure [] [src]

pub struct Enclosure { /* fields omitted */ }

A representation of the <enclosure> element.

Methods

impl Enclosure
[src]

Return the URL for this Enclosure.

Examples

use rss::EnclosureBuilder;

let url = "http://www.podtrac.com/pts/redirect.ogg/traffic.libsyn.com/jnite/\
    linuxactionshowep408.ogg";

let enclosure = EnclosureBuilder::default()
    .url(url)
    .finalize();

assert_eq!(url, enclosure.url())

Return the content length for this Enclosure.

Examples

use rss::EnclosureBuilder;

let length = 70772893;

let enclosure = EnclosureBuilder::default()
    .length(length)
    .finalize();

assert_eq!(length.to_string(), enclosure.length())

Return the content MIME type for this Enclosure.

Examples

use rss::EnclosureBuilder;

let mime_type = "audio/ogg";

let enclosure = EnclosureBuilder::default()
    .mime_type(mime_type)
    .finalize();

assert_eq!(mime_type, enclosure.mime_type())

Trait Implementations

impl Debug for Enclosure
[src]

Formats the value using the given formatter.

impl Default for Enclosure
[src]

Returns the "default value" for a type. Read more

impl Clone for Enclosure
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Enclosure
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.