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

Method new

atomic-core/src/record/context.rs:160–168  ·  view source on GitHub ↗

Create a new detection context. # Arguments `txn` - Read-only pristine transaction `working_copy` - Working copy for file access `change_store` - Change store for content retrieval # Example ```rust,ignore let ctx = DetectContext::new(&txn, &working_copy, &changes); ```

(txn: &'a T, working_copy: &'a W, change_store: &'a C)

Source from the content-addressed store, hash-verified

158 /// let ctx = DetectContext::new(&txn, &working_copy, &changes);
159 /// ```
160 pub fn new(txn: &'a T, working_copy: &'a W, change_store: &'a C) -> Self {
161 Self {
162 txn,
163 working_copy,
164 change_store,
165 view: None,
166 options: DetectOptions::default(),
167 }
168 }
169
170 /// Set the view to compare against.
171 ///

Callers

nothing calls this directly

Calls 2

file_nameMethod · 0.80
with_viewMethod · 0.45

Tested by

no test coverage detected