[][src]Struct json_feed_model::FeedMut

pub struct FeedMut<'a> { /* fields omitted */ }

A Feed implemented with a borrowed mutable reference to a JSON object.

Implementations

impl<'a> FeedMut<'a>[src]

pub fn as_map(&self) -> &Map<String, Value>[src]

Returns the inner Map as a reference.

impl<'a> FeedMut<'a>[src]

pub fn as_map_mut(&mut self) -> &mut Map<String, Value>[src]

Returns the inner Map as a mutable reference.

pub fn to_feed(&self) -> Feed[src]

Clones the inner Map reference and returns an owned type.

pub fn version(&self) -> Result<Option<&str>, Error>[src]

The required URL formatted version identifier.

Identifies what version of the spec the feed is suppose to be compliant with.

pub fn set_version<T>(&mut self, value: T) -> Option<Value> where
    T: ToString
[src]

Sets the version identifier.

pub fn remove_version(&mut self) -> Option<Value>[src]

Removes the version identifier.

pub fn title(&self) -> Result<Option<&str>, Error>[src]

The optional name of the feed.

pub fn set_title<T>(&mut self, value: T) -> Option<Value> where
    T: ToString
[src]

Sets the name of the feed.

pub fn remove_title(&mut self) -> Option<Value>[src]

Removes the name of the feed.

pub fn home_page_url(&self) -> Result<Option<&str>, Error>[src]

The optional URL which the feed is suppose to represent.

pub fn set_home_page_url<T>(&mut self, value: T) -> Option<Value> where
    T: ToString
[src]

Sets the home page URL.

pub fn remove_home_page_url(&mut self) -> Option<Value>[src]

Removes the home page URL.

pub fn feed_url(&self) -> Result<Option<&str>, Error>[src]

The optional URL which this feed can be retrieived from.

pub fn set_feed_url<T>(&mut self, value: T) -> Option<Value> where
    T: ToString
[src]

Sets the feed URL.

pub fn remove_feed_url(&mut self) -> Option<Value>[src]

Removes the feed URL.

pub fn description(&self) -> Result<Option<&str>, Error>[src]

An optional description of the feed.

pub fn set_description<T>(&mut self, value: T) -> Option<Value> where
    T: ToString
[src]

Sets the description of the feed.

pub fn remove_description(&mut self) -> Option<Value>[src]

Removes the description of the feed.

pub fn user_comment(&self) -> Result<Option<&str>, Error>[src]

An optional meta description about the feed only intended to be viewed in the raw JSON form.

pub fn set_user_comment<T>(&mut self, value: T) -> Option<Value> where
    T: ToString
[src]

Sets the user comment.

pub fn remove_user_comment(&mut self) -> Option<Value>[src]

Removes the user comment.

pub fn next_url(&self) -> Result<Option<&str>, Error>[src]

An optional pagination URL.

pub fn set_next_url<T>(&mut self, value: T) -> Option<Value> where
    T: ToString
[src]

Sets the next URL.

pub fn remove_next_url(&mut self) -> Option<Value>[src]

Removes the next URL.

pub fn icon(&self) -> Result<Option<&str>, Error>[src]

An optional URL to an icon for use in a list of items.

pub fn set_icon<T>(&mut self, value: T) -> Option<Value> where
    T: ToString
[src]

Sets the icon.

pub fn remove_icon(&mut self) -> Option<Value>[src]

Removes the icon.

pub fn favicon(&self) -> Result<Option<&str>, Error>[src]

An optional URL to a favicon suitable for use in a list of feeds.

pub fn set_favicon<T>(&mut self, value: T) -> Option<Value> where
    T: ToString
[src]

Sets the favicon URL.

pub fn remove_favicon(&mut self) -> Option<Value>[src]

Removes the favicon URL.

pub fn author(&self) -> Result<Option<AuthorRef<'_>>, Error>[src]

An optional author.

Deprecation

The author field is deprecated in favor of the authors field as of JSON Feed 1.1.

pub fn author_mut(&mut self) -> Result<Option<AuthorMut<'_>>, Error>[src]

An optional author.

Deprecation

The author field is deprecated in favor of the authors field as of JSON Feed 1.1.

pub fn set_author(&mut self, value: Author) -> Option<Value>[src]

Sets the author.

pub fn remove_author(&mut self) -> Option<Value>[src]

Removes the author.

pub fn authors(&self) -> Result<Option<Vec<AuthorRef<'_>>>, Error>[src]

An optional array of authors.

pub fn authors_mut(&mut self) -> Result<Option<Vec<AuthorMut<'_>>>, Error>[src]

An optional array of authors.

pub fn set_authors<I>(&mut self, items: I) -> Option<Value> where
    I: IntoIterator<Item = Author>, 
[src]

Sets the authors.

pub fn remove_authors(&mut self) -> Option<Value>[src]

Removes the authors.

pub fn language(&self) -> Result<Option<&str>, Error>[src]

The optional language which the feed data is written in.

Valid values are from RFC 5646.

pub fn set_language<T>(&mut self, value: T) -> Option<Value> where
    T: ToString
[src]

Sets the language.

pub fn remove_language(&mut self) -> Option<Value>[src]

Removes the language.

pub fn expired(&self) -> Result<Option<bool>, Error>[src]

Optionally determines if the feed will be updated in the future.

If true, the feed will not be updated in the future. If false or None, then the feed may be updated in the future.

pub fn set_expired<T>(&mut self, value: bool) -> Option<Value>[src]

Sets the expired flag.

pub fn remove_expired(&mut self) -> Option<Value>[src]

Removes the expired flag.

pub fn hubs(&self) -> Result<Option<Vec<HubRef<'_>>>, Error>[src]

Optional subscription endpoints which can be used to received feed update notifications.

pub fn hubs_mut(&mut self) -> Result<Option<Vec<HubMut<'_>>>, Error>[src]

Subscription endpoints which can be used to received feed update notifications.

pub fn set_hubs<I>(&mut self, items: I) -> Option<Value> where
    I: IntoIterator<Item = Hub>, 
[src]

Sets the hubs.

pub fn remove_hubs(&mut self) -> Option<Value>[src]

Removes the hubs.

pub fn items(&self) -> Result<Option<Vec<ItemRef<'_>>>, Error>[src]

A required array of Items.

pub fn items_mut(&mut self) -> Result<Option<Vec<ItemMut<'_>>>, Error>[src]

A required array of Items.

pub fn set_items<I>(&mut self, items: I) -> Option<Value> where
    I: IntoIterator<Item = Item>, 
[src]

Sets the items.

pub fn remove_items(&mut self) -> Option<Value>[src]

Removes the items.

impl<'a> FeedMut<'a>[src]

pub fn is_valid(&self, version: &Version<'_>) -> bool[src]

Verifies if the JSON data complies with a specific Version of the JSON Feed spec.

Trait Implementations

impl<'a> AsMut<Map<String, Value>> for FeedMut<'a>[src]

impl<'a> AsRef<Map<String, Value>> for FeedMut<'a>[src]

impl<'a> Debug for FeedMut<'a>[src]

impl<'a> Eq for FeedMut<'a>[src]

impl<'a> From<&'a mut Map<String, Value>> for FeedMut<'a>[src]

impl<'a> PartialEq<FeedMut<'a>> for FeedMut<'a>[src]

impl<'a> PartialEq<Map<String, Value>> for FeedMut<'a>[src]

impl<'a> Serialize for FeedMut<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for FeedMut<'a>

impl<'a> Send for FeedMut<'a>

impl<'a> Sync for FeedMut<'a>

impl<'a> Unpin for FeedMut<'a>

impl<'a> !UnwindSafe for FeedMut<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.