Struct gedcomx::Agent[][src]

#[non_exhaustive]
pub struct Agent { pub id: Option<Id>, pub identifiers: Vec<Identifier>, pub names: Vec<TextValue>, pub homepage: Option<ResourceReference>, pub openid: Option<ResourceReference>, pub accounts: Vec<OnlineAccount>, pub emails: Vec<ResourceReference>, pub phones: Vec<ResourceReference>, pub addresses: Vec<Address>, pub person: Option<ResourceReference>, }
Expand description

Someone or something that curates genealogical data, such as a genealogical researcher, user of software, organization, or group.

In genealogical research, an agent often takes the role of a contributor.

Fields (Non-exhaustive)

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
id: Option<Id>

An identifier for the data structure holding the agent data. The id is to be used as a “fragment identifier” as defined by RFC 3986, Section 3.5. As such, the constraints of the id are provided in the definition of the media type (e.g. XML, JSON) of the data structure.

identifiers: Vec<Identifier>

A list of identifiers for the agent.

names: Vec<TextValue>

The name(s) of the person or organization. If more than one name is provided, names are assumed to be given in order of preference, with the most preferred name in the first position in the list.

homepage: Option<ResourceReference>

The homepage of the person or organization. Note this is different from the homepage of the service where the person or organization has an account.

openid: Option<ResourceReference>

The openid of the person or organization.

accounts: Vec<OnlineAccount>

The online account(s) of the person or organization.

emails: Vec<ResourceReference>

The email address(es) of the person or organization. If provided, MUST resolve to a valid e-mail address (e.g. “mailto:someone@gedcomx.org”).

phones: Vec<ResourceReference>

The phone(s) (voice, fax, mobile) of the person or organization. If provided, MUST resolve to a valid phone number (e.g. “tel:+1-201-555-0123”).

addresses: Vec<Address>

The address(es) of the person or organization.

person: Option<ResourceReference>

A reference to the person that describes this agent. MUST resolve to an instance of Person.

Implementations

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

Deserialize this value from the given Serde deserializer. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

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.