pub trait WithClone: Sized {
type Cloned;
// Required method
fn with_clone<R>(&self, with: impl FnOnce(Self::Cloned) -> R) -> R;
}
Expand description
Invokes a function with a clone of self
.
Required Associated Types§
Required Methods§
Sourcefn with_clone<R>(&self, with: impl FnOnce(Self::Cloned) -> R) -> R
fn with_clone<R>(&self, with: impl FnOnce(Self::Cloned) -> R) -> R
Maps with
with the results of cloning self
.
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.