Struct atom_syndication::Person[][src]

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

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

Return the name of this person.

Examples

use atom_syndication::Person;

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

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

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

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.