pub type AllocState = Tree;Aliased Type§
pub struct AllocState {
pub(super) tag_mapping: UniKeyMap<BorTag>,
pub(super) nodes: UniValMap<Node>,
pub(super) rperms: DedupRangeMap<UniValMap<LocationState>>,
pub(super) root: UniIndex,
}Fields§
§tag_mapping: UniKeyMap<BorTag>Mapping from tags to keys. The key obtained can then be used in
any of the UniValMap relative to this allocation, i.e. both the
nodes and rperms of the same Tree.
The parent-child relationship in Node is encoded in terms of these same
keys, so traversing the entire tree needs exactly one access to
tag_mapping.
nodes: UniValMap<Node>All nodes of this tree.
rperms: DedupRangeMap<UniValMap<LocationState>>Maps a tag and a location to a perm, with possible lazy initialization.
NOTE: not all tags registered in nodes are necessarily in all
ranges of rperms, because rperms is in part lazily initialized.
Just because nodes.get(key) is Some(_) does not mean you can safely
unwrap any perm.get(key).
We do uphold the fact that keys(perms) is a subset of keys(nodes)
root: UniIndexThe index of the root node.
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: 112 bytes