Struct rustc_query_system::dep_graph::SerializedDepGraph
source · pub struct SerializedDepGraph<K: DepKind> {
nodes: IndexVec<SerializedDepNodeIndex, DepNode<K>>,
fingerprints: IndexVec<SerializedDepNodeIndex, Fingerprint>,
edge_list_indices: IndexVec<SerializedDepNodeIndex, (u32, u32)>,
edge_list_data: Vec<SerializedDepNodeIndex>,
index: FxHashMap<DepNode<K>, SerializedDepNodeIndex>,
}
Expand description
Data for use when recompiling the current crate.
Fields§
§nodes: IndexVec<SerializedDepNodeIndex, DepNode<K>>
The set of all DepNodes in the graph
fingerprints: IndexVec<SerializedDepNodeIndex, Fingerprint>
The set of all Fingerprints in the graph. Each Fingerprint corresponds to the DepNode at the same index in the nodes vector.
edge_list_indices: IndexVec<SerializedDepNodeIndex, (u32, u32)>
For each DepNode, stores the list of edges originating from that DepNode. Encoded as a [start, end) pair indexing into edge_list_data, which holds the actual DepNodeIndices of the target nodes.
edge_list_data: Vec<SerializedDepNodeIndex>
A flattened list of all edge targets in the graph. Edge sources are implicit in edge_list_indices.
index: FxHashMap<DepNode<K>, SerializedDepNodeIndex>
Reciprocal map to nodes
.
Implementations§
source§impl<K: DepKind> SerializedDepGraph<K>
impl<K: DepKind> SerializedDepGraph<K>
pub fn edge_targets_from(
&self,
source: SerializedDepNodeIndex
) -> &[SerializedDepNodeIndex]
pub fn index_to_node(&self, dep_node_index: SerializedDepNodeIndex) -> DepNode<K>
pub fn node_to_index_opt(
&self,
dep_node: &DepNode<K>
) -> Option<SerializedDepNodeIndex>
pub fn fingerprint_of(&self, dep_node: &DepNode<K>) -> Option<Fingerprint>
pub fn fingerprint_by_index(
&self,
dep_node_index: SerializedDepNodeIndex
) -> Fingerprint
pub fn node_count(&self) -> usize
Trait Implementations§
source§impl<'a, K: DepKind + Decodable<MemDecoder<'a>>> Decodable<MemDecoder<'a>> for SerializedDepGraph<K>
impl<'a, K: DepKind + Decodable<MemDecoder<'a>>> Decodable<MemDecoder<'a>> for SerializedDepGraph<K>
fn decode(d: &mut MemDecoder<'a>) -> SerializedDepGraph<K>
Auto Trait Implementations§
impl<K> RefUnwindSafe for SerializedDepGraph<K>where
K: RefUnwindSafe,
impl<K> Send for SerializedDepGraph<K>
impl<K> Sync for SerializedDepGraph<K>where
K: Sync,
impl<K> Unpin for SerializedDepGraph<K>where
K: Unpin,
impl<K> UnwindSafe for SerializedDepGraph<K>where
K: UnwindSafe,
Blanket Implementations§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 128 bytes