pub struct RepoVitals {
pub branch: String,
pub changes: usize,
pub stashes: usize,
pub ahead: Option<usize>,
pub level: usize,
}Expand description
仓库体征:主菜单 RPG 状态面板展示的数据,打开菜单时查询一次。
Fields§
§branch: String当前分支名(detached HEAD 时为 “HEAD”)
changes: usize工作区 + 暂存区改动条目数
stashes: usizestash 条目数
ahead: Option<usize>领先上游的提交数;未设置上游分支时为 None
level: usizeHEAD 可达的提交总数(空仓库为 0)
Trait Implementations§
Source§impl Clone for RepoVitals
impl Clone for RepoVitals
Source§fn clone(&self) -> RepoVitals
fn clone(&self) -> RepoVitals
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 moreAuto Trait Implementations§
impl Freeze for RepoVitals
impl RefUnwindSafe for RepoVitals
impl Send for RepoVitals
impl Sync for RepoVitals
impl Unpin for RepoVitals
impl UnsafeUnpin for RepoVitals
impl UnwindSafe for RepoVitals
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more