Struct atom_syndication::Entry
[−]
[src]
pub struct Entry { /* fields omitted */ }
Represents an entry in an Atom feed
Methods
impl Entry
[src]
fn title(&self) -> &str
[src]
Return the title of this entry.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_title("Entry Title"); assert_eq!(entry.title(), "Entry Title");
fn set_title<V>(&mut self, title: V) where
V: Into<String>,
[src]
V: Into<String>,
Set the title of this entry.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_title("Entry Title");
fn id(&self) -> &str
[src]
Return the unique URI of this entry.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_id("urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6"); assert_eq!(entry.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 this entry.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_id("urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6");
fn updated(&self) -> &str
[src]
Return the last time that this entry was modified.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_updated("2017-06-03T15:15:44-05:00"); assert_eq!(entry.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 this entry was modified.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_updated("2017-06-03T15:15:44-05:00");
[src]
Return the authors of this entry.
Examples
use atom_syndication::{Entry, Person}; let mut entry = Entry::default(); entry.set_authors(vec![Person::default()]); assert_eq!(entry.authors().len(), 1);
[src]
Set the authors of this entry.
Examples
use atom_syndication::{Entry, Person}; let mut entry = Entry::default(); entry.set_authors(vec![Person::default()]);
fn categories(&self) -> &[Category]
[src]
Return the categories this entry belongs to.
Examples
use atom_syndication::{Entry, Category}; let mut entry = Entry::default(); entry.set_categories(vec![Category::default()]); assert_eq!(entry.categories().len(), 1);
fn set_categories<V>(&mut self, categories: V) where
V: Into<Vec<Category>>,
[src]
V: Into<Vec<Category>>,
Set the categories this entry belongs to.
Examples
use atom_syndication::{Entry, Category}; let mut entry = Entry::default(); entry.set_categories(vec![Category::default()]);
fn contributors(&self) -> &[Person]
[src]
Return the contributors to this entry.
Examples
use atom_syndication::{Entry, Person}; let mut entry = Entry::default(); entry.set_contributors(vec![Person::default()]); assert_eq!(entry.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 this entry.
Examples
use atom_syndication::{Entry, Person}; let mut entry = Entry::default(); entry.set_contributors(vec![Person::default()]);
fn links(&self) -> &[Link]
[src]
Return the links for this entry.
Examples
use atom_syndication::{Entry, Link}; let mut entry = Entry::default(); entry.set_links(vec![Link::default()]); assert_eq!(entry.links().len(), 1);
fn set_links<V>(&mut self, links: V) where
V: Into<Vec<Link>>,
[src]
V: Into<Vec<Link>>,
Set the links for this entry.
Examples
use atom_syndication::{Entry, Link}; let mut entry = Entry::default(); entry.set_links(vec![Link::default()]);
fn published(&self) -> Option<&str>
[src]
Return the time that this entry was initially created or first made available.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_published("2017-06-01T15:15:44-05:00".to_string()); assert_eq!(entry.published(), Some("2017-06-01T15:15:44-05:00"));
fn set_published<V>(&mut self, published: V) where
V: Into<Option<String>>,
[src]
V: Into<Option<String>>,
Set the time that this entry was initially created or first made available.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_published("2017-06-01T15:15:44-05:00".to_string());
fn rights(&self) -> Option<&str>
[src]
Return the information about the rights held in and over this entry.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_rights("© 2017 John Doe".to_string()); assert_eq!(entry.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 this entry.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_rights("© 2017 John Doe".to_string());
fn source(&self) -> Option<&Source>
[src]
Return the source of this entry if it was copied from another feed.
Examples
use atom_syndication::{Entry, Source}; let mut entry = Entry::default(); entry.set_source(Source::default()); assert!(entry.source().is_some());
fn set_source<V>(&mut self, source: V) where
V: Into<Option<Source>>,
[src]
V: Into<Option<Source>>,
Set the source of this entry if it was copied from another feed.
Examples
use atom_syndication::{Entry, Source}; let mut entry = Entry::default(); entry.set_source(Source::default());
fn summary(&self) -> Option<&str>
[src]
Return the summary of this entry.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_summary("Entry summary.".to_string()); assert_eq!(entry.summary(), Some("Entry summary."));
fn set_summary<V>(&mut self, summary: V) where
V: Into<Option<String>>,
[src]
V: Into<Option<String>>,
Set the summary of this entry.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_summary("Entry summary.".to_string());
fn content(&self) -> Option<&Content>
[src]
Return the content of this entry.
Examples
use atom_syndication::{Entry, Content}; let mut entry = Entry::default(); entry.set_content(Content::default()); assert!(entry.content().is_some());
fn set_content<V>(&mut self, content: V) where
V: Into<Option<Content>>,
[src]
V: Into<Option<Content>>,
Set the content of this entry.
Examples
use atom_syndication::{Entry, Content}; let mut entry = Entry::default(); entry.set_content(Content::default()); assert!(entry.content().is_some());
fn extensions(&self) -> &ExtensionMap
[src]
Return the extensions for this entry.
Examples
use std::collections::HashMap; use atom_syndication::Entry; use atom_syndication::extension::{ExtensionMap, Extension}; let extension = Extension::default(); let mut item_map = HashMap::<String, Vec<Extension>>::new(); item_map.insert("ext:name".to_string(), vec![extension]); let mut extension_map = ExtensionMap::default(); extension_map.insert("ext".to_string(), item_map); let mut entry = Entry::default(); entry.set_extensions(extension_map); assert_eq!(entry.extensions() .get("ext") .and_then(|m| m.get("ext:name")) .map(|v| v.len()), Some(1));
fn set_extensions<V>(&mut self, extensions: V) where
V: Into<ExtensionMap>,
[src]
V: Into<ExtensionMap>,
Set the extensions for this entry.
Examples
use atom_syndication::Entry; use atom_syndication::extension::ExtensionMap; let mut entry = Entry::default(); entry.set_extensions(ExtensionMap::default());
Trait Implementations
impl Debug for Entry
[src]
impl Default for Entry
[src]
impl Clone for Entry
[src]
fn clone(&self) -> Entry
[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