pub struct Trailers {
pub op: Option<String>,
pub entities: Vec<String>,
pub scope: Option<Scope>,
pub machine: Option<MachineRef>,
pub client: Option<String>,
pub apply: Option<ApplyRef>,
pub other: Vec<(String, String)>,
}Expand description
The Surjection-* trailers of one commit.
Fields§
§op: Option<String>Operation (server.add, store.init).
entities: Vec<String>Changed entities (server/github), one per trailer line.
scope: Option<Scope>§machine: Option<MachineRef>§client: Option<String>Program and version that made the change (surject-cli/0.1.0).
apply: Option<ApplyRef>§other: Vec<(String, String)>Other Surjection-* trailers in order, keys without the prefix.
Implementations§
Source§impl Trailers
impl Trailers
Sourcepub fn format(&self) -> String
pub fn format(&self) -> String
Trailer lines (Surjection-Op: server.add), each ending in \n.
Line breaks inside values become spaces.
Sourcepub fn parse(message: &str) -> Self
pub fn parse(message: &str) -> Self
Reads the Surjection-* trailers (and the Loadout-* ones of 1.0.x
commits) from the last paragraph of a commit
message. Other trailers are ignored; a message without a trailer
paragraph yields empty trailers.
pub fn is_empty(&self) -> bool
Trait Implementations§
impl Eq for Trailers
impl StructuralPartialEq for Trailers
Auto Trait Implementations§
impl Forget for Trailers
impl Freeze for Trailerswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<(String, String)>: Freeze,
impl Move for Trailers
impl RefUnwindSafe for Trailers
impl Send for Trailerswhere
RawVecInner: Send,
impl Sync for Trailerswhere
RawVecInner: Sync,
impl Unpin for Trailers
impl UnsafeUnpin for Trailerswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for Trailerswhere
RawVecInner: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.