pub struct Author { /* private fields */ }
Expand description
An author of a feed or an item in the feed.
§Valid Author
An Author
must have at least one of the name
, url
, or avatar
properties set.
Implementations§
Source§impl Author
impl Author
Sourcepub fn as_map_mut(&mut self) -> &mut Map<String, Value>
pub fn as_map_mut(&mut self) -> &mut Map<String, Value>
Returns the inner Map
as a mutable reference.
Sourcepub fn into_inner(self) -> Map<String, Value>
pub fn into_inner(self) -> Map<String, Value>
Converts the type into the inner Map
.
Sourcepub fn remove_name(&mut self) -> Option<Value>
pub fn remove_name(&mut self) -> Option<Value>
Remove the name.
Sourcepub fn url(&self) -> Result<Option<&str>, Error>
pub fn url(&self) -> Result<Option<&str>, Error>
An optional URL for a site which represents the author.
Sourcepub fn remove_url(&mut self) -> Option<Value>
pub fn remove_url(&mut self) -> Option<Value>
Removes the URL.
Sourcepub fn avatar(&self) -> Result<Option<&str>, Error>
pub fn avatar(&self) -> Result<Option<&str>, Error>
An optional URL for an image which represents the author.
Sourcepub fn set_avatar<T>(&mut self, value: T) -> Option<Value>where
T: ToString,
pub fn set_avatar<T>(&mut self, value: T) -> Option<Value>where
T: ToString,
Sets the avatar.
Sourcepub fn remove_avatar(&mut self) -> Option<Value>
pub fn remove_avatar(&mut self) -> Option<Value>
Removes the avatar.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Author
impl<'de> Deserialize<'de> for Author
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
impl Eq for Author
Auto Trait Implementations§
impl Freeze for Author
impl RefUnwindSafe for Author
impl Send for Author
impl Sync for Author
impl Unpin for Author
impl UnwindSafe for Author
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