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
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn try_clone_from(&mut self, source: &Self) -> Result<(), Self::Error>
fn try_clone_from(&mut self, source: &Self) -> Result<(), Self::Error>
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§
Source§impl TryClone for PipeReader
Available on crate feature std only.
impl TryClone for PipeReader
Available on crate feature
std only.Source§impl TryClone for PipeWriter
Available on crate feature std only.
impl TryClone for PipeWriter
Available on crate feature
std only.Source§impl TryClone for TcpListener
Available on crate feature std only.
impl TryClone for TcpListener
Available on crate feature
std only.Source§impl TryClone for OwnedFd
Available on crate feature std and Unix and neither WebAssembly nor HermitCore nor target_os=trusty nor target_os=motor only.
impl TryClone for OwnedFd
Available on crate feature
std and Unix and neither WebAssembly nor HermitCore nor target_os=trusty nor target_os=motor only.Source§impl TryClone for UnixDatagram
Available on crate feature std and Unix only.
impl TryClone for UnixDatagram
Available on crate feature
std and Unix only.Source§impl TryClone for UnixListener
Available on crate feature std and Unix only.
impl TryClone for UnixListener
Available on crate feature
std and Unix only.Source§impl TryClone for UnixStream
Available on crate feature std and Unix only.
impl TryClone for UnixStream
Available on crate feature
std and Unix only.Source§impl<T: Clone + Ord, A: Allocator + Clone> TryClone for BinaryHeap<T, A>
Available on crate features alloc and nightly only.
impl<T: Clone + Ord, A: Allocator + Clone> TryClone for BinaryHeap<T, A>
Available on crate features
alloc and nightly only.Source§impl<T: Clone, A: Allocator + Clone> TryClone for VecDeque<T, A>
Available on crate features alloc and nightly only.
impl<T: Clone, A: Allocator + Clone> TryClone for VecDeque<T, A>
Available on crate features
alloc and nightly only.Source§impl<T: Clone, A: Allocator + Clone> TryClone for Rc<T, A>
Available on crate features alloc and nightly only.
impl<T: Clone, A: Allocator + Clone> TryClone for Rc<T, A>
Available on crate features
alloc and nightly only.Source§impl<T: Clone, A: Allocator + Clone> TryClone for Arc<T, A>
Available on crate features alloc and nightly only.
impl<T: Clone, A: Allocator + Clone> TryClone for Arc<T, A>
Available on crate features
alloc and nightly only.Source§impl<T: Clone, A: Allocator + Clone> TryClone for Vec<T, A>
Available on crate features alloc and nightly only.
impl<T: Clone, A: Allocator + Clone> TryClone for Vec<T, A>
Available on crate features
alloc and nightly only.