pub trait ReportFormatter<P: Package, VS: VersionSet, M: Eq + Clone + Debug + Display> {
type Output;
// Required methods
fn format_external(&self, external: &External<P, VS, M>) -> Self::Output;
fn format_terms(&self, terms: &Map<P, Term<VS>>) -> Self::Output;
fn explain_both_external(
&self,
external1: &External<P, VS, M>,
external2: &External<P, VS, M>,
current_terms: &Map<P, Term<VS>>,
) -> Self::Output;
fn explain_both_ref(
&self,
ref_id1: usize,
derived1: &Derived<P, VS, M>,
ref_id2: usize,
derived2: &Derived<P, VS, M>,
current_terms: &Map<P, Term<VS>>,
) -> Self::Output;
fn explain_ref_and_external(
&self,
ref_id: usize,
derived: &Derived<P, VS, M>,
external: &External<P, VS, M>,
current_terms: &Map<P, Term<VS>>,
) -> Self::Output;
fn and_explain_external(
&self,
external: &External<P, VS, M>,
current_terms: &Map<P, Term<VS>>,
) -> Self::Output;
fn and_explain_ref(
&self,
ref_id: usize,
derived: &Derived<P, VS, M>,
current_terms: &Map<P, Term<VS>>,
) -> Self::Output;
fn and_explain_prior_and_external(
&self,
prior_external: &External<P, VS, M>,
external: &External<P, VS, M>,
current_terms: &Map<P, Term<VS>>,
) -> Self::Output;
}Expand description
Trait for formatting outputs in the reporter.
Required Associated Types§
Required Methods§
Sourcefn format_external(&self, external: &External<P, VS, M>) -> Self::Output
fn format_external(&self, external: &External<P, VS, M>) -> Self::Output
Format an External incompatibility.
Sourcefn format_terms(&self, terms: &Map<P, Term<VS>>) -> Self::Output
fn format_terms(&self, terms: &Map<P, Term<VS>>) -> Self::Output
Format terms of an incompatibility.
Sourcefn explain_both_external(
&self,
external1: &External<P, VS, M>,
external2: &External<P, VS, M>,
current_terms: &Map<P, Term<VS>>,
) -> Self::Output
fn explain_both_external( &self, external1: &External<P, VS, M>, external2: &External<P, VS, M>, current_terms: &Map<P, Term<VS>>, ) -> Self::Output
Simplest case, we just combine two external incompatibilities.
Sourcefn explain_both_ref(
&self,
ref_id1: usize,
derived1: &Derived<P, VS, M>,
ref_id2: usize,
derived2: &Derived<P, VS, M>,
current_terms: &Map<P, Term<VS>>,
) -> Self::Output
fn explain_both_ref( &self, ref_id1: usize, derived1: &Derived<P, VS, M>, ref_id2: usize, derived2: &Derived<P, VS, M>, current_terms: &Map<P, Term<VS>>, ) -> Self::Output
Both causes have already been explained so we use their refs.
Sourcefn explain_ref_and_external(
&self,
ref_id: usize,
derived: &Derived<P, VS, M>,
external: &External<P, VS, M>,
current_terms: &Map<P, Term<VS>>,
) -> Self::Output
fn explain_ref_and_external( &self, ref_id: usize, derived: &Derived<P, VS, M>, external: &External<P, VS, M>, current_terms: &Map<P, Term<VS>>, ) -> Self::Output
One cause is derived (already explained so one-line), the other is a one-line external cause, and finally we conclude with the current incompatibility.
Sourcefn and_explain_external(
&self,
external: &External<P, VS, M>,
current_terms: &Map<P, Term<VS>>,
) -> Self::Output
fn and_explain_external( &self, external: &External<P, VS, M>, current_terms: &Map<P, Term<VS>>, ) -> Self::Output
Add an external cause to the chain of explanations.