Struct atom_syndication::Entry [] [src]

pub struct Entry { /* fields omitted */ }

Represents an entry in an Atom feed

Methods

impl Entry
[src]

[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");

[src]

Set the title of this entry.

Examples

use atom_syndication::Entry;

let mut entry = Entry::default();
entry.set_title("Entry Title");

[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");

[src]

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");

[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");

[src]

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()]);

[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);

[src]

Set the categories this entry belongs to.

Examples

use atom_syndication::{Entry, Category};

let mut entry = Entry::default();
entry.set_categories(vec![Category::default()]);

[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);

[src]

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()]);

[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"));

[src]

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());

[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"));

[src]

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());

[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());

[src]

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());

[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."));

[src]

Set the summary of this entry.

Examples

use atom_syndication::Entry;

let mut entry = Entry::default();
entry.set_summary("Entry summary.".to_string());

[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());

[src]

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());

[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));

[src]

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]

[src]

Formats the value using the given formatter.

impl Default for Entry
[src]

[src]

Returns the "default value" for a type. Read more

impl Clone for Entry
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Entry
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.