Skip to main content

RawClone

Trait RawClone 

Source
pub unsafe trait RawClone { }
Expand description

Returns a raw pointer to the cloned data. This will leak the memory of the underlying pointer. This trait is implemented for all types that implement clone so you can pass this trait to the object constructor. This way the given object can be cloned with TryClone.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Clone> RawClone for T

A trait that tries cloning an object and returns an option with the variant depending on the result. For a multitrait object to be clonable it needs to have the RawClone trait registered.