#[non_exhaustive]pub struct AtomEntry {Show 13 fields
pub id: String,
pub title: String,
pub updated: String,
pub published: String,
pub summary: String,
pub summary_type: AtomTextType,
pub content: String,
pub content_type: AtomTextType,
pub rights: String,
pub authors: Vec<AtomPerson>,
pub contributors: Vec<AtomPerson>,
pub links: Vec<AtomLink>,
pub categories: Vec<String>,
}Expand description
An Atom 1.0 entry (<entry>).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringPermanent, universally unique identifier of the entry.
title: StringHuman-readable title.
updated: StringRFC 3339 timestamp of the most recent significant modification.
published: StringOptional RFC 3339 publication timestamp.
summary: StringShort human-readable description.
summary_type: AtomTextTypeType of the summary payload.
content: StringFull content payload (may be empty).
content_type: AtomTextTypeType of the content payload.
rights: StringOptional rights string.
Authors of the entry.
contributors: Vec<AtomPerson>Contributors to the entry.
links: Vec<AtomLink>Links attached to the entry, including media enclosures.
categories: Vec<String>Category tags applied to the entry (term values only).
Implementations§
Source§impl AtomEntry
impl AtomEntry
Sourcepub fn updated<S: Into<String>>(self, value: S) -> Self
pub fn updated<S: Into<String>>(self, value: S) -> Self
Sets the entry-level updated timestamp (RFC 3339).
Sourcepub fn published<S: Into<String>>(self, value: S) -> Self
pub fn published<S: Into<String>>(self, value: S) -> Self
Sets the entry-level published timestamp (RFC 3339).
Sourcepub fn summary_html<S: Into<String>>(self, value: S) -> Self
pub fn summary_html<S: Into<String>>(self, value: S) -> Self
Sets the HTML summary payload.
Sourcepub fn content_html<S: Into<String>>(self, value: S) -> Self
pub fn content_html<S: Into<String>>(self, value: S) -> Self
Sets the HTML content payload.
Adds an author with the given name.
Adds an AtomPerson to the entry’s author list.
Sourcepub fn alternate_link<S: Into<String>>(self, href: S) -> Self
pub fn alternate_link<S: Into<String>>(self, href: S) -> Self
Convenience: adds a rel="alternate" link to the entry’s resource.
Sourcepub fn add_enclosure<S, T>(self, href: S, mime_type: T, length: u64) -> Self
pub fn add_enclosure<S, T>(self, href: S, mime_type: T, length: u64) -> Self
Convenience: attaches a media enclosure (RFC 4287 §4.2.7.2).
Sourcepub fn add_category<S: Into<String>>(self, term: S) -> Self
pub fn add_category<S: Into<String>>(self, term: S) -> Self
Adds a category tag.