pub struct FeedItem {
pub title: String,
pub link: String,
pub description: Option<String>,
pub pub_date: Option<DateTime<Utc>>,
pub author: Option<String>,
pub guid: Option<String>,
}Expand description
One entry in a feed.
Fields§
§title: String§link: StringPer-item URL — RSS <link> / <guid>, Atom <id>.
description: Option<String>§pub_date: Option<DateTime<Utc>>Free-form author identifier. RSS: an email address per spec;
Atom: any string (rendered as <author><name>...</name></author>).
guid: Option<String>Optional override for the per-item <guid> (RSS) / <id>
(Atom). Defaults to link when unset.
Implementations§
Source§impl FeedItem
impl FeedItem
Sourcepub fn new(title: impl Into<String>, link: impl Into<String>) -> Self
pub fn new(title: impl Into<String>, link: impl Into<String>) -> Self
Build an item with the two required fields (title + link).
pub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_pub_date(self, when: DateTime<Utc>) -> Self
pub fn with_guid(self, guid: impl Into<String>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FeedItem
impl RefUnwindSafe for FeedItem
impl Send for FeedItem
impl Sync for FeedItem
impl Unpin for FeedItem
impl UnsafeUnpin for FeedItem
impl UnwindSafe for FeedItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more