pub struct Email { /* private fields */ }
Expand description
A structure to represent patch in mbox format for sending via email
Implementations§
source§impl Email
impl Email
sourcepub fn as_slice(&self) -> &[u8] ⓘ
pub fn as_slice(&self) -> &[u8] ⓘ
Returns a byte slice with stored e-mail patch in. Email
could be
created by one of the from_*
functions.
sourcepub fn from_diff<T: IntoCString>(
diff: &Diff<'_>,
patch_idx: usize,
patch_count: usize,
commit_id: &Oid,
summary: T,
body: T,
author: &Signature<'_>,
opts: &mut EmailCreateOptions
) -> Result<Self, Error>
pub fn from_diff<T: IntoCString>( diff: &Diff<'_>, patch_idx: usize, patch_count: usize, commit_id: &Oid, summary: T, body: T, author: &Signature<'_>, opts: &mut EmailCreateOptions ) -> Result<Self, Error>
Create a diff for a commit in mbox format for sending via email.
sourcepub fn from_commit(
commit: &Commit<'_>,
opts: &mut EmailCreateOptions
) -> Result<Self, Error>
pub fn from_commit( commit: &Commit<'_>, opts: &mut EmailCreateOptions ) -> Result<Self, Error>
Create a diff for a commit in mbox format for sending via email. The commit must not be a merge commit.