Trait libgitdit::message::Message
[−]
[src]
pub trait Message { fn message_lines(&self) -> IntoIter<String>; fn body_lines(&self) -> BodyLines; fn body_blocks(&self) -> Blocks<BodyLines, String>; fn trailers(&self) -> Trailers<BodyLines, String>; fn reply_subject(&mut self) -> Option<String>; }
Message trait
This extension gives a more convenient access to message functionality via
git2::Commit
.
Required Methods
fn message_lines(&self) -> IntoIter<String>
Get the commit message as a sequence of lines
If the commit has no message, an empty message will be simulated.
fn body_lines(&self) -> BodyLines
Get the commit message's body as a sequence of lines
fn body_blocks(&self) -> Blocks<BodyLines, String>
Get the commit message's body as a sequence of paragraphs and blocks of trailers
fn trailers(&self) -> Trailers<BodyLines, String>
Get an iterator over all the trailers in the commit message's body
fn reply_subject(&mut self) -> Option<String>
Get a suitable subject for a reply
The subject returned will start with "Re: ".
Implementors
impl<'c> Message for Commit<'c>