MCPcopy Create free account
hub / github.com/calfonso/rusternetes / copy_operation

Function copy_operation

crates/api-server/src/patch.rs:296–299  ·  view source on GitHub ↗

Copy operation - copies a value from one path to another

(value: &Value, from: &str, to: &str)

Source from the content-addressed store, hash-verified

294
295/// Copy operation - copies a value from one path to another
296fn copy_operation(value: &Value, from: &str, to: &str) -> Result<Value, PatchError> {
297 let copied_value = get_value(value, from)?;
298 add_operation(value, to, &copied_value)
299}
300
301/// Test operation - tests that a value at the specified path equals the given value
302fn test_operation(value: &Value, path: &str, test_value: &Value) -> Result<(), PatchError> {

Callers 1

Calls 2

get_valueFunction · 0.85
add_operationFunction · 0.85

Tested by

no test coverage detected