Struct rss::Enclosure
[−]
[src]
pub struct Enclosure { /* fields omitted */ }
Represents an enclosure in an RSS item.
Methods
impl Enclosure
[src]
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");
fn set_url<V>(&mut self, url: V) where
V: Into<String>,
[src]
V: Into<String>,
Set the URL of this enclosure.
Examples
use rss::Enclosure; let mut enclosure = Enclosure::default(); enclosure.set_url("http://example.com/audio.mp3");
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");
fn set_length<V>(&mut self, length: V) where
V: Into<String>,
[src]
V: Into<String>,
Set the content length of this enclosure.
Examples
use rss::Enclosure; let mut enclosure = Enclosure::default(); enclosure.set_length("1000");
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");
fn set_mime_type<V>(&mut self, mime_type: V) where
V: Into<String>,
[src]
V: Into<String>,
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]
impl Default for Enclosure
[src]
impl Clone for Enclosure
[src]
fn clone(&self) -> Enclosure
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more