pub struct HackerNewsStory {
pub id: u32,
pub number_of_comments: u32,
pub comments: Vec<u32>,
pub score: u32,
pub created_at: OffsetDateTime,
pub title: String,
pub url: String,
pub by: String,
}
Expand description
Represents a Hacker News story and all associated data to it including author, text, and child comments.
Fields§
§id: u32
The item’s unique id.
number_of_comments: u32
The total comment count.
comments: Vec<u32>
A list of associated child comment IDs.
score: u32
The story’s total number of upvotes.
created_at: OffsetDateTime
Creation date of the story.
title: String
Title of the story.
url: String
URL of the story.
by: String
Username of the story poster.
Trait Implementations§
Source§impl Debug for HackerNewsStory
impl Debug for HackerNewsStory
Source§impl TryFrom<HackerNewsItem> for HackerNewsStory
impl TryFrom<HackerNewsItem> for HackerNewsStory
Source§type Error = HackerNewsClientError
type Error = HackerNewsClientError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for HackerNewsStory
impl RefUnwindSafe for HackerNewsStory
impl Send for HackerNewsStory
impl Sync for HackerNewsStory
impl Unpin for HackerNewsStory
impl UnwindSafe for HackerNewsStory
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