pub struct Branch {
pub name: String,
pub current: bool,
pub upstream: Option<String>,
pub ahead: u32,
pub behind: u32,
pub upstream_gone: bool,
pub head: String,
pub subject: Option<String>,
}Available on crate feature
workflow only.Expand description
One local branch with tracking info.
Fields§
§name: StringShort branch name (e.g. "main").
current: booltrue when this is the currently-checked-out branch.
upstream: Option<String>Configured upstream in remote/branch form, if any.
ahead: u32Commits this branch is ahead of its upstream.
behind: u32Commits this branch is behind its upstream.
upstream_gone: booltrue when the configured upstream no longer exists ([gone]).
head: StringShort SHA of the branch tip.
subject: Option<String>Subject line of the tip commit, if non-empty.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Branch
impl<'de> Deserialize<'de> for Branch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Branch
impl StructuralPartialEq for Branch
Auto Trait Implementations§
impl Freeze for Branch
impl RefUnwindSafe for Branch
impl Send for Branch
impl Sync for Branch
impl Unpin for Branch
impl UnsafeUnpin for Branch
impl UnwindSafe for Branch
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