Trait libc::prelude::Clone

1.0.0 · source ·
pub(crate) trait Clone: Sized {
    // Required method
    fn clone(&self) -> Self;

    // Provided method
    fn clone_from(&mut self, source: &Self) { ... }
}
Expand description

A common trait for the ability to explicitly duplicate an object.

Differs from Copy in that Copy is implicit and an inexpensive bit-wise copy, while Clone is always explicit and may or may not be expensive. In order to enforce these characteristics, Rust does not allow you to reimplement Copy, but you may reimplement Clone and run arbitrary code.

Since Clone is more general than Copy, you can automatically make anything Copy be Clone as well.

§Derivable

This trait can be used with #[derive] if all fields are Clone. The derived implementation of Clone calls clone on each field.

For a generic struct, #[derive] implements Clone conditionally by adding bound Clone on generic parameters.

// `derive` implements Clone for Reading<T> when T is Clone.
#[derive(Clone)]
struct Reading<T> {
    frequency: T,
}

§How can I implement Clone?

Types that are Copy should have a trivial implementation of Clone. More formally: if T: Copy, x: T, and y: &T, then let x = y.clone(); is equivalent to let x = *y;. Manual implementations should be careful to uphold this invariant; however, unsafe code must not rely on it to ensure memory safety.

An example is a generic struct holding a function pointer. In this case, the implementation of Clone cannot be derived, but can be implemented as:

struct Generate<T>(fn() -> T);

impl<T> Copy for Generate<T> {}

impl<T> Clone for Generate<T> {
    fn clone(&self) -> Self {
        *self
    }
}

If we derive:

#[derive(Copy, Clone)]
struct Generate<T>(fn() -> T);

the auto-derived implementations will have unnecessary T: Copy and T: Clone bounds:


// Automatically derived
impl<T: Copy> Copy for Generate<T> { }

// Automatically derived
impl<T: Clone> Clone for Generate<T> {
    fn clone(&self) -> Generate<T> {
        Generate(Clone::clone(&self.0))
    }
}

The bounds are unnecessary because clearly the function itself should be copy- and cloneable even if its return type is not:

#[derive(Copy, Clone)]
struct Generate<T>(fn() -> T);

struct NotCloneable;

fn generate_not_cloneable() -> NotCloneable {
    NotCloneable
}

Generate(generate_not_cloneable).clone(); // error: trait bounds were not satisfied
// Note: With the manual implementations the above line will compile.

§Additional implementors

In addition to the implementors listed below, the following types also implement Clone:

  • Function item types (i.e., the distinct types defined for each function)
  • Function pointer types (e.g., fn() -> i32)
  • Closure types, if they capture no value from the environment or if all such captured values implement Clone themselves. Note that variables captured by shared reference always implement Clone (even if the referent doesn’t), while variables captured by mutable reference never implement Clone.

Required Methods§

1.0.0 · source

fn clone(&self) -> Self

Returns a copy of the value.

§Examples
let hello = "Hello"; // &str implements Clone

assert_eq!("Hello", hello.clone());

Provided Methods§

1.0.0 · source

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source.

a.clone_from(&b) is equivalent to a = b.clone() in functionality, but can be overridden to reuse the resources of a to avoid unnecessary allocations.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Clone for tpacket_versions

1.28.0 · source§

impl Clone for libc::prelude::fmt::Alignment

source§

impl Clone for AsciiChar

1.0.0 · source§

impl Clone for core::cmp::Ordering

1.34.0 · source§

impl Clone for Infallible

1.7.0 · source§

impl Clone for IpAddr

source§

impl Clone for Ipv6MulticastScope

1.0.0 · source§

impl Clone for SocketAddr

1.0.0 · source§

impl Clone for FpCategory

1.55.0 · source§

impl Clone for IntErrorKind

source§

impl Clone for SearchStep

1.0.0 · source§

impl Clone for core::sync::atomic::Ordering

1.0.0 · source§

impl Clone for bool

1.0.0 · source§

impl Clone for char

1.0.0 · source§

impl Clone for f16

1.0.0 · source§

impl Clone for f32

1.0.0 · source§

impl Clone for f64

1.0.0 · source§

impl Clone for f128

1.0.0 · source§

impl Clone for i8

1.0.0 · source§

impl Clone for i16

1.0.0 · source§

impl Clone for i32

1.0.0 · source§

impl Clone for i64

1.0.0 · source§

impl Clone for i128

1.0.0 · source§

impl Clone for isize

source§

impl Clone for !

1.0.0 · source§

impl Clone for u8

1.0.0 · source§

impl Clone for u16

1.0.0 · source§

impl Clone for u32

1.0.0 · source§

impl Clone for u64

1.0.0 · source§

impl Clone for u128

1.0.0 · source§

impl Clone for usize

source§

impl Clone for termios2

source§

impl Clone for msqid_ds

source§

impl Clone for semid_ds

source§

impl Clone for sigset_t

source§

impl Clone for sysinfo

source§

impl Clone for statvfs

source§

impl Clone for _libc_fpstate

source§

impl Clone for _libc_fpxreg

source§

impl Clone for _libc_xmmreg

source§

impl Clone for clone_args

source§

impl Clone for flock64

source§

impl Clone for flock

source§

impl Clone for ipc_perm

source§

impl Clone for max_align_t

source§

impl Clone for mcontext_t

source§

impl Clone for pthread_attr_t

source§

impl Clone for ptrace_rseq_configuration

source§

impl Clone for shmid_ds

source§

impl Clone for sigaction

source§

impl Clone for siginfo_t

source§

impl Clone for stack_t

source§

impl Clone for stat64

source§

impl Clone for stat

source§

impl Clone for statfs64

source§

impl Clone for statfs

source§

impl Clone for statvfs64

source§

impl Clone for ucontext_t

source§

impl Clone for user

source§

impl Clone for user_fpregs_struct

source§

impl Clone for user_regs_struct

source§

impl Clone for Elf32_Chdr

source§

impl Clone for Elf64_Chdr

source§

impl Clone for __c_anonymous_ptrace_syscall_info_entry

source§

impl Clone for __c_anonymous_ptrace_syscall_info_exit

source§

impl Clone for __c_anonymous_ptrace_syscall_info_seccomp

source§

impl Clone for __exit_status

source§

impl Clone for __timeval

source§

impl Clone for aiocb

source§

impl Clone for cmsghdr

source§

impl Clone for fanotify_event_info_error

source§

impl Clone for fanotify_event_info_pidfd

source§

impl Clone for glob64_t

source§

impl Clone for iocb

source§

impl Clone for mallinfo2

source§

impl Clone for mallinfo

source§

impl Clone for msghdr

source§

impl Clone for nl_mmap_hdr

source§

impl Clone for nl_mmap_req

source§

impl Clone for nl_pktinfo

source§

impl Clone for ntptimeval

source§

impl Clone for ptrace_peeksiginfo_args

source§

impl Clone for ptrace_syscall_info

source§

impl Clone for regex_t

source§

impl Clone for rtentry

source§

impl Clone for sem_t

source§

impl Clone for seminfo

source§

impl Clone for sifields_sigchld

source§

impl Clone for sockaddr_xdp

source§

impl Clone for tcp_info

source§

impl Clone for termios

source§

impl Clone for timex

source§

impl Clone for utmpx

source§

impl Clone for xdp_desc

source§

impl Clone for xdp_mmap_offsets

source§

impl Clone for xdp_mmap_offsets_v1

source§

impl Clone for xdp_options

source§

impl Clone for xdp_ring_offset

source§

impl Clone for xdp_ring_offset_v1

source§

impl Clone for xdp_statistics

source§

impl Clone for xdp_statistics_v1

source§

impl Clone for xdp_umem_reg

source§

impl Clone for xdp_umem_reg_v1

source§

impl Clone for Elf32_Ehdr

source§

impl Clone for Elf32_Phdr

source§

impl Clone for Elf32_Shdr

source§

impl Clone for Elf32_Sym

source§

impl Clone for Elf64_Ehdr

source§

impl Clone for Elf64_Phdr

source§

impl Clone for Elf64_Shdr

source§

impl Clone for Elf64_Sym

source§

impl Clone for __c_anonymous__kernel_fsid_t

source§

impl Clone for __c_anonymous_elf32_rel

source§

impl Clone for __c_anonymous_elf32_rela

source§

impl Clone for __c_anonymous_elf64_rel

source§

impl Clone for __c_anonymous_elf64_rela

source§

impl Clone for __c_anonymous_ifru_map

source§

impl Clone for __c_anonymous_sockaddr_can_j1939

source§

impl Clone for __c_anonymous_sockaddr_can_tp

source§

impl Clone for af_alg_iv

source§

impl Clone for arpd_request

source§

impl Clone for can_filter

source§

impl Clone for can_frame

source§

impl Clone for canfd_frame

source§

impl Clone for canxl_frame

source§

impl Clone for cpu_set_t

source§

impl Clone for dirent64

source§

impl Clone for dirent

source§

impl Clone for dl_phdr_info

source§

impl Clone for dqblk

source§

impl Clone for epoll_params

source§

impl Clone for fanotify_event_info_fid

source§

impl Clone for fanotify_event_info_header

source§

impl Clone for fanotify_event_metadata

source§

impl Clone for fanotify_response

source§

impl Clone for fanout_args

source§

impl Clone for ff_condition_effect

source§

impl Clone for ff_constant_effect

source§

impl Clone for ff_effect

source§

impl Clone for ff_envelope

source§

impl Clone for ff_periodic_effect

source§

impl Clone for ff_ramp_effect

source§

impl Clone for ff_replay

source§

impl Clone for ff_rumble_effect

source§

impl Clone for ff_trigger

source§

impl Clone for file_clone_range

source§

impl Clone for fsid_t

source§

impl Clone for genlmsghdr

source§

impl Clone for glob_t

source§

impl Clone for hwtstamp_config

source§

impl Clone for if_nameindex

source§

impl Clone for ifconf

source§

impl Clone for ifreq

source§

impl Clone for in6_ifreq

source§

impl Clone for in6_pktinfo

source§

impl Clone for inotify_event

source§

impl Clone for input_absinfo

source§

impl Clone for input_event

source§

impl Clone for input_id

source§

impl Clone for input_keymap_entry

source§

impl Clone for input_mask

source§

impl Clone for itimerspec

source§

impl Clone for iw_discarded

source§

impl Clone for iw_encode_ext

source§

impl Clone for iw_event

source§

impl Clone for iw_freq

source§

impl Clone for iw_michaelmicfailure

source§

impl Clone for iw_missed

source§

impl Clone for iw_mlme

source§

impl Clone for iw_param

source§

impl Clone for iw_pmkid_cand

source§

impl Clone for iw_pmksa

source§

impl Clone for iw_point

source§

impl Clone for iw_priv_args

source§

impl Clone for iw_quality

source§

impl Clone for iw_range

source§

impl Clone for iw_scan_req

source§

impl Clone for iw_statistics

source§

impl Clone for iw_thrspy

source§

impl Clone for iwreq

source§

impl Clone for j1939_filter

source§

impl Clone for mntent

source§

impl Clone for mount_attr

source§

impl Clone for mq_attr

source§

impl Clone for msginfo

source§

impl Clone for nlattr

source§

impl Clone for nlmsgerr

source§

impl Clone for nlmsghdr

source§

impl Clone for open_how

source§

impl Clone for option

source§

impl Clone for packet_mreq

source§

impl Clone for passwd

source§

impl Clone for posix_spawn_file_actions_t

source§

impl Clone for posix_spawnattr_t

source§

impl Clone for pthread_barrier_t

source§

impl Clone for pthread_barrierattr_t

source§

impl Clone for pthread_cond_t

source§

impl Clone for pthread_condattr_t

source§

impl Clone for pthread_mutex_t

source§

impl Clone for pthread_mutexattr_t

source§

impl Clone for pthread_rwlock_t

source§

impl Clone for pthread_rwlockattr_t

source§

impl Clone for ptp_clock_caps

source§

impl Clone for ptp_clock_time

source§

impl Clone for ptp_extts_event

source§

impl Clone for ptp_extts_request

source§

impl Clone for ptp_perout_request

source§

impl Clone for ptp_pin_desc

source§

impl Clone for ptp_sys_offset

source§

impl Clone for ptp_sys_offset_extended

source§

impl Clone for ptp_sys_offset_precise

source§

impl Clone for regmatch_t

source§

impl Clone for rlimit64

source§

impl Clone for sched_attr

source§

impl Clone for sctp_authinfo

source§

impl Clone for sctp_initmsg

source§

impl Clone for sctp_nxtinfo

source§

impl Clone for sctp_prinfo

source§

impl Clone for sctp_rcvinfo

source§

impl Clone for sctp_sndinfo

source§

impl Clone for sctp_sndrcvinfo

source§

impl Clone for seccomp_data

source§

impl Clone for seccomp_notif

source§

impl Clone for seccomp_notif_addfd

source§

impl Clone for seccomp_notif_resp

source§

impl Clone for seccomp_notif_sizes

source§

impl Clone for sembuf

source§

impl Clone for signalfd_siginfo

source§

impl Clone for sock_extended_err

source§

impl Clone for sock_filter

source§

impl Clone for sock_fprog

source§

impl Clone for sock_txtime

source§

impl Clone for sockaddr_alg

source§

impl Clone for sockaddr_can

source§

impl Clone for sockaddr_nl

source§

impl Clone for sockaddr_pkt

source§

impl Clone for sockaddr_vm

source§

impl Clone for spwd

source§

impl Clone for tls12_crypto_info_aes_gcm_128

source§

impl Clone for tls12_crypto_info_aes_gcm_256

source§

impl Clone for tls12_crypto_info_chacha20_poly1305

source§

impl Clone for tls_crypto_info

source§

impl Clone for tpacket2_hdr

source§

impl Clone for tpacket3_hdr

source§

impl Clone for tpacket_auxdata

source§

impl Clone for tpacket_bd_ts

source§

impl Clone for tpacket_block_desc

source§

impl Clone for tpacket_hdr

source§

impl Clone for tpacket_hdr_v1

source§

impl Clone for tpacket_hdr_variant1

source§

impl Clone for tpacket_req3

source§

impl Clone for tpacket_req

source§

impl Clone for tpacket_rollover_stats

source§

impl Clone for tpacket_stats

source§

impl Clone for tpacket_stats_v3

source§

impl Clone for ucred

source§

impl Clone for uinput_abs_setup

source§

impl Clone for uinput_ff_erase

source§

impl Clone for uinput_ff_upload

source§

impl Clone for uinput_setup

source§

impl Clone for uinput_user_dev

source§

impl Clone for xsk_tx_metadata

source§

impl Clone for xsk_tx_metadata_completion

source§

impl Clone for xsk_tx_metadata_request

source§

impl Clone for Dl_info

source§

impl Clone for addrinfo

source§

impl Clone for arphdr

source§

impl Clone for arpreq

source§

impl Clone for arpreq_old

source§

impl Clone for epoll_event

source§

impl Clone for fd_set

source§

impl Clone for ifaddrs

source§

impl Clone for in6_rtmsg

source§

impl Clone for in_addr

source§

impl Clone for in_pktinfo

source§

impl Clone for ip_mreq

source§

impl Clone for ip_mreq_source

source§

impl Clone for ip_mreqn

source§

impl Clone for lconv

source§

impl Clone for mmsghdr

source§

impl Clone for sched_param

source§

impl Clone for sigevent

source§

impl Clone for sockaddr

source§

impl Clone for sockaddr_in6

source§

impl Clone for sockaddr_in

source§

impl Clone for sockaddr_ll

source§

impl Clone for sockaddr_storage

source§

impl Clone for sockaddr_un

source§

impl Clone for statx

source§

impl Clone for statx_timestamp

source§

impl Clone for tm

source§

impl Clone for utsname

source§

impl Clone for group

source§

impl Clone for hostent

source§

impl Clone for in6_addr

source§

impl Clone for iovec

source§

impl Clone for ipv6_mreq

source§

impl Clone for itimerval

source§

impl Clone for linger

source§

impl Clone for pollfd

source§

impl Clone for protoent

source§

impl Clone for rlimit

source§

impl Clone for rusage

source§

impl Clone for servent

source§

impl Clone for sigval

source§

impl Clone for timespec

source§

impl Clone for timeval

source§

impl Clone for tms

source§

impl Clone for utimbuf

source§

impl Clone for winsize

1.0.0 · source§

impl Clone for Error

1.0.0 · source§

impl Clone for SipHasher

1.28.0 · source§

impl Clone for Layout

1.50.0 · source§

impl Clone for LayoutError

source§

impl Clone for AllocError

1.0.0 · source§

impl Clone for TypeId

1.34.0 · source§

impl Clone for TryFromSliceError

1.0.0 · source§

impl Clone for core::ascii::EscapeDefault

1.34.0 · source§

impl Clone for CharTryFromError

1.20.0 · source§

impl Clone for ParseCharError

1.9.0 · source§

impl Clone for DecodeUtf16Error

1.20.0 · source§

impl Clone for core::char::EscapeDebug

1.0.0 · source§

impl Clone for core::char::EscapeDefault

1.0.0 · source§

impl Clone for core::char::EscapeUnicode

1.0.0 · source§

impl Clone for ToLowercase

1.0.0 · source§

impl Clone for ToUppercase

1.59.0 · source§

impl Clone for TryFromCharError

1.27.0 · source§

impl Clone for CpuidResult

1.27.0 · source§

impl Clone for __m128

source§

impl Clone for __m128bh

1.27.0 · source§

impl Clone for __m128d

source§

impl Clone for __m128h

1.27.0 · source§

impl Clone for __m128i

1.27.0 · source§

impl Clone for __m256

source§

impl Clone for __m256bh

1.27.0 · source§

impl Clone for __m256d

source§

impl Clone for __m256h

1.27.0 · source§

impl Clone for __m256i

1.72.0 · source§

impl Clone for __m512

source§

impl Clone for __m512bh

1.72.0 · source§

impl Clone for __m512d

source§

impl Clone for __m512h

1.72.0 · source§

impl Clone for __m512i

source§

impl Clone for bf16

1.69.0 · source§

impl Clone for FromBytesUntilNulError

1.64.0 · source§

impl Clone for FromBytesWithNulError

1.33.0 · source§

impl Clone for PhantomPinned

1.0.0 · source§

impl Clone for Ipv4Addr

1.0.0 · source§

impl Clone for Ipv6Addr

1.0.0 · source§

impl Clone for AddrParseError

1.0.0 · source§

impl Clone for SocketAddrV4

1.0.0 · source§

impl Clone for SocketAddrV6

1.0.0 · source§

impl Clone for ParseFloatError

1.0.0 · source§

impl Clone for ParseIntError

1.34.0 · source§

impl Clone for TryFromIntError

1.0.0 · source§

impl Clone for RangeFull

source§

impl Clone for core::ptr::alignment::Alignment

1.0.0 · source§

impl Clone for ParseBoolError

1.0.0 · source§

impl Clone for Utf8Error

source§

impl Clone for LocalWaker

1.36.0 · source§

impl Clone for RawWakerVTable

1.36.0 · source§

impl Clone for Waker

1.3.0 · source§

impl Clone for Duration

1.66.0 · source§

impl Clone for TryFromFloatSecsError

source§

impl Clone for Assume

source§

impl Clone for __c_anonymous_ptrace_syscall_info_data

source§

impl Clone for __c_anonymous_ifc_ifcu

source§

impl Clone for __c_anonymous_ifr_ifru

source§

impl Clone for __c_anonymous_iwreq

source§

impl Clone for __c_anonymous_ptp_perout_request_1

source§

impl Clone for __c_anonymous_ptp_perout_request_2

source§

impl Clone for __c_anonymous_sockaddr_can_can_addr

source§

impl Clone for __c_anonymous_xsk_tx_metadata_union

source§

impl Clone for iwreq_data

source§

impl Clone for tpacket_bd_header_u

source§

impl Clone for tpacket_req_u

1.0.0 · source§

impl<'a> Clone for Arguments<'a>

source§

impl<'a> Clone for Source<'a>

source§

impl<'a> Clone for core::ffi::c_str::Bytes<'a>

1.10.0 · source§

impl<'a> Clone for Location<'a>

1.60.0 · source§

impl<'a> Clone for EscapeAscii<'a>

1.0.0 · source§

impl<'a> Clone for core::str::iter::Bytes<'a>

1.0.0 · source§

impl<'a> Clone for CharIndices<'a>

1.0.0 · source§

impl<'a> Clone for Chars<'a>

1.8.0 · source§

impl<'a> Clone for EncodeUtf16<'a>

1.34.0 · source§

impl<'a> Clone for core::str::iter::EscapeDebug<'a>

1.34.0 · source§

impl<'a> Clone for core::str::iter::EscapeDefault<'a>

1.34.0 · source§

impl<'a> Clone for core::str::iter::EscapeUnicode<'a>

1.0.0 · source§

impl<'a> Clone for Lines<'a>

1.0.0 · source§

impl<'a> Clone for LinesAny<'a>

1.34.0 · source§

impl<'a> Clone for SplitAsciiWhitespace<'a>

1.1.0 · source§

impl<'a> Clone for SplitWhitespace<'a>

1.79.0 · source§

impl<'a> Clone for Utf8Chunk<'a>

1.79.0 · source§

impl<'a> Clone for Utf8Chunks<'a>

source§

impl<'a> Clone for CharSearcher<'a>

source§

impl<'a, 'b> Clone for CharSliceSearcher<'a, 'b>

source§

impl<'a, 'b> Clone for StrSearcher<'a, 'b>

source§

impl<'a, 'b, const N: usize> Clone for CharArrayRefSearcher<'a, 'b, N>

source§

impl<'a, F> Clone for CharPredicateSearcher<'a, F>
where F: Clone + FnMut(char) -> bool,

1.5.0 · source§

impl<'a, P> Clone for MatchIndices<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.2.0 · source§

impl<'a, P> Clone for Matches<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.5.0 · source§

impl<'a, P> Clone for RMatchIndices<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.2.0 · source§

impl<'a, P> Clone for RMatches<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.0.0 · source§

impl<'a, P> Clone for core::str::iter::RSplit<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.0.0 · source§

impl<'a, P> Clone for RSplitN<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.0.0 · source§

impl<'a, P> Clone for RSplitTerminator<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.0.0 · source§

impl<'a, P> Clone for core::str::iter::Split<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.51.0 · source§

impl<'a, P> Clone for core::str::iter::SplitInclusive<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.0.0 · source§

impl<'a, P> Clone for SplitN<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.0.0 · source§

impl<'a, P> Clone for SplitTerminator<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: Clone,

1.31.0 · source§

impl<'a, T> Clone for RChunksExact<'a, T>

source§

impl<'a, T, const N: usize> Clone for ArrayWindows<'a, T, N>
where T: Clone + 'a,

source§

impl<'a, const N: usize> Clone for CharArraySearcher<'a, N>

source§

impl<'f> Clone for VaListImpl<'f>

1.0.0 · source§

impl<A> Clone for core::option::IntoIter<A>
where A: Clone,

1.0.0 · source§

impl<A> Clone for core::option::Iter<'_, A>

source§

impl<A> Clone for IterRange<A>
where A: Clone,

source§

impl<A> Clone for IterRangeFrom<A>
where A: Clone,

source§

impl<A> Clone for IterRangeInclusive<A>
where A: Clone,

1.0.0 · source§

impl<A> Clone for Repeat<A>
where A: Clone,

1.82.0 · source§

impl<A> Clone for RepeatN<A>
where A: Clone,

1.0.0 · source§

impl<A, B> Clone for Chain<A, B>
where A: Clone, B: Clone,

1.0.0 · source§

impl<A, B> Clone for Zip<A, B>
where A: Clone, B: Clone,

1.55.0 · source§

impl<B, C> Clone for ControlFlow<B, C>
where B: Clone, C: Clone,

source§

impl<Dyn> Clone for DynMetadata<Dyn>
where Dyn: ?Sized,

1.34.0 · source§

impl<F> Clone for FromFn<F>
where F: Clone,

1.43.0 · source§

impl<F> Clone for OnceWith<F>
where F: Clone,

1.28.0 · source§

impl<F> Clone for RepeatWith<F>
where F: Clone,

1.7.0 · source§

impl<H> Clone for BuildHasherDefault<H>

source§

impl<I> Clone for FromIter<I>
where I: Clone,

1.9.0 · source§

impl<I> Clone for DecodeUtf16<I>
where I: Clone + Iterator<Item = u16>,

1.1.0 · source§

impl<I> Clone for Cloned<I>
where I: Clone,

1.36.0 · source§

impl<I> Clone for Copied<I>
where I: Clone,

1.0.0 · source§

impl<I> Clone for Cycle<I>
where I: Clone,

1.0.0 · source§

impl<I> Clone for Enumerate<I>
where I: Clone,

1.0.0 · source§

impl<I> Clone for Fuse<I>
where I: Clone,

source§

impl<I> Clone for Intersperse<I>
where I: Clone + Iterator, <I as Iterator>::Item: Clone,

1.0.0 · source§

impl<I> Clone for Peekable<I>
where I: Clone + Iterator, <I as Iterator>::Item: Clone,

1.0.0 · source§

impl<I> Clone for Skip<I>
where I: Clone,

1.28.0 · source§

impl<I> Clone for StepBy<I>
where I: Clone,

1.0.0 · source§

impl<I> Clone for Take<I>
where I: Clone,

1.0.0 · source§

impl<I, F> Clone for FilterMap<I, F>
where I: Clone, F: Clone,

1.0.0 · source§

impl<I, F> Clone for Inspect<I, F>
where I: Clone, F: Clone,

1.0.0 · source§

impl<I, F> Clone for Map<I, F>
where I: Clone, F: Clone,

source§

impl<I, F, const N: usize> Clone for MapWindows<I, F, N>
where I: Iterator + Clone, F: Clone, <I as Iterator>::Item: Clone,

source§

impl<I, G> Clone for IntersperseWith<I, G>
where I: Iterator + Clone, <I as Iterator>::Item: Clone, G: Clone,

1.0.0 · source§

impl<I, P> Clone for Filter<I, P>
where I: Clone, P: Clone,

1.57.0 · source§

impl<I, P> Clone for MapWhile<I, P>
where I: Clone, P: Clone,

1.0.0 · source§

impl<I, P> Clone for SkipWhile<I, P>
where I: Clone, P: Clone,

1.0.0 · source§

impl<I, P> Clone for TakeWhile<I, P>
where I: Clone, P: Clone,

1.0.0 · source§

impl<I, St, F> Clone for Scan<I, St, F>
where I: Clone, St: Clone, F: Clone,

1.29.0 · source§

impl<I, U> Clone for Flatten<I>
where I: Clone + Iterator, <I as Iterator>::Item: IntoIterator<IntoIter = U, Item = <U as Iterator>::Item>, U: Clone + Iterator,

1.0.0 · source§

impl<I, U, F> Clone for FlatMap<I, U, F>
where I: Clone, F: Clone, U: Clone + IntoIterator, <U as IntoIterator>::IntoIter: Clone,

source§

impl<I, const N: usize> Clone for libc::prelude::iter::ArrayChunks<I, N>
where I: Clone + Iterator, <I as Iterator>::Item: Clone,

1.0.0 · source§

impl<Idx> Clone for core::ops::range::Range<Idx>
where Idx: Clone,

1.0.0 · source§

impl<Idx> Clone for core::ops::range::RangeFrom<Idx>
where Idx: Clone,

1.26.0 · source§

impl<Idx> Clone for core::ops::range::RangeInclusive<Idx>
where Idx: Clone,

1.0.0 · source§

impl<Idx> Clone for RangeTo<Idx>
where Idx: Clone,

1.26.0 · source§

impl<Idx> Clone for RangeToInclusive<Idx>
where Idx: Clone,

source§

impl<Idx> Clone for core::range::Range<Idx>
where Idx: Clone,

source§

impl<Idx> Clone for core::range::RangeFrom<Idx>
where Idx: Clone,

source§

impl<Idx> Clone for core::range::RangeInclusive<Idx>
where Idx: Clone,

1.33.0 · source§

impl<Ptr> Clone for Pin<Ptr>
where Ptr: Clone,

1.0.0 · source§

impl<T> !Clone for &mut T
where T: ?Sized,

Shared references can be cloned, but mutable references cannot!

1.0.0 · source§

impl<T> Clone for Option<T>
where T: Clone,

1.17.0 · source§

impl<T> Clone for Bound<T>
where T: Clone,

1.36.0 · source§

impl<T> Clone for Poll<T>
where T: Clone,

1.0.0 · source§

impl<T> Clone for *const T
where T: ?Sized,

1.0.0 · source§

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

1.0.0 · source§

impl<T> Clone for &T
where T: ?Sized,

Shared references can be cloned, but mutable references cannot!

1.70.0 · source§

impl<T> Clone for OnceCell<T>
where T: Clone,

1.0.0 · source§

impl<T> Clone for Cell<T>
where T: Copy,

1.0.0 · source§

impl<T> Clone for RefCell<T>
where T: Clone,

1.19.0 · source§

impl<T> Clone for Reverse<T>
where T: Clone,

1.48.0 · source§

impl<T> Clone for Pending<T>

1.48.0 · source§

impl<T> Clone for Ready<T>
where T: Clone,

1.0.0 · source§

impl<T> Clone for PhantomData<T>
where T: ?Sized,

1.28.0 · source§

impl<T> Clone for NonZero<T>

1.74.0 · source§

impl<T> Clone for Saturating<T>
where T: Clone,

1.0.0 · source§

impl<T> Clone for Wrapping<T>
where T: Clone,

1.25.0 · source§

impl<T> Clone for NonNull<T>
where T: ?Sized,

1.0.0 · source§

impl<T> Clone for core::result::IntoIter<T>
where T: Clone,

1.0.0 · source§

impl<T> Clone for core::result::Iter<'_, T>

1.0.0 · source§

impl<T> Clone for Chunks<'_, T>

1.31.0 · source§

impl<T> Clone for ChunksExact<'_, T>

1.0.0 · source§

impl<T> Clone for core::slice::iter::Iter<'_, T>

1.31.0 · source§

impl<T> Clone for RChunks<'_, T>

1.0.0 · source§

impl<T> Clone for Windows<'_, T>

1.2.0 · source§

impl<T> Clone for Empty<T>

1.2.0 · source§

impl<T> Clone for Once<T>
where T: Clone,

1.0.0 · source§

impl<T> Clone for Rev<T>
where T: Clone,

1.21.0 · source§

impl<T> Clone for Discriminant<T>

1.20.0 · source§

impl<T> Clone for ManuallyDrop<T>
where T: Clone + ?Sized,

1.36.0 · source§

impl<T> Clone for MaybeUninit<T>
where T: Copy,

1.0.0 · source§

impl<T, E> Clone for Result<T, E>
where T: Clone, E: Clone,

1.34.0 · source§

impl<T, F> Clone for Successors<T, F>
where T: Clone, F: Clone,

1.27.0 · source§

impl<T, P> Clone for core::slice::iter::RSplit<'_, T, P>
where P: Clone + FnMut(&T) -> bool,

1.0.0 · source§

impl<T, P> Clone for core::slice::iter::Split<'_, T, P>
where P: Clone + FnMut(&T) -> bool,

1.51.0 · source§

impl<T, P> Clone for core::slice::iter::SplitInclusive<'_, T, P>
where P: Clone + FnMut(&T) -> bool,

1.58.0 · source§

impl<T, const N: usize> Clone for [T; N]
where T: Clone,

1.40.0 · source§

impl<T, const N: usize> Clone for core::array::iter::IntoIter<T, N>
where T: Clone,

source§

impl<T, const N: usize> Clone for Mask<T, N>

source§

impl<T, const N: usize> Clone for Simd<T, N>

source§

impl<T, const N: usize> Clone for core::slice::iter::ArrayChunks<'_, T, N>

source§

impl<Y, R> Clone for CoroutineState<Y, R>
where Y: Clone, R: Clone,