Struct rss::Enclosure
[−]
[src]
pub struct Enclosure { /* fields omitted */ }
A representation of the <enclosure>
element.
Methods
impl Enclosure
[src]
fn url(&self) -> &str
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())
fn length(&self) -> &str
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())
fn mime_type(&self) -> &str
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]
impl Default for Enclosure
[src]
impl Clone for Enclosure
[src]
fn clone(&self) -> Enclosure
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more