Struct atom_syndication::Person
source · pub struct Person {
pub name: String,
pub email: Option<String>,
pub uri: Option<String>,
}
Expand description
Represents a person in an Atom feed
Fields§
§name: String
A 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());
Trait Implementations§
source§impl PartialEq<Person> for Person
impl PartialEq<Person> for Person
impl StructuralPartialEq for Person
Auto Trait Implementations§
impl RefUnwindSafe for Person
impl Send for Person
impl Sync for Person
impl Unpin for Person
impl UnwindSafe for Person
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