Struct atom_syndication::Entry [−][src]
pub struct Entry {Show fields
pub title: Text,
pub id: String,
pub updated: FixedDateTime,
pub authors: Vec<Person>,
pub categories: Vec<Category>,
pub contributors: Vec<Person>,
pub links: Vec<Link>,
pub published: Option<FixedDateTime>,
pub rights: Option<Text>,
pub source: Option<Source>,
pub summary: Option<Text>,
pub content: Option<Content>,
pub extensions: ExtensionMap,
}Expand description
Represents an entry in an Atom feed
Fields
title: TextA human-readable title for the entry.
id: StringA universally unique and permanent URI.
updated: FixedDateTimeThe last time the entry was modified.
The authors of the feed.
categories: Vec<Category>The categories that the entry belongs to.
contributors: Vec<Person>The contributors to the entry.
links: Vec<Link>The Web pages related to the entry.
published: Option<FixedDateTime>The time of the initial creation or first availability of the entry.
rights: Option<Text>Information about rights held in and over the entry.
source: Option<Source>The source information if an entry is copied from one feed into another feed.
summary: Option<Text>A short summary, abstract, or excerpt of the entry.
content: Option<Content>Contains or links to the complete content of the entry.
extensions: ExtensionMapThe extensions for this entry.
Implementations
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");
Set the title of this entry.
Examples
use atom_syndication::Entry; let mut entry = Entry::default(); entry.set_title("Entry Title");
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");
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");
Return the last time that this entry was modified.
Examples
use atom_syndication::Entry; use atom_syndication::FixedDateTime; use std::str::FromStr; let mut entry = Entry::default(); entry.set_updated(FixedDateTime::from_str("2017-06-03T15:15:44-05:00").unwrap()); assert_eq!(entry.updated().to_rfc3339(), "2017-06-03T15:15:44-05:00");
Set the last time that this entry was modified.
Examples
use atom_syndication::Entry; use atom_syndication::FixedDateTime; use std::str::FromStr; let mut entry = Entry::default(); entry.set_updated(FixedDateTime::from_str("2017-06-03T15:15:44-05:00").unwrap());
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);
Set the authors of this entry.
Examples
use atom_syndication::{Entry, Person}; let mut entry = Entry::default(); entry.set_authors(vec![Person::default()]);
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);
Set the categories this entry belongs to.
Examples
use atom_syndication::{Entry, Category}; let mut entry = Entry::default(); entry.set_categories(vec![Category::default()]);
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);
Set the contributors to this entry.
Examples
use atom_syndication::{Entry, Person}; let mut entry = Entry::default(); entry.set_contributors(vec![Person::default()]);
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);
Set the links for this entry.
Examples
use atom_syndication::{Entry, Link}; let mut entry = Entry::default(); entry.set_links(vec![Link::default()]);
Return the time that this entry was initially created or first made available.
Examples
use atom_syndication::Entry; use atom_syndication::FixedDateTime; use std::str::FromStr; let mut entry = Entry::default(); entry.set_published(FixedDateTime::from_str("2017-06-01T15:15:44-05:00").unwrap()); assert_eq!(entry.published().map(|x|x.to_rfc3339()), Some("2017-06-01T15:15:44-05:00".to_string()));
Set the time that this entry was initially created or first made available.
Examples
use atom_syndication::Entry; use atom_syndication::FixedDateTime; use std::str::FromStr; let mut entry = Entry::default(); entry.set_published(FixedDateTime::from_str("2017-06-01T15:15:44-05:00").unwrap());
Return the information about the rights held in and over this entry.
Examples
use atom_syndication::{Entry, Text}; let mut entry = Entry::default(); entry.set_rights(Text::from("© 2017 John Doe")); assert_eq!(entry.rights().map(Text::as_str), Some("© 2017 John Doe"));
Set the information about the rights held in and over this entry.
Examples
use atom_syndication::{Entry, Text}; let mut entry = Entry::default(); entry.set_rights(Text::from("© 2017 John Doe"));
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());
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());
Return the summary of this entry.
Examples
use atom_syndication::{Entry, Text}; let mut entry = Entry::default(); entry.set_summary(Text::from("Entry summary.")); assert_eq!(entry.summary().map(Text::as_str), Some("Entry summary."));
Set the summary of this entry.
Examples
use atom_syndication::{Entry, Text}; let mut entry = Entry::default(); entry.set_summary(Text::from("Entry summary."));
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());
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());
Return the extensions for this entry.
Examples
use std::collections::BTreeMap; use atom_syndication::Entry; use atom_syndication::extension::{ExtensionMap, Extension}; let extension = Extension::default(); let mut item_map = BTreeMap::<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));
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
Auto Trait Implementations
impl RefUnwindSafe for Entryimpl UnwindSafe for EntryBlanket Implementations
Mutably borrows from an owned value. Read more