pub enum BaseState {
Local,
Current,
Behind {
behind: u32,
},
Unverified,
}Expand description
How current the base a drawn branch diff was measured against is.
The base is a remote-tracking ref (origin/main), and how far the remote
has moved past it is only knowable over the network. The read that draws
the diff refreshes it first, so a diff is never shown from a stale base
without saying so.
Variants§
Local
A local base with nothing it could lag behind: no origin remote, and
no upstream of its own. A local base beside an origin, or one whose
branch tracks some remote (main@{upstream}), is Unverified instead
- it can be arbitrarily behind one nobody fetched.
Current
The base was fetched and matches the remote.
Behind
The base could not be fetched, and the remote has behind commits it
lacks.
Unverified
The base could not be fetched and could not be checked against the remote either.
Trait Implementations§
impl Copy for BaseState
Source§impl<'de> Deserialize<'de> for BaseState
impl<'de> Deserialize<'de> for BaseState
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 BaseState
impl StructuralPartialEq for BaseState
Auto Trait Implementations§
impl Freeze for BaseState
impl RefUnwindSafe for BaseState
impl Send for BaseState
impl Sync for BaseState
impl Unpin for BaseState
impl UnsafeUnpin for BaseState
impl UnwindSafe for BaseState
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.