Skip to main content

Retirement

Struct Retirement 

Source
pub struct Retirement {
    pub class: RetirementClass,
    pub reason: Option<KeepReason>,
    pub cause: Option<UnknownCause>,
    pub identity: String,
    pub branch: String,
    pub tip: Sha,
    pub base: String,
    pub proof: Option<RetirementProof>,
    pub content_free_commits: Vec<Sha>,
    pub superseded_by: Option<SupersededBy>,
    pub differing_paths: Vec<String>,
    pub holders: Vec<BranchHolder>,
}
Expand description

What a branch is, and everything that says so.

Fields§

§class: RetirementClass

Which class it is.

§reason: Option<KeepReason>

Why it is kept, for RetirementClass::Keep alone.

§cause: Option<UnknownCause>

The read that failed, for KeepReason::Unknown alone. A document written before this field existed reads as None.

§identity: String

The identity it belongs to.

§branch: String

The branch.

§tip: Sha

Where it stands: the first copy’s tip, in search order.

§base: String

The base it is judged against.

§proof: Option<RetirementProof>

What proves it holds nothing beyond the base, for RetirementClass::Retirable alone.

§content_free_commits: Vec<Sha>

The commits at its tip that change no content, which no proof asks about.

§superseded_by: Option<SupersededBy>

The retry that superseded it, for RetirementClass::SupersededWithChanges.

§differing_paths: Vec<String>

The paths it changed that differ from the base: non-empty exactly for superseded-with-changes and for keep with unmerged-unique-commits.

§holders: Vec<BranchHolder>

Every place holding a copy of it, in search order.

Implementations§

Source§

impl Retirement

Source

pub fn cause(&self) -> Option<&UnknownCause>

The read that failed, for a branch kept as KeepReason::Unknown.

Source

pub fn evidence(&self) -> Vec<String>

The evidence a refusal prints beside the class: the proof, what superseded it, the paths that differ, and where it is.

Source

pub fn verdict(&self) -> String

class and, for a kept branch, / reason — and, for one kept as unknown, : and the read that failed — as a line says them.

Trait Implementations§

Source§

impl Clone for Retirement

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Retirement

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Retirement

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Retirement

Source§

impl PartialEq for Retirement

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Retirement

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Retirement

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.