MCPcopy Create free account
hub / github.com/hashintel/hash / insert_edge

Method insert_edge

libs/@local/graph/store/src/subgraph/mod.rs:72–89  ·  view source on GitHub ↗
(
        &mut self,
        left_endpoint: &L,
        edge_kind: E,
        direction: EdgeDirection,
        right_endpoint: R,
    )

Source from the content-addressed store, hash-verified

70 }
71
72 pub fn insert_edge<L, E, R>(
73 &mut self,
74 left_endpoint: &L,
75 edge_kind: E,
76 direction: EdgeDirection,
77 right_endpoint: R,
78 ) where
79 L: VertexId<BaseId: Eq + Clone + Hash, RevisionId: Ord + Clone>,
80 R: EdgeEndpoint,
81 E: EdgeKind<L, R, EdgeSet: Default> + Eq + Hash,
82 {
83 edge_kind.subgraph_entry_mut(&mut self.edges).insert(
84 left_endpoint,
85 edge_kind,
86 direction,
87 right_endpoint,
88 );
89 }
90
91 /// Returns an iterator over all entities in the subgraph with their valid temporal intervals.
92 ///

Callers 5

resolve_entity_edgesMethod · 0.45
traverse_entity_typesMethod · 0.45
traverse_data_typesMethod · 0.45

Calls 2

insertMethod · 0.45
subgraph_entry_mutMethod · 0.45

Tested by

no test coverage detected