Struct json_feed_model::Author
source · [−]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
sourceimpl 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
sourceimpl<'de> Deserialize<'de> for Author
impl<'de> Deserialize<'de> for Author
sourcefn 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 RefUnwindSafe for Author
impl Send for Author
impl Sync for Author
impl Unpin for Author
impl UnwindSafe for Author
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more