pub struct DependencyMetadata {
pub dependencies: Option<HashMap<String, Vec<DependencySpec>>>,
}Expand description
Metadata extracted from resource files.
This structure represents the dependency information that can be embedded within resource files themselves, either as YAML frontmatter in Markdown files or as JSON fields in JSON configuration files.
Fields§
§dependencies: Option<HashMap<String, Vec<DependencySpec>>>Maps resource type to list of dependency specifications.
The keys are resource types: “agents”, “snippets”, “commands”, “scripts”, “hooks”, “mcp-servers”.
Example:
dependencies:
agents:
- path: agents/helper.md
version: v1.0.0
snippets:
- path: snippets/utils.mdImplementations§
Source§impl DependencyMetadata
impl DependencyMetadata
Sourcepub fn has_dependencies(&self) -> bool
pub fn has_dependencies(&self) -> bool
Check if this metadata contains any dependencies.
Sourcepub fn dependency_count(&self) -> usize
pub fn dependency_count(&self) -> usize
Get the total count of dependencies.
Trait Implementations§
Source§impl Clone for DependencyMetadata
impl Clone for DependencyMetadata
Source§fn clone(&self) -> DependencyMetadata
fn clone(&self) -> DependencyMetadata
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 DependencyMetadata
impl Debug for DependencyMetadata
Source§impl Default for DependencyMetadata
impl Default for DependencyMetadata
Source§fn default() -> DependencyMetadata
fn default() -> DependencyMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DependencyMetadata
impl<'de> Deserialize<'de> for DependencyMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DependencyMetadata
impl PartialEq for DependencyMetadata
Source§impl Serialize for DependencyMetadata
impl Serialize for DependencyMetadata
impl Eq for DependencyMetadata
impl StructuralPartialEq for DependencyMetadata
Auto Trait Implementations§
impl Freeze for DependencyMetadata
impl RefUnwindSafe for DependencyMetadata
impl Send for DependencyMetadata
impl Sync for DependencyMetadata
impl Unpin for DependencyMetadata
impl UnwindSafe for DependencyMetadata
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.