Struct jsonfeed::Feed
[−]
[src]
pub struct Feed { pub version: String, pub title: String, pub items: Vec<Item>, pub home_page_url: Option<String>, pub feed_url: Option<String>, pub description: Option<String>, pub user_comment: Option<String>, pub next_url: Option<String>, pub icon: Option<String>, pub favicon: Option<String>, pub author: Option<Author>, pub expired: Option<bool>, pub hubs: Option<Vec<Hub>>, }
Represents a single feed
Examples
// Serialize a feed object to a JSON string let feed: Feed = Feed::default(); assert_eq!( jsonfeed::to_string(&feed).unwrap(), "{\"version\":\"https://jsonfeed.org/version/1\",\"title\":\"\",\"items\":[]}" );
// Deserialize a feed objects from a JSON String let json = "{\"version\":\"https://jsonfeed.org/version/1\",\"title\":\"\",\"items\":[]}"; let feed: Feed = jsonfeed::from_str(&json).unwrap(); assert_eq!( feed, Feed::default() );
Fields
version: String
title: String
items: Vec<Item>
home_page_url: Option<String>
feed_url: Option<String>
description: Option<String>
user_comment: Option<String>
next_url: Option<String>
icon: Option<String>
favicon: Option<String>
expired: Option<bool>
hubs: Option<Vec<Hub>>
Methods
impl Feed
[src]
fn builder() -> Builder
Used to construct a Feed object
Trait Implementations
impl Debug for Feed
[src]
impl Clone for Feed
[src]
fn clone(&self) -> Feed
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Feed
[src]
fn eq(&self, __arg_0: &Feed) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Feed) -> bool
This method tests for !=
.