pub struct Redundancy {
pub source_file: String,
pub usages: Vec<ResourceUsage>,
}Expand description
Represents a detected redundancy pattern where multiple resources use the same source file.
A Redundancy is created when the analysis detects that multiple resources
reference the same source file (identified by source:path) but with different
version constraints or names.
§Redundancy Criteria
A redundancy is detected when:
- Multiple Usages: More than one resource uses the same source file
- Version Differences: The usages specify different version constraints
Note: Multiple resources using the same source file with identical versions are NOT considered redundant, as this is a valid use case.
§Use Cases for Legitimate Redundancy
- A/B Testing: Installing multiple versions for comparison
- Migration Periods: Gradually transitioning between versions
- Rollback Preparation: Keeping previous versions for quick rollback
- Environment Differences: Different versions for dev/staging/prod
§Display Format
When displayed, redundancies show:
⚠ Multiple versions of 'community:agents/helper.md' will be installed:
- 'app-helper' uses version v1.0.0
- 'tool-helper' uses version v2.0.0Fields§
§source_file: StringThe source file that is used multiple times
usages: Vec<ResourceUsage>All usages of this source file
Trait Implementations§
Source§impl Debug for Redundancy
impl Debug for Redundancy
Auto Trait Implementations§
impl Freeze for Redundancy
impl RefUnwindSafe for Redundancy
impl Send for Redundancy
impl Sync for Redundancy
impl Unpin for Redundancy
impl UnwindSafe for Redundancy
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.