Create a context with pre-allocated content buffer. # Arguments `txn` - Transaction for graph lookups `capacity` - Initial capacity for content buffer # Example ```rust,ignore let ctx = GlobalizeContext::with_capacity(&txn, 1024 * 1024); ```
(txn: &'txn T, capacity: usize)
| 127 | /// let ctx = GlobalizeContext::with_capacity(&txn, 1024 * 1024); |
| 128 | /// ``` |
| 129 | pub fn with_capacity(txn: &'txn T, capacity: usize) -> Self { |
| 130 | Self { |
| 131 | txn, |
| 132 | content: Vec::with_capacity(capacity), |
| 133 | content_position: 0, |
| 134 | dependencies: HashSet::new(), |
| 135 | inode_cache: std::collections::HashMap::new(), |
| 136 | position_cache: std::collections::HashMap::new(), |
| 137 | content_vertices_cache: std::collections::HashMap::new(), |
| 138 | directory_anchors: std::collections::HashMap::new(), |
| 139 | vacated_bindings: std::collections::HashMap::new(), |
| 140 | projected_paths: std::collections::HashMap::new(), |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | /// Register a binding removed by the same atomic change. A new parent |
| 145 | /// directory at that path must receive a distinct graph identity. |
nothing calls this directly
no outgoing calls
no test coverage detected