Struct atom_syndication::Person
source · Expand description
Represents a person in an Atom feed
Fields§
§name: StringA human-readable name for the person.
email: Option<String>An email address for the person.
uri: Option<String>A Web page for the person.
Implementations§
source§impl Person
impl Person
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Return the name of this person.
Examples
use atom_syndication::Person;
let mut person = Person::default();
person.set_name("John Doe");
assert_eq!(person.name(), "John Doe");sourcepub fn set_name<V>(&mut self, name: V)where
V: Into<String>,
pub fn set_name<V>(&mut self, name: V)where
V: Into<String>,
Return the name of this person.
Examples
use atom_syndication::Person;
let mut person = Person::default();
person.set_name("John Doe");sourcepub fn email(&self) -> Option<&str>
pub fn email(&self) -> Option<&str>
Return the email address for this person.
Examples
use atom_syndication::Person;
let mut person = Person::default();
person.set_email("johndoe@example.com".to_string());
assert_eq!(person.email(), Some("johndoe@example.com"));sourcepub fn set_email<V>(&mut self, email: V)where
V: Into<Option<String>>,
pub fn set_email<V>(&mut self, email: V)where
V: Into<Option<String>>,
Set the email address for this person.
Examples
use atom_syndication::Person;
let mut person = Person::default();
person.set_email("johndoe@example.com".to_string());