pub struct TrailerRef<'a> {
pub token: &'a BStr,
pub value: Cow<'a, BStr>,
}Expand description
A trailer as parsed from the commit message body.
Fields§
§token: &'a BStrThe name of the trailer, like “Signed-off-by”, up to the separator : .
value: Cow<'a, BStr>The value right after the separator : , with leading and trailing whitespace trimmed.
Multi-line values are unfolded to match git interpret-trailers --parse, which is when
this field is Cow::Owned.
Implementations§
Source§impl TrailerRef<'_>
Convenience methods
impl TrailerRef<'_>
Convenience methods
Sourcepub fn is_signed_off_by(&self) -> bool
pub fn is_signed_off_by(&self) -> bool
Check if this trailer is a Signed-off-by trailer (case-insensitive).
Check if this trailer is a Co-authored-by trailer (case-insensitive).
Sourcepub fn is_acked_by(&self) -> bool
pub fn is_acked_by(&self) -> bool
Check if this trailer is an Acked-by trailer (case-insensitive).
Sourcepub fn is_reviewed_by(&self) -> bool
pub fn is_reviewed_by(&self) -> bool
Check if this trailer is a Reviewed-by trailer (case-insensitive).
Sourcepub fn is_tested_by(&self) -> bool
pub fn is_tested_by(&self) -> bool
Check if this trailer is a Tested-by trailer (case-insensitive).
Sourcepub fn is_attribution(&self) -> bool
pub fn is_attribution(&self) -> bool
Check if this trailer represents any kind of authorship or attribution
(Signed-off-by, Co-authored-by, etc.).
Trait Implementations§
Source§impl<'a> Clone for TrailerRef<'a>
impl<'a> Clone for TrailerRef<'a>
Source§fn clone(&self) -> TrailerRef<'a>
fn clone(&self) -> TrailerRef<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more