Struct rss::Enclosure [] [src]

pub struct Enclosure { /* fields omitted */ }

Represents an enclosure in an RSS item.

Methods

impl Enclosure
[src]

[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");

[src]

Set the URL of this enclosure.

Examples

use rss::Enclosure;

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

[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");

[src]

Set the content length of this enclosure.

Examples

use rss::Enclosure;

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

[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");

[src]

Set the MIME type of this enclosure.

Examples

use rss::Enclosure;

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

Trait Implementations

impl Debug for Enclosure
[src]

[src]

Formats the value using the given formatter.

impl Default for Enclosure
[src]

[src]

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

impl Clone for Enclosure
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Enclosure
[src]

[src]

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

[src]

This method tests for !=.