pub struct BranchInfo {
pub name: String,
pub kind: RefKind,
pub tip_id: String,
pub summary: String,
pub author: String,
pub time_seconds: i64,
pub time_offset_minutes: i32,
pub upstream: Option<String>,
pub base_name: String,
pub base_id: Option<String>,
}Expand description
A local or remote branch, as listed by review mode.
A branch is reviewed as the aggregated diff of everything it contains:
from its merge base with the repository’s default branch (base_name,
the same base a pull request would diff against) up to its tip. The tip
commit’s summary/author/date fill the branch list’s columns.
Fields§
§name: StringShort name: main, feature/x, origin/main.
kind: RefKindRefKind::Head for the checked-out branch, otherwise
RefKind::LocalBranch / RefKind::RemoteBranch.
tip_id: StringFull SHA of the branch’s tip commit.
summary: StringSummary line of the tip commit.
Author of the tip commit.
time_seconds: i64Tip commit author time, seconds since the Unix epoch.
time_offset_minutes: i32Tip commit timezone offset in minutes east of UTC.
upstream: Option<String>The branch’s remote-tracking upstream (e.g. origin/main) when it
sits at the same tip: the two are one line in the review list, this
row carrying both names, instead of the remote being listed
separately. None for remote branches, untracked locals, and locals
that have diverged from their upstream (the remote then keeps its own
row, since it reviews differently).
base_name: StringName of the branch the review diff is measured against — the
repository’s default branch (e.g. main).
base_id: Option<String>The merge base with base_name, i.e. the diff base. None when the
histories are unrelated; the branch then diffs against the empty tree,
so everything it contains reads as added.
Implementations§
Source§impl BranchInfo
impl BranchInfo
Sourcepub fn short_date_string(&self) -> String
pub fn short_date_string(&self) -> String
Short tip date 2026-05-29 23:10 for the branch list row.
Trait Implementations§
Source§impl Clone for BranchInfo
impl Clone for BranchInfo
Source§fn clone(&self) -> BranchInfo
fn clone(&self) -> BranchInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BranchInfo
impl Debug for BranchInfo
impl Eq for BranchInfo
Source§impl PartialEq for BranchInfo
impl PartialEq for BranchInfo
Source§fn eq(&self, other: &BranchInfo) -> bool
fn eq(&self, other: &BranchInfo) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BranchInfo
Auto Trait Implementations§
impl Freeze for BranchInfo
impl RefUnwindSafe for BranchInfo
impl Send for BranchInfo
impl Sync for BranchInfo
impl Unpin for BranchInfo
impl UnsafeUnpin for BranchInfo
impl UnwindSafe for BranchInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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§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
key and return true if they are equal.