[][src]Struct atom_syndication::Person

pub struct Person {
    pub name: String,
    pub email: Option<String>,
    pub uri: Option<String>,
}

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

impl Person[src]

pub fn name(&self) -> &str[src]

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");

pub fn set_name<V>(&mut self, name: V) where
    V: Into<String>, 
[src]

Return the name of this person.

Examples

use atom_syndication::Person;

let mut person = Person::default();
person.set_name("John Doe");

pub fn email(&self) -> Option<&str>[src]

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"));

pub fn set_email<V>(&mut self, email: V) where
    V: Into<Option<String>>, 
[src]

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());

pub fn uri(&self) -> Option<&str>[src]

Return the Web page for this person.

Examples

use atom_syndication::Person;

let mut person = Person::default();
person.set_uri("http://example.com".to_string());
assert_eq!(person.uri(), Some("http://example.com"));

pub fn set_uri<V>(&mut self, uri: V) where
    V: Into<Option<String>>, 
[src]

Set the Web page for this person.

Examples

use atom_syndication::Person;

let mut person = Person::default();
person.set_uri("http://example.com".to_string());

Trait Implementations

impl Clone for Person[src]

impl Debug for Person[src]

impl Default for Person[src]

impl PartialEq<Person> for Person[src]

impl StructuralPartialEq for Person[src]

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

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.