Trait TryCloneIn

Source
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§

Source

type Target<A: Allocator + Clone>

Target type, generic over an allocator.

Required Methods§

Source

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.

Implementors§

Source§

impl<OA: Allocator + Clone> TryCloneIn for NgxString<OA>

Source§

impl<T, OA> TryCloneIn for Box<T, OA>
where T: TryCloneIn, OA: Allocator,

Source§

type Target<A: Allocator + Clone> = Box<<T as TryCloneIn>::Target<A>, A>