Struct git_object::commit::MessageRef [−][src]
Expand description
A parsed commit message that assumes a title separated from the body by two consecutive newlines.
Titles can have any amount of whitespace
Fields
title: &'a BStr
The title of the commit, as separated from the body with two consecutive newlines. The newlines are not included.
body: Option<&'a BStr>
All bytes not consumed by the title, excluding the separating newlines.
The body is None
if there was now title separation or the body was empty after the separator.
Implementations
Parse the given input
as message.
Note that this cannot fail as everything will be interpreted as title if there is no body separator.
Produce a short commit summary for the message title.
This means the following
- Take the subject line which is delimited by two newlines (\n\n)
- transform intermediate consecutive whitespace including \r into one space
The resulting summary will have folded whitespace before a newline into spaces and stopped that process once two consecutive newlines are encountered.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for MessageRef<'a>
impl<'a> Send for MessageRef<'a>
impl<'a> Sync for MessageRef<'a>
impl<'a> Unpin for MessageRef<'a>
impl<'a> UnwindSafe for MessageRef<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more