pub struct EdgeData {
pub edge_type: EdgeType,
pub ref_line: Option<usize>,
pub ident: Option<String>,
pub version_spec: Option<String>,
pub is_dev_dependency: Option<bool>,
}Expand description
Edge data stored as edge weights in petgraph.
This struct carries the relationship information for edges in the graph, enabling efficient traversal while preserving edge semantics.
Fields§
§edge_type: EdgeTypeRelationship type (CONTAINS, USES, DEFINES, DEPENDS_ON)
ref_line: Option<usize>Line number where the reference occurs (for USES edges)
ident: Option<String>The identifier text at the reference site (for USES/DEPENDS_ON edges)
version_spec: Option<String>Version specification (for DEPENDS_ON edges)
is_dev_dependency: Option<bool>Whether this is a development dependency (for DEPENDS_ON edges)
Implementations§
Source§impl EdgeData
impl EdgeData
Sourcepub fn depends_on(
ident: Option<String>,
version_spec: Option<String>,
is_dev: Option<bool>,
) -> Self
pub fn depends_on( ident: Option<String>, version_spec: Option<String>, is_dev: Option<bool>, ) -> Self
Create a DEPENDS_ON edge data (component dependency)
§Arguments
ident- The dependency name as specified in manifestversion_spec- Version specification (e.g., “workspace:*”, “^1.0.0”)is_dev- Whether this is a development dependency
Trait Implementations§
impl Eq for EdgeData
impl StructuralPartialEq for EdgeData
Auto Trait Implementations§
impl Freeze for EdgeData
impl RefUnwindSafe for EdgeData
impl Send for EdgeData
impl Sync for EdgeData
impl Unpin for EdgeData
impl UnwindSafe for EdgeData
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§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 more