graph_api_lib/support.rs
1/// Supports indexing of vertices by label
2pub trait SupportsVertexLabelIndex: crate::Graph {}
3
4/// Supports indexing of edges by label
5pub trait SupportsEdgeLabelIndex: crate::Graph {}
6
7/// Supports indexing of vertices by field using a hash index
8pub trait SupportsVertexHashIndex: crate::Graph {}
9
10/// Supports indexing of edges by field using a hash index
11pub trait SupportsEdgeHashIndex: crate::Graph {}
12
13/// Supports indexing of vertices by field with range queries
14pub trait SupportsVertexRangeIndex: crate::Graph {}
15
16/// Supports indexing of edges by field with range queries
17pub trait SupportsEdgeRangeIndex: crate::Graph {}
18
19/// Supports indexing of vertices by field using a full text index
20pub trait SupportsVertexFullTextIndex: crate::Graph {}
21
22/// Supports indexing of edges by adjacent vertex label
23pub trait SupportsEdgeAdjacentLabelIndex: crate::Graph {}
24
25/// Supports clearing all vertices and edges
26pub trait SupportsClear: crate::Graph {
27 /// Clears the graph, removing all vertices and edges
28 fn clear(&mut self);
29}
30
31/// Supports removal of individual vertices and edges
32pub trait SupportsElementRemoval: crate::Graph {
33 /// Removes a vertex from the graph and returns the vertex.
34 fn remove_vertex(&mut self, id: Self::VertexId) -> Option<Self::Vertex>;
35
36 /// Removes an edge from the graph and returns the edge.
37 fn remove_edge(&mut self, id: Self::EdgeId) -> Option<Self::Edge>;
38}