pub enum TraitChange {
RequiredMethodAdded,
DefaultMethodAdded,
MethodRemoved,
RequiredMethodSignatureChanged,
DefaultMethodBodyChanged,
SupertraitOrBoundChanged,
}Expand description
Per-method or trait-level change classification. One-to-one with the
bullets in README §3B. Confidence floor for anything requiring
resolution (actual impl bodies) stays at Likely in v0.2 — we cannot
prove which impls delegate vs override without rust-analyzer.
Variants§
RequiredMethodAdded
A new method was added without a default body. Every impl that does not supply it will fail to compile.
DefaultMethodAdded
A new method was added with a default body. Rarely breaking, but can shadow same-named methods on implementing types.
MethodRemoved
A method was removed. Breaks any caller that referenced it and any impl that still tries to define it.
RequiredMethodSignatureChanged
A required-method signature (args, return type, generics, where clause) changed. Impls with the old signature break at compile time.
DefaultMethodBodyChanged
Only the body of a default method changed. Runtime behavior shifts for impls that rely on the default; impls that override are unaffected. We cannot tell which is which without name resolution.
SupertraitOrBoundChanged
The trait’s supertrait list or generic bounds changed. Downstream generic code constrained by the trait may stop compiling.
Implementations§
Source§impl TraitChange
impl TraitChange
Sourcepub fn severity(self) -> SeverityClass
pub fn severity(self) -> SeverityClass
Severity class per README §3B. Required-side changes and removals are compile breaks on downstream impls; default-body changes are runtime-only and narrower; bound changes sit in the middle.
Sourcepub fn tier(self) -> Tier
pub fn tier(self) -> Tier
Confidence tier. All classifications stay at Likely or Possible
in v0.2 — proving which impls actually delegate vs override needs
resolved name lookup, which arrives with rust-analyzer in v0.3.
Sourcepub fn confidence(self) -> f64
pub fn confidence(self) -> f64
Numeric confidence score. Higher for changes that unambiguously break downstream compilation; lower for runtime-only or defaulted-only changes where impact depends on resolution.
Trait Implementations§
Source§impl Clone for TraitChange
impl Clone for TraitChange
Source§fn clone(&self) -> TraitChange
fn clone(&self) -> TraitChange
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TraitChange
impl Debug for TraitChange
Source§impl PartialEq for TraitChange
impl PartialEq for TraitChange
Source§fn eq(&self, other: &TraitChange) -> bool
fn eq(&self, other: &TraitChange) -> bool
self and other values to be equal, and is used by ==.