pub struct NewsPost {
pub post_id: u32,
pub author: Username,
pub edit_url: String,
pub first_image: String,
pub published_at: OffsetDateTime,
pub updated_at: Option<OffsetDateTime>,
pub slug: String,
pub title: String,
pub preview: Option<String>,
}
Fields§
§post_id: u32
§edit_url: String
Link to the file view on GitHub.
first_image: String
Link to the first image in the document.
published_at: OffsetDateTime
§updated_at: Option<OffsetDateTime>
§slug: String
Filename without the extension, used in URLs.
title: String
§preview: Option<String>
First paragraph of content
with HTML markup stripped.
Trait Implementations§
source§impl<'de> Deserialize<'de> for NewsPost
impl<'de> Deserialize<'de> for NewsPost
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
source§impl PartialEq<NewsPost> for NewsPost
impl PartialEq<NewsPost> for NewsPost
impl Eq for NewsPost
Auto Trait Implementations§
impl RefUnwindSafe for NewsPost
impl Send for NewsPost
impl Sync for NewsPost
impl Unpin for NewsPost
impl UnwindSafe for NewsPost
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.