alloc_checked::try_clone

Trait TryClone

source
pub trait TryClone: Sized {
    type Error;

    // Required method
    fn try_clone(&self) -> Result<Self, Self::Error>;

    // Provided method
    fn try_clone_from(&mut self, source: &Self) -> Result<(), Self::Error> { ... }
}
Expand description

A variant of the Clone trait which can fail.

Required Associated Types§

Required Methods§

source

fn try_clone(&self) -> Result<Self, Self::Error>

Provided Methods§

source

fn try_clone_from(&mut self, source: &Self) -> Result<(), Self::Error>

Object Safety§

This trait is not object safe.

Implementors§