1/// A trait for types that can be cloned with a result.
2pub trait TryClone: Sized {
3type Error: core::fmt::Debug;
45/// Tries to clone the type.
6 ///
7 /// # Errors
8 ///
9 /// Returns the error if the clone fails for whatever reason.
10fn try_clone(&self) -> Result<Self, Self::Error>;
11}