Skip to main content

Ancestry

Trait Ancestry 

Source
pub trait Ancestry {
    // Required methods
    fn commit_of(&self, spec: &str) -> Result<Option<String>, EngineError>;
    fn is_ancestor(&self, older: &str, newer: &str) -> Result<bool, EngineError>;
}
Expand description

Placing one review’s head against another’s.

Kept apart from RangeResolver because the question is different: not “what are this range’s endpoints” but “are these two heads on one line of history”. That is what tells a branch that moved on from a different branch off the same base.

Required Methods§

Source

fn commit_of(&self, spec: &str) -> Result<Option<String>, EngineError>

The commit a spec names NOW, or None if it names nothing.

A review filed against a branch that has since been deleted is not an error — it is a candidate that cannot be placed, so it is skipped.

Source

fn is_ancestor(&self, older: &str, newer: &str) -> Result<bool, EngineError>

Is older reachable from newer?

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§