pub struct ResourceUsage {
pub resource_name: String,
pub source_file: String,
pub version: Option<String>,
}Expand description
Represents a specific usage of a source file by a resource dependency.
This struct captures how a particular resource (agent or snippet) uses a source file, including version constraints and naming information. It’s the fundamental unit of redundancy analysis.
§Fields
resource_name: The name given to this resource in the manifestsource_file: Composite identifier in format “source:path”version: Version constraint (None means latest/default branch)
§Example
For this manifest entry:
[agents]
my-helper = { source = "community", path = "agents/helper.md", version = "v1.2.3" }The corresponding ResourceUsage would be:
ResourceUsage {
resource_name: "my-helper".to_string(),
source_file: "community:agents/helper.md".to_string(),
version: Some("v1.2.3".to_string()),
}Fields§
§resource_name: StringThe resource name that uses this source file
source_file: StringThe source file being used (source:path)
version: Option<String>The version being used
Trait Implementations§
Source§impl Clone for ResourceUsage
impl Clone for ResourceUsage
Source§fn clone(&self) -> ResourceUsage
fn clone(&self) -> ResourceUsage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceUsage
impl Debug for ResourceUsage
Auto Trait Implementations§
impl Freeze for ResourceUsage
impl RefUnwindSafe for ResourceUsage
impl Send for ResourceUsage
impl Sync for ResourceUsage
impl Unpin for ResourceUsage
impl UnwindSafe for ResourceUsage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.