Struct git::User

source · []
pub struct User { /* private fields */ }
Expand description

Represents a user within a commit with a name and email address

Implementations

Creates a new user

Get the optional name of the user

Get the optional email of the user

Returns true if one of name or email is a Some value.

Returns true if both name and email is a None value.

Trait Implementations

Formats the value using the given formatter. Read more

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

This method tests for !=.

Creates a formatted string of the user

The user if formatted with “Name <Email>”, which matches the Git CLI. If name or email are None then they are omitted from the result. If neither are set, and empty is returned.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.