pub struct CachedArticle {
pub slug: String,
pub date: String,
pub title: String,
pub html_url: String,
pub sub_url: String,
pub sha: String,
pub author_name: String,
pub content: String,
}Expand description
A news article stored in the local cache.
The slug field (YYYY-MM-DD_article-name) is derived from the wiki page
title (news/YYYY-MM-DD_article-name) and is the canonical, stable
identifier. It does not change when the article is edited, so it is
safe to compare against last_read_news.
Fields§
§slug: StringYYYY-MM-DD_slug, canonical article identifier, stable across edits.
date: StringYYYY-MM-DD, publication date, derived from the slug, used for display.
title: String§html_url: String§sub_url: String§sha: StringCurrent commit SHA; compared against the API to detect content updates.
content: StringTrait Implementations§
Source§impl Clone for CachedArticle
impl Clone for CachedArticle
Source§fn clone(&self) -> CachedArticle
fn clone(&self) -> CachedArticle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CachedArticle
impl Debug for CachedArticle
Source§impl<'de> Deserialize<'de> for CachedArticle
impl<'de> Deserialize<'de> for CachedArticle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CachedArticle
impl RefUnwindSafe for CachedArticle
impl Send for CachedArticle
impl Sync for CachedArticle
impl Unpin for CachedArticle
impl UnsafeUnpin for CachedArticle
impl UnwindSafe for CachedArticle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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