Struct rss::Enclosure [−][src]
Expand description
Represents an enclosure in an RSS item.
Fields
url: String
The URL of the enclosure.
length: String
The length of the enclosure in bytes.
mime_type: String
The MIME type of the enclosure.
Implementations
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");
Set the URL of this enclosure.
Examples
use rss::Enclosure;
let mut enclosure = Enclosure::default();
enclosure.set_url("http://example.com/audio.mp3");
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");
Set the content length of this enclosure.
Examples
use rss::Enclosure;
let mut enclosure = Enclosure::default();
enclosure.set_length("1000");
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");
Set the MIME type of this enclosure.
Examples
use rss::Enclosure;
let mut enclosure = Enclosure::default();
enclosure.set_mime_type("audio/mpeg");
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Enclosure
impl UnwindSafe for Enclosure
Blanket Implementations
Mutably borrows from an owned value. Read more