#[non_exhaustive]pub struct SubmoduleStatus {
pub path: PathBuf,
pub sha: String,
pub state: SubmoduleState,
pub describe: Option<String>,
}Expand description
One entry from git submodule status: the checked-out commit, the mount
path, and the sync state derived from the line’s leading
prefix character.
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.path: PathBufThe repo-relative mount path of the submodule. A PathBuf built from
the raw bytes (via vcs_diff::path_from_bytes), lossless on Unix.
sha: StringThe submodule commit git submodule status reports: the checked-out
commit when initialized, or the commit the superproject records (the
gitlink) when uninitialized. Full object id (40-hex SHA-1 or 64-hex
SHA-256).
state: SubmoduleStateThe sync state from the line’s prefix character.
describe: Option<String>The trailing git describe of the submodule HEAD (the (…) suffix) —
e.g. heads/main, a tag, or an abbreviated sha; None for an
uninitialized submodule, which has no such suffix.
Trait Implementations§
Source§impl Clone for SubmoduleStatus
impl Clone for SubmoduleStatus
Source§fn clone(&self) -> SubmoduleStatus
fn clone(&self) -> SubmoduleStatus
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 SubmoduleStatus
impl Debug for SubmoduleStatus
impl Eq for SubmoduleStatus
Source§impl PartialEq for SubmoduleStatus
impl PartialEq for SubmoduleStatus
impl StructuralPartialEq for SubmoduleStatus
Auto Trait Implementations§
impl Freeze for SubmoduleStatus
impl RefUnwindSafe for SubmoduleStatus
impl Send for SubmoduleStatus
impl Sync for SubmoduleStatus
impl Unpin for SubmoduleStatus
impl UnsafeUnpin for SubmoduleStatus
impl UnwindSafe for SubmoduleStatus
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