pub struct Trailers { /* private fields */ }Expand description
A Git commit’s set of trailers that are left in the commit’s message.
Trailers are key/value pairs in the last paragraph of a message, not including any patches or conflicts that may be present.
§Usage
To construct Trailers, you can use Trailers::parse or its
FromStr implementation.
To iterate over the trailers, you can use Trailers::iter.
To render the trailers to a String, you can use
Trailers::to_string or its Display implementation (note that
it will default to using ": " as the separator.
§Examples
Add new functionality
Making code better with new functionality.
X-Signed-Off-By: Alex Sellier
X-Co-Authored-By: Fintan HalpennyThe trailers in the above example are:
X-Signed-Off-By: Alex Sellier
X-Co-Authored-By: Fintan HalpennyImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Trailers
impl RefUnwindSafe for Trailers
impl !Send for Trailers
impl !Sync for Trailers
impl Unpin for Trailers
impl UnwindSafe for Trailers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more