#[non_exhaustive]pub struct StashEntry {
pub index: usize,
pub hash: String,
pub branch: Option<String>,
pub message: String,
}Expand description
One entry from git stash list, parsed via
--format=%gd%x1f%H%x1f%gs -z: the stash’s position, the stashed commit’s
hash, and its label split into an optional branch and the rest of the
message.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.index: usizeThe stash’s position in the list (stash@{<index>}’s <index>), most
recent first (0) — the numeral crate::GitApi::stash_apply /
crate::GitApi::stash_drop take.
hash: StringThe stashed commit’s full object id (%H).
branch: Option<String>The branch checked out when the stash was pushed, from git’s default
"WIP on <branch>: …" / stash push -m’s "On <branch>: …" label;
None when git recorded no branch (a detached HEAD, "(no branch)").
message: StringThe rest of the label: the default <abbrev-sha> <subject> when
stash push was given no -m, or the caller’s message verbatim when
it was.
Trait Implementations§
Source§impl Clone for StashEntry
impl Clone for StashEntry
Source§fn clone(&self) -> StashEntry
fn clone(&self) -> StashEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StashEntry
impl Debug for StashEntry
impl Eq for StashEntry
Source§impl PartialEq for StashEntry
impl PartialEq for StashEntry
impl StructuralPartialEq for StashEntry
Auto Trait Implementations§
impl Freeze for StashEntry
impl RefUnwindSafe for StashEntry
impl Send for StashEntry
impl Sync for StashEntry
impl Unpin for StashEntry
impl UnsafeUnpin for StashEntry
impl UnwindSafe for StashEntry
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