Skip to main content

copy

Function copy 

Source
pub fn copy(out: &mut CodeValue, src: &CodeValue)
Expand description

Deep-copy src into outout ends up owning its own references to everything src points at, and src is left untouched. This is how a handler passes a value it did not build itself along (e.g. an Echo returning its operand): the copy takes new references, so neither side’s lifetime constrains the other.