Struct git2::Signature[][src]

pub struct Signature<'a> { /* fields omitted */ }
Expand description

A Signature is used to indicate authorship of various actions throughout the library.

Signatures contain a name, email, and timestamp. All fields can be specified with new while the now constructor omits the timestamp. The Repository::signature method can be used to create a default signature with name and email values read from the configuration.

Implementations

Create a new action signature with a timestamp of ‘now’.

See new for more information

Create a new action signature.

The time specified is in seconds since the epoch, and the offset is the time zone offset in minutes.

Returns error if either name or email contain angle brackets.

Gets the name on the signature.

Returns None if the name is not valid utf-8

Gets the name on the signature as a byte slice.

Gets the email on the signature.

Returns None if the email is not valid utf-8

Gets the email on the signature as a byte slice.

Get the when of this signature.

Convert a signature of any lifetime into an owned signature with a static lifetime.

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

Executes the destructor for this type. Read more

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

Converts the given value to a String. 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.