Skip to main content

TryClone

Trait TryClone 

pub trait TryClone: Sized {
    // Required method
    fn try_clone(&self) -> Result<Self, OutOfMemory>;
}
Expand description

A trait for values that can be cloned, but contain owned, heap-allocated values whose allocations may fail during cloning.

Required Methods§

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

Attempt to clone self, returning an error if any allocation fails during cloning.

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.

Implementations on Foreign Types§

§

impl TryClone for bool

§

impl TryClone for char

§

impl TryClone for f32

§

impl TryClone for f64

§

impl TryClone for i8

§

impl TryClone for i16

§

impl TryClone for i32

§

impl TryClone for i64

§

impl TryClone for i128

§

impl TryClone for isize

§

impl TryClone for u8

§

impl TryClone for u16

§

impl TryClone for u32

§

impl TryClone for u64

§

impl TryClone for u128

§

impl TryClone for ()

§

impl TryClone for usize

§

impl<'a, T> TryClone for &'a T
where T: ?Sized,

§

impl<A> TryClone for (A,)
where A: TryClone,

§

impl<A, B> TryClone for (A, B)
where A: TryClone, B: TryClone,

§

impl<A, B, C> TryClone for (A, B, C)
where A: TryClone, B: TryClone, C: TryClone,

§

impl<A, B, C, D> TryClone for (A, B, C, D)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone,

§

impl<A, B, C, D, E> TryClone for (A, B, C, D, E)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone,

§

impl<A, B, C, D, E, F> TryClone for (A, B, C, D, E, F)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone,

§

impl<A, B, C, D, E, F, G> TryClone for (A, B, C, D, E, F, G)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone,

§

impl<A, B, C, D, E, F, G, H> TryClone for (A, B, C, D, E, F, G, H)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone,

§

impl<A, B, C, D, E, F, G, H, I> TryClone for (A, B, C, D, E, F, G, H, I)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone, I: TryClone,

§

impl<A, B, C, D, E, F, G, H, I, J> TryClone for (A, B, C, D, E, F, G, H, I, J)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone, I: TryClone, J: TryClone,

§

impl<T> TryClone for *mut T
where T: ?Sized,

Implementors§