pub struct WipMetadata {
pub message: String,
pub branch: String,
pub task: Option<String>,
pub files: usize,
pub untracked: usize,
}Expand description
Metadata stored in the [wip-push] trailer block of the commit message
Fields§
§message: String§branch: String§task: Option<String>§files: usize§untracked: usizeImplementations§
Source§impl WipMetadata
impl WipMetadata
Sourcepub fn to_commit_message(&self) -> String
pub fn to_commit_message(&self) -> String
Build the full commit message with trailer
Sourcepub fn from_commit_message(msg: &str) -> Self
pub fn from_commit_message(msg: &str) -> Self
Parse metadata from a commit message
Trait Implementations§
Source§impl Clone for WipMetadata
impl Clone for WipMetadata
Source§fn clone(&self) -> WipMetadata
fn clone(&self) -> WipMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WipMetadata
impl RefUnwindSafe for WipMetadata
impl Send for WipMetadata
impl Sync for WipMetadata
impl Unpin for WipMetadata
impl UnsafeUnpin for WipMetadata
impl UnwindSafe for WipMetadata
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