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
impl EmailCreateOptions
sourcepub fn new() -> Self
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
.
sourcepub fn omit_numbers(&mut self, omit: bool) -> &mut Self
pub fn omit_numbers(&mut self, omit: bool) -> &mut Self
Flag indicating whether patch numbers are included in the subject prefix.
sourcepub fn always_number(&mut self, always: bool) -> &mut Self
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).
sourcepub fn ignore_renames(&mut self, ignore: bool) -> &mut Self
pub fn ignore_renames(&mut self, ignore: bool) -> &mut Self
Flag indicating whether rename or similarity detection are ignored.
sourcepub fn diff_options(&mut self) -> &mut DiffOptions
pub fn diff_options(&mut self) -> &mut DiffOptions
Get mutable access to DiffOptions
that are used for creating diffs.
sourcepub fn diff_find_options(&mut self) -> &mut DiffFindOptions
pub fn diff_find_options(&mut self) -> &mut DiffFindOptions
Get mutable access to DiffFindOptions
that are used for finding
similarities within diffs.
sourcepub fn subject_prefix<T: IntoCString>(&mut self, t: T) -> &mut Self
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.
sourcepub fn start_number(&mut self, number: usize) -> &mut Self
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.
sourcepub fn reroll_number(&mut self, number: usize) -> &mut Self
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).