Struct atom_syndication::Source
[−]
[src]
pub struct Source { /* fields omitted */ }
Represents the source of an Atom entry
Methods
impl Source
[src]
fn title(&self) -> &str
[src]
Return the title of the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_title("Feed Title"); assert_eq!(source.title(), "Feed Title");
fn set_title<V>(&mut self, title: V) where
V: Into<String>,
[src]
V: Into<String>,
Set the title of the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_title("Feed Title");
fn id(&self) -> &str
[src]
Return the unique URI of the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_id("urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6"); assert_eq!(source.id(), "urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6");
fn set_id<V>(&mut self, id: V) where
V: Into<String>,
[src]
V: Into<String>,
Set the unique URI of the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_id("urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6");
fn updated(&self) -> &str
[src]
Return the last time that the source feed was modified.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_updated("2017-06-03T15:15:44-05:00"); assert_eq!(source.updated(), "2017-06-03T15:15:44-05:00");
fn set_updated<V>(&mut self, updated: V) where
V: Into<String>,
[src]
V: Into<String>,
Set the last time that the source feed was modified.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_updated("2017-06-03T15:15:44-05:00");
[src]
Return the authors of the source feed.
Examples
use atom_syndication::{Source, Person}; let mut source = Source::default(); source.set_authors(vec![Person::default()]); assert_eq!(source.authors().len(), 1);
[src]
Set the authors of the source feed.
Examples
use atom_syndication::{Source, Person}; let mut source = Source::default(); source.set_authors(vec![Person::default()]);
fn categories(&self) -> &[Category]
[src]
Return the categories the source feed belongs to.
Examples
use atom_syndication::{Source, Category}; let mut source = Source::default(); source.set_categories(vec![Category::default()]); assert_eq!(source.categories().len(), 1);
fn set_categories<V>(&mut self, categories: V) where
V: Into<Vec<Category>>,
[src]
V: Into<Vec<Category>>,
Set the categories the source feed belongs to.
Examples
use atom_syndication::{Source, Category}; let mut source = Source::default(); source.set_categories(vec![Category::default()]);
fn contributors(&self) -> &[Person]
[src]
Return the contributors to the source feed.
Examples
use atom_syndication::{Source, Person}; let mut source = Source::default(); source.set_contributors(vec![Person::default()]); assert_eq!(source.contributors().len(), 1);
fn set_contributors<V>(&mut self, contributors: V) where
V: Into<Vec<Person>>,
[src]
V: Into<Vec<Person>>,
Set the contributors to the source feed.
Examples
use atom_syndication::{Source, Person}; let mut source = Source::default(); source.set_contributors(vec![Person::default()]);
fn generator(&self) -> Option<&Generator>
[src]
Return the name of the software used to generate the source feed.
Examples
use atom_syndication::{Source, Generator}; let mut source = Source::default(); source.set_generator(Generator::default()); assert!(source.generator().is_some());
fn set_generator<V>(&mut self, generator: V) where
V: Into<Option<Generator>>,
[src]
V: Into<Option<Generator>>,
Set the name of the software used to generate the source feed.
Examples
use atom_syndication::{Source, Generator}; let mut source = Source::default(); source.set_generator(Generator::default());
fn icon(&self) -> Option<&str>
[src]
Return the icon for the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_icon("http://example.com/icon.png".to_string()); assert_eq!(source.icon(), Some("http://example.com/icon.png"));
fn set_icon<V>(&mut self, icon: V) where
V: Into<Option<String>>,
[src]
V: Into<Option<String>>,
Set the icon for the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_icon("http://example.com/icon.png".to_string());
fn links(&self) -> &[Link]
[src]
Return the Web pages related to the source feed.
Examples
use atom_syndication::{Source, Link}; let mut source = Source::default(); source.set_links(vec![Link::default()]); assert_eq!(source.links().len(), 1);
fn set_links<V>(&mut self, links: V) where
V: Into<Vec<Link>>,
[src]
V: Into<Vec<Link>>,
Set the Web pages related to the source feed.
Examples
use atom_syndication::{Source, Link}; let mut source = Source::default(); source.set_links(vec![Link::default()]);
fn logo(&self) -> Option<&str>
[src]
Return the logo for the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_logo("http://example.com/logo.png".to_string()); assert_eq!(source.logo(), Some("http://example.com/logo.png"));
fn set_logo<V>(&mut self, logo: V) where
V: Into<Option<String>>,
[src]
V: Into<Option<String>>,
Set the logo for the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_logo("http://example.com/logo.png".to_string());
fn rights(&self) -> Option<&str>
[src]
Return the information about the rights held in and over the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_rights("© 2017 John Doe".to_string()); assert_eq!(source.rights(), Some("© 2017 John Doe"));
fn set_rights<V>(&mut self, rights: V) where
V: Into<Option<String>>,
[src]
V: Into<Option<String>>,
Set the information about the rights held in and over the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_rights("© 2017 John Doe".to_string());
fn subtitle(&self) -> Option<&str>
[src]
Return the description or subtitle of the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_subtitle("Feed subtitle".to_string()); assert_eq!(source.subtitle(), Some("Feed subtitle"));
fn set_subtitle<V>(&mut self, subtitle: V) where
V: Into<Option<String>>,
[src]
V: Into<Option<String>>,
Set the description or subtitle of the source feed.
Examples
use atom_syndication::Source; let mut source = Source::default(); source.set_subtitle("Feed subtitle".to_string());
Trait Implementations
impl Debug for Source
[src]
impl Default for Source
[src]
impl Clone for Source
[src]
fn clone(&self) -> Source
[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