Struct git2::Mailmap[][src]

pub struct Mailmap { /* fields omitted */ }
Expand description

A structure to represent a repository’s .mailmap file.

The representation cannot be written to disk.

Implementations

impl Mailmap[src]

pub fn new() -> Result<Mailmap, Error>[src]

Creates an empty, in-memory mailmap object.

pub fn from_buffer(buf: &str) -> Result<Mailmap, Error>[src]

Creates an in-memory mailmap object representing the given buffer.

pub fn add_entry(
    &mut self,
    real_name: Option<&str>,
    real_email: Option<&str>,
    replace_name: Option<&str>,
    replace_email: &str
) -> Result<(), Error>
[src]

Adds a new entry to this in-memory mailmap object.

pub fn resolve_signature(
    &self,
    sig: &Signature<'_>
) -> Result<Signature<'static>, Error>
[src]

Resolves a signature to its real name and email address.

Trait Implementations

impl Drop for Mailmap[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl RefUnwindSafe for Mailmap

impl !Send for Mailmap

impl !Sync for Mailmap

impl Unpin for Mailmap

impl UnwindSafe for Mailmap

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.