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

Method with_algorithm

atomic-core/src/record/detect.rs:185–188  ·  view source on GitHub ↗

Set the diff algorithm. # Arguments `algorithm` - Algorithm to use for content comparison # Example ```rust use atomic_core::record::DetectOptions; use atomic_core::diff::Algorithm; let opts = DetectOptions::new().with_algorithm(Algorithm::Patience); assert_eq!(opts.algorithm, Algorithm::Patience); ```

(mut self, algorithm: Algorithm)

Source from the content-addressed store, hash-verified

183 /// assert_eq!(opts.algorithm, Algorithm::Patience);
184 /// ```
185 pub fn with_algorithm(mut self, algorithm: Algorithm) -> Self {
186 self.algorithm = algorithm;
187 self
188 }
189
190 /// Set whether to use mtime optimization.
191 ///

Callers 4

test_options_algorithmFunction · 0.45
test_options_chainingFunction · 0.45

Calls

no outgoing calls

Tested by 4

test_options_algorithmFunction · 0.36
test_options_chainingFunction · 0.36