pub struct ArtifactGraph {
pub nodes: Vec<ArtifactNode>,
pub edges: Vec<ArtifactEdge>,
}Expand description
Lightweight graph describing scanned artifacts and their relationships.
Fields§
§nodes: Vec<ArtifactNode>§edges: Vec<ArtifactEdge>Implementations§
Source§impl ArtifactGraph
impl ArtifactGraph
pub fn new() -> Self
pub fn add_node(&mut self, path: impl Into<String>, kind: ArtifactKind)
pub fn add_node_with_capabilities( &mut self, path: impl Into<String>, kind: ArtifactKind, capabilities: Vec<ArtifactCapabilityFact>, )
pub fn add_edge( &mut self, from: impl Into<String>, to: impl Into<String>, relation: ArtifactRelation, )
pub fn add_edge_with_endpoint( &mut self, from: impl Into<String>, to: impl Into<String>, relation: ArtifactRelation, endpoint_kind: Option<EndpointKind>, )
Trait Implementations§
Source§impl Clone for ArtifactGraph
impl Clone for ArtifactGraph
Source§fn clone(&self) -> ArtifactGraph
fn clone(&self) -> ArtifactGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ArtifactGraph
impl Debug for ArtifactGraph
Source§impl Default for ArtifactGraph
impl Default for ArtifactGraph
Source§fn default() -> ArtifactGraph
fn default() -> ArtifactGraph
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ArtifactGraph
impl<'de> Deserialize<'de> for ArtifactGraph
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
Auto Trait Implementations§
impl Freeze for ArtifactGraph
impl RefUnwindSafe for ArtifactGraph
impl Send for ArtifactGraph
impl Sync for ArtifactGraph
impl Unpin for ArtifactGraph
impl UnsafeUnpin for ArtifactGraph
impl UnwindSafe for ArtifactGraph
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