MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / new

Method new

atomic-core/src/record/workflow/globalize/context.rs:102–115  ·  view source on GitHub ↗

Create a new globalization context. # Arguments `txn` - Transaction for graph lookups # Example ```rust,ignore let ctx = GlobalizeContext::new(&txn); assert!(ctx.dependencies().is_empty()); ```

(txn: &'txn T)

Source from the content-addressed store, hash-verified

100 /// assert!(ctx.dependencies().is_empty());
101 /// ```
102 pub fn new(txn: &'txn T) -> Self {
103 Self {
104 txn,
105 content: Vec::new(),
106 content_position: 0,
107 dependencies: HashSet::new(),
108 inode_cache: std::collections::HashMap::new(),
109 position_cache: std::collections::HashMap::new(),
110 content_vertices_cache: std::collections::HashMap::new(),
111 directory_anchors: std::collections::HashMap::new(),
112 vacated_bindings: std::collections::HashMap::new(),
113 projected_paths: std::collections::HashMap::new(),
114 }
115 }
116
117 /// Create a context with pre-allocated content buffer.
118 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected