[][src]Struct json_feed_model::AuthorRef

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

An Author implemented with a borrowed reference to a JSON object.

Implementations

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

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

Returns the inner Map as a reference.

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

pub fn to_author(&self) -> Author[src]

Clones the inner Map reference and returns an owned type.

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

The optional author's name.

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

An optional URL for a site which represents the author.

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

An optional URL for an image which represents the author.

impl<'a> AuthorRef<'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> AsRef<Map<String, Value>> for AuthorRef<'a>[src]

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

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

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

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

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

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

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for AuthorRef<'a>

impl<'a> Send for AuthorRef<'a>

impl<'a> Sync for AuthorRef<'a>

impl<'a> Unpin for AuthorRef<'a>

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