Struct git2::EmailCreateOptions

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

Options for controlling the formatting of the generated e-mail.

Implementations§

source§

impl EmailCreateOptions

source

pub fn new() -> Self

Creates a new set of email create options

By default, options include rename detection and binary diffs to match git format-patch.

source

pub fn omit_numbers(&mut self, omit: bool) -> &mut Self

Flag indicating whether patch numbers are included in the subject prefix.

source

pub fn always_number(&mut self, always: bool) -> &mut Self

Flag indicating whether numbers included in the subject prefix even when the patch is for a single commit (1/1).

source

pub fn ignore_renames(&mut self, ignore: bool) -> &mut Self

Flag indicating whether rename or similarity detection are ignored.

source

pub fn diff_options(&mut self) -> &mut DiffOptions

Get mutable access to DiffOptions that are used for creating diffs.

source

pub fn diff_find_options(&mut self) -> &mut DiffFindOptions

Get mutable access to DiffFindOptions that are used for finding similarities within diffs.

source

pub fn subject_prefix<T: IntoCString>(&mut self, t: T) -> &mut Self

Set the subject prefix

The default value for this is “PATCH”. If set to an empty string (“”) then only the patch numbers will be shown in the prefix. If the subject_prefix is empty and patch numbers are not being shown, the prefix will be omitted entirely.

source

pub fn start_number(&mut self, number: usize) -> &mut Self

Set the starting patch number; this cannot be 0.

The default value for this is 1.

source

pub fn reroll_number(&mut self, number: usize) -> &mut Self

Set the “re-roll” number.

The default value for this is 0 (no re-roll).

Trait Implementations§

source§

impl Default for EmailCreateOptions

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.