Struct git2::BlameOptions

source ·
pub struct BlameOptions { /* private fields */ }
Expand description

Blame options

Implementations§

source§

impl BlameOptions

source

pub fn new() -> BlameOptions

Initialize options

source

pub fn track_copies_same_file(&mut self, opt: bool) -> &mut BlameOptions

Track lines that have moved within a file.

source

pub fn track_copies_same_commit_moves(&mut self, opt: bool) -> &mut BlameOptions

Track lines that have moved across files in the same commit.

source

pub fn track_copies_same_commit_copies( &mut self, opt: bool, ) -> &mut BlameOptions

Track lines that have been copied from another file that exists in the same commit.

source

pub fn track_copies_any_commit_copies(&mut self, opt: bool) -> &mut BlameOptions

Track lines that have been copied from another file that exists in any commit.

source

pub fn first_parent(&mut self, opt: bool) -> &mut BlameOptions

Restrict the search of commits to those reachable following only the first parents.

source

pub fn use_mailmap(&mut self, opt: bool) -> &mut BlameOptions

Use mailmap file to map author and committer names and email addresses to canonical real names and email addresses. The mailmap will be read from the working directory, or HEAD in a bare repository.

source

pub fn ignore_whitespace(&mut self, opt: bool) -> &mut BlameOptions

Ignore whitespace differences.

source

pub fn newest_commit(&mut self, id: Oid) -> &mut BlameOptions

Setter for the id of the newest commit to consider.

source

pub fn oldest_commit(&mut self, id: Oid) -> &mut BlameOptions

Setter for the id of the oldest commit to consider.

source

pub fn min_line(&mut self, lineno: usize) -> &mut BlameOptions

The first line in the file to blame.

source

pub fn max_line(&mut self, lineno: usize) -> &mut BlameOptions

The last line in the file to blame.

Trait Implementations§

source§

impl Default for BlameOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.