Struct git2::Signature [] [src]

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

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.

Methods

impl<'a> Signature<'a>
[src]

[src]

Create a new action signature with a timestamp of 'now'.

See new for more information

[src]

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.

[src]

Gets the name on the signature.

Returns None if the name is not valid utf-8

[src]

Gets the name on the signature as a byte slice.

[src]

Gets the email on the signature.

Returns None if the email is not valid utf-8

[src]

Gets the email on the signature as a byte slice.

[src]

Get the when of this signature.

[src]

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

Trait Implementations

impl Clone for Signature<'static>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Drop for Signature<'a>
[src]

[src]

Executes the destructor for this type. Read more

impl<'a> Display for Signature<'a>
[src]

[src]

Formats the value using the given formatter. Read more