pub struct Article {
pub source: Source,
pub author: Option<String>,
pub title: String,
pub description: Option<String>,
pub content: Option<String>,
pub url: String,
pub url_to_image: Option<String>,
pub published_at: DateTime<Utc>,
}Expand description
Represents a news article returned by the API.
Fields§
§source: SourceThe source of the article, containing its ID and name.
The author of the article, if available.
title: StringThe title of the article.
description: Option<String>A brief description of the article, if available.
content: Option<String>The main content of the article, if available.
url: StringThe URL to the full article.
url_to_image: Option<String>The URL to the article’s image, if available.
published_at: DateTime<Utc>The publication date and time of the article.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Article
impl<'de> Deserialize<'de> for Article
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 Article
impl RefUnwindSafe for Article
impl Send for Article
impl Sync for Article
impl Unpin for Article
impl UnsafeUnpin for Article
impl UnwindSafe for Article
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