pub trait TryCloneIn: Sized {
type Target<A: Allocator + Clone>;
// Required method
fn try_clone_in<A: Allocator + Clone>(
&self,
alloc: A,
) -> Result<Self::Target<A>, AllocError>;
}
Expand description
Explicitly duplicate an object using the specified Allocator.
Required Associated Types§
Required Methods§
Sourcefn try_clone_in<A: Allocator + Clone>(
&self,
alloc: A,
) -> Result<Self::Target<A>, AllocError>
fn try_clone_in<A: Allocator + Clone>( &self, alloc: A, ) -> Result<Self::Target<A>, AllocError>
Attempts to copy the value using alloc
as an underlying Allocator.
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.