[][src]Struct json_feed_model::HubMut

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

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

Implementations

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

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

Returns the inner Map as a reference.

impl<'a> HubMut<'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_hub(&self) -> Hub[src]

Clones the inner Map reference and returns an owned type.

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

The required protocol which is used to subscribe with.

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

Sets the type.

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

Removes the type.

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

A required hub type specific URL which is used to subscribe with.

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

Sets the URL.

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

Removes the URL.

impl<'a> HubMut<'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 HubMut<'a>[src]

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

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

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

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

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

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

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for HubMut<'a>

impl<'a> Send for HubMut<'a>

impl<'a> Sync for HubMut<'a>

impl<'a> Unpin for HubMut<'a>

impl<'a> !UnwindSafe for HubMut<'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.