pub struct DependencyNode {
pub resource_type: ResourceType,
pub name: String,
pub source: Option<String>,
}Expand description
Represents a dependency node in the graph.
Each node represents a unique resource that can be installed. Nodes are distinguished by name, resource type, and source to prevent false cycle detection when the same resource name appears in multiple sources.
Fields§
§resource_type: ResourceTypeResource type: Agent, Snippet, Command, etc.
name: StringDependency name as specified in the manifest.
source: Option<String>Source name (e.g., “community”, “local”). None for direct path dependencies.
Implementations§
Source§impl DependencyNode
impl DependencyNode
Sourcepub fn new(resource_type: ResourceType, name: impl Into<String>) -> Self
pub fn new(resource_type: ResourceType, name: impl Into<String>) -> Self
Create a new dependency node without a source.
Sourcepub fn with_source(
resource_type: ResourceType,
name: impl Into<String>,
source: Option<String>,
) -> Self
pub fn with_source( resource_type: ResourceType, name: impl Into<String>, source: Option<String>, ) -> Self
Create a new dependency node with a source.
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
Get a display name for this node.
Trait Implementations§
Source§impl Clone for DependencyNode
impl Clone for DependencyNode
Source§fn clone(&self) -> DependencyNode
fn clone(&self) -> DependencyNode
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 DependencyNode
impl Debug for DependencyNode
Source§impl Display for DependencyNode
impl Display for DependencyNode
Source§impl Hash for DependencyNode
impl Hash for DependencyNode
Source§impl PartialEq for DependencyNode
impl PartialEq for DependencyNode
impl Eq for DependencyNode
impl StructuralPartialEq for DependencyNode
Auto Trait Implementations§
impl Freeze for DependencyNode
impl RefUnwindSafe for DependencyNode
impl Send for DependencyNode
impl Sync for DependencyNode
impl Unpin for DependencyNode
impl UnwindSafe for DependencyNode
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.