pub trait Dup: Clone {
// Required method
fn dup(&self) -> Self;
}Expand description
Cheap duplication for prime-characteristic ring elements used in hot paths.
Copyscalars and packed fields use a trivial copy- non-
Copyrings (e.g. symbolic expressions) should implement this withClone::clone
It defaults to a trivial copy for types that are both Copy and Clone.
§Usage
It is recommended to rely on the Dup trait in downstream implementations for any type
that is used in hot paths, such as trace cells in constraint evaluation for instance.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.