pub trait CloneWithNode {
// Required methods
fn clone_with_node(&mut self) -> Self;
fn clone_without_node(&self) -> Self;
}
Expand description
Used for distinction between cloning an expression AND taking its node and cloning an expression WITHOUT taking its node.
Required Methods§
Sourcefn clone_with_node(&mut self) -> Self
fn clone_with_node(&mut self) -> Self
Clone self
and take its node.
Sourcefn clone_without_node(&self) -> Self
fn clone_without_node(&self) -> Self
Clone self
without taking its node.
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.