pub 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 derive
d
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 derive
d, 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 implementClone
(even if the referent doesn’t), while variables captured by mutable reference never implementClone
.
Required Methods§
Provided Methods§
1.0.0 · Sourcefn clone_from(&mut self, source: &Self)
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.
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.
Implementors§
impl Clone for BuildPattern
impl Clone for Case
impl Clone for shadow_rs::fmt::Alignment
impl Clone for DebugAsHex
impl Clone for Sign
impl Clone for TryReserveErrorKind
impl Clone for AsciiChar
impl Clone for core::cmp::Ordering
impl Clone for Infallible
impl Clone for FromBytesWithNulError
impl Clone for IpAddr
impl Clone for Ipv6MulticastScope
impl Clone for core::net::socket_addr::SocketAddr
impl Clone for FpCategory
impl Clone for IntErrorKind
impl Clone for GetDisjointMutError
impl Clone for SearchStep
impl Clone for core::sync::atomic::Ordering
impl Clone for VarError
impl Clone for SeekFrom
impl Clone for ErrorKind
impl Clone for Shutdown
impl Clone for BacktraceStyle
impl Clone for RecvTimeoutError
impl Clone for TryRecvError
impl Clone for Cfg
impl Clone for CfgExpr
impl Clone for Platform
impl Clone for DependencyKind
impl Clone for Applicability
impl Clone for DiagnosticLevel
impl Clone for CargoOpt
impl Clone for CrateType
impl Clone for Edition
impl Clone for TargetKind
impl Clone for ArtifactDebuginfo
impl Clone for Message
impl Clone for ApplyLocation
impl Clone for CloneLocal
impl Clone for SshHostKeyType
impl Clone for DiffBinaryKind
impl Clone for DiffLineType
impl Clone for AutotagOption
impl Clone for BranchType
impl Clone for ConfigLevel
impl Clone for Delta
impl Clone for DiffFormat
impl Clone for git2::Direction
impl Clone for ErrorClass
impl Clone for ErrorCode
impl Clone for FetchPrune
impl Clone for FileFavor
impl Clone for FileMode
impl Clone for ObjectType
impl Clone for ReferenceType
impl Clone for RepositoryState
impl Clone for ResetType
impl Clone for StashApplyProgress
impl Clone for SubmoduleIgnore
impl Clone for SubmoduleUpdate
impl Clone for PackBuilderStage
impl Clone for StatusShow
impl Clone for TraceLevel
impl Clone for Service
impl Clone for TreeWalkMode
impl Clone for TrieResult
impl Clone for TrieType
impl Clone for icu_collections::codepointtrie::error::Error
impl Clone for ExtensionType
impl Clone for ParserError
impl Clone for icu_locid_transform::directionality::Direction
impl Clone for LocaleTransformError
impl Clone for PropertiesError
impl Clone for GeneralCategory
impl Clone for CheckedBidiPairedBracketType
impl Clone for BufferFormat
impl Clone for DataErrorKind
impl Clone for LocaleFallbackPriority
impl Clone for LocaleFallbackSupplement
impl Clone for DnsLength
impl Clone for ErrorPolicy
impl Clone for Hyphens
impl Clone for ProcessingError
impl Clone for ProcessingSuccess
impl Clone for tpacket_versions
impl Clone for Level
impl Clone for LevelFilter
impl Clone for PrefilterConfig
impl Clone for Op
impl Clone for Category
impl Clone for serde_json::value::Value
impl Clone for InvalidFormatDescription
impl Clone for time::error::parse::Parse
impl Clone for ParseFromDescription
impl Clone for TryFromParsed
impl Clone for time::format_description::component::Component
impl Clone for MonthRepr
impl Clone for Padding
impl Clone for SubsecondDigits
impl Clone for UnixTimestampPrecision
impl Clone for WeekNumberRepr
impl Clone for WeekdayRepr
impl Clone for YearRepr
impl Clone for OwnedFormatItem
impl Clone for DateKind
impl Clone for FormattedComponents
impl Clone for OffsetPrecision
impl Clone for TimePrecision
impl Clone for time::month::Month
impl Clone for time::weekday::Weekday
impl Clone for FoundDateTimeKind
impl Clone for RuleDay
impl Clone for TransitionRule
impl Clone for Origin
impl Clone for ParseError
impl Clone for SyntaxViolation
impl Clone for Position
impl Clone for ZeroVecError
impl Clone for bool
impl Clone for char
impl Clone for f16
impl Clone for f32
impl Clone for f64
impl Clone for f128
impl Clone for i8
impl Clone for i16
impl Clone for i32
impl Clone for i64
impl Clone for i128
impl Clone for isize
impl Clone for !
impl Clone for u8
impl Clone for u16
impl Clone for u32
impl Clone for u64
impl Clone for u128
impl Clone for usize
impl Clone for shadow_rs::fmt::Error
impl Clone for FormattingOptions
impl Clone for SplicedStr
impl Clone for Global
impl Clone for ByteString
impl Clone for UnorderedKeyError
impl Clone for TryReserveError
impl Clone for CString
impl Clone for FromVecWithNulError
impl Clone for IntoStringError
impl Clone for NulError
impl Clone for FromUtf8Error
impl Clone for IntoChars
impl Clone for Layout
impl Clone for LayoutError
impl Clone for AllocError
impl Clone for TypeId
impl Clone for TryFromSliceError
impl Clone for core::ascii::EscapeDefault
impl Clone for CharTryFromError
impl Clone for ParseCharError
impl Clone for DecodeUtf16Error
impl Clone for core::char::EscapeDebug
impl Clone for core::char::EscapeDefault
impl Clone for core::char::EscapeUnicode
impl Clone for ToLowercase
impl Clone for ToUppercase
impl Clone for TryFromCharError
impl Clone for CpuidResult
impl Clone for __m128
impl Clone for __m128bh
impl Clone for __m128d
impl Clone for __m128h
impl Clone for __m128i
impl Clone for __m256
impl Clone for __m256bh
impl Clone for __m256d
impl Clone for __m256h
impl Clone for __m256i
impl Clone for __m512
impl Clone for __m512bh
impl Clone for __m512d
impl Clone for __m512h
impl Clone for __m512i
impl Clone for bf16
impl Clone for FromBytesUntilNulError
impl Clone for SipHasher
impl Clone for PhantomPinned
impl Clone for Assume
impl Clone for Ipv4Addr
impl Clone for Ipv6Addr
impl Clone for AddrParseError
impl Clone for SocketAddrV4
impl Clone for SocketAddrV6
impl Clone for ParseFloatError
impl Clone for core::num::error::ParseIntError
impl Clone for core::num::error::TryFromIntError
impl Clone for RangeFull
impl Clone for core::ptr::alignment::Alignment
impl Clone for ParseBoolError
impl Clone for Utf8Error
impl Clone for LocalWaker
impl Clone for RawWakerVTable
impl Clone for Waker
impl Clone for core::time::Duration
impl Clone for TryFromFloatSecsError
impl Clone for System
impl Clone for OsString
impl Clone for FileTimes
impl Clone for FileType
impl Clone for std::fs::Metadata
impl Clone for OpenOptions
impl Clone for Permissions
impl Clone for DefaultHasher
impl Clone for RandomState
impl Clone for std::io::util::Empty
impl Clone for Sink
impl Clone for std::os::linux::raw::arch::stat
impl Clone for std::os::unix::net::addr::SocketAddr
impl Clone for SocketCred
impl Clone for UCred
impl Clone for PathBuf
impl Clone for StripPrefixError
impl Clone for ExitCode
impl Clone for ExitStatus
impl Clone for ExitStatusError
impl Clone for Output
impl Clone for DefaultRandomSource
impl Clone for RecvError
impl Clone for WaitTimeoutResult
impl Clone for AccessError
impl Clone for Thread
impl Clone for ThreadId
impl Clone for Instant
impl Clone for SystemTime
impl Clone for SystemTimeError
impl Clone for FromPathBufError
impl Clone for FromPathError
impl Clone for Utf8PathBuf
impl Clone for Dependency
impl Clone for Diagnostic
impl Clone for DiagnosticCode
impl Clone for DiagnosticSpan
impl Clone for DiagnosticSpanLine
impl Clone for DiagnosticSpanMacroExpansion
impl Clone for Artifact
impl Clone for ArtifactProfile
impl Clone for BuildFinished
impl Clone for BuildScript
impl Clone for CompilerMessage
impl Clone for DepKindInfo
impl Clone for cargo_metadata::Metadata
impl Clone for MetadataCommand
impl Clone for Node
impl Clone for NodeDep
impl Clone for Package
impl Clone for PackageId
impl Clone for Resolve
impl Clone for cargo_metadata::Source
impl Clone for Target
impl Clone for WorkspaceDefaultMembers
impl Clone for deranged::ParseIntError
impl Clone for deranged::TryFromIntError
impl Clone for Oid
impl Clone for Signature<'static>
impl Clone for AttrCheckFlags
impl Clone for CheckoutNotificationType
impl Clone for CredentialType
impl Clone for DiffFlags
impl Clone for DiffStatsFormat
impl Clone for IndexAddOption
impl Clone for IndexEntryExtendedFlag
impl Clone for IndexEntryFlag
impl Clone for MergeAnalysis
impl Clone for MergePreference
impl Clone for OdbLookupFlags
impl Clone for PathspecFlags
impl Clone for ReferenceFormat
impl Clone for RemoteUpdateFlags
impl Clone for RepositoryInitMode
impl Clone for RepositoryOpenFlags
impl Clone for RevparseMode
impl Clone for Sort
impl Clone for StashApplyFlags
impl Clone for StashFlags
impl Clone for Status
impl Clone for SubmoduleStatus
impl Clone for IndexTime
impl Clone for git2::time::Time
impl Clone for CodePointTrieHeader
impl Clone for Other
impl Clone for icu_locid::extensions::other::subtag::Subtag
impl Clone for icu_locid::extensions::private::other::Subtag
impl Clone for Private
impl Clone for Extensions
impl Clone for Fields
impl Clone for icu_locid::extensions::transform::key::Key
impl Clone for Transform
impl Clone for icu_locid::extensions::transform::value::Value
impl Clone for Attribute
impl Clone for Attributes
impl Clone for icu_locid::extensions::unicode::key::Key
impl Clone for Keywords
impl Clone for Unicode
impl Clone for icu_locid::extensions::unicode::value::Value
impl Clone for LanguageIdentifier
impl Clone for Locale
impl Clone for Language
impl Clone for Region
impl Clone for icu_locid::subtags::script::Script
impl Clone for Variant
impl Clone for Variants
impl Clone for LocaleExpander
impl Clone for icu_properties::props::BidiClass
impl Clone for CanonicalCombiningClass
impl Clone for EastAsianWidth
impl Clone for GeneralCategoryGroup
impl Clone for GraphemeClusterBreak
impl Clone for HangulSyllableType
impl Clone for IndicSyllabicCategory
impl Clone for icu_properties::props::JoiningType
impl Clone for LineBreak
impl Clone for icu_properties::props::Script
impl Clone for SentenceBreak
impl Clone for WordBreak
impl Clone for CheckedBidiPairedBracketTypeULE
impl Clone for MirroredPairedBracketDataTryFromError
impl Clone for AnyPayload
impl Clone for DataError
impl Clone for LocaleFallbackConfig
impl Clone for DataKey
impl Clone for DataKeyHash
impl Clone for DataKeyMetadata
impl Clone for DataKeyPath
impl Clone for DataLocale
impl Clone for DataRequestMetadata
impl Clone for Cart
impl Clone for DataResponseMetadata
impl Clone for Config
impl Clone for AsciiDenyList
impl Clone for idna_adapter::BidiClass
impl Clone for BidiClassMask
impl Clone for idna_adapter::JoiningType
impl Clone for JoiningTypeMask
impl Clone for itoa::Buffer
impl Clone for termios2
impl Clone for pthread_attr_t
impl Clone for semid_ds
impl Clone for sigset_t
impl Clone for libc::unix::linux_like::linux::gnu::b32::stat
impl Clone for statvfs
impl Clone for sysinfo
impl Clone for _libc_fpreg
impl Clone for _libc_fpstate
impl Clone for flock64
impl Clone for flock
impl Clone for ipc_perm
impl Clone for max_align_t
impl Clone for mcontext_t
impl Clone for msqid_ds
impl Clone for shmid_ds
impl Clone for sigaction
impl Clone for siginfo_t
impl Clone for stack_t
impl Clone for stat64
impl Clone for statfs64
impl Clone for statfs
impl Clone for statvfs64
impl Clone for ucontext_t
impl Clone for user
impl Clone for user_fpregs_struct
impl Clone for user_fpxregs_struct
impl Clone for user_regs_struct
impl Clone for Elf32_Chdr
impl Clone for Elf64_Chdr
impl Clone for __c_anonymous_ptrace_syscall_info_entry
impl Clone for __c_anonymous_ptrace_syscall_info_exit
impl Clone for __c_anonymous_ptrace_syscall_info_seccomp
impl Clone for __exit_status
impl Clone for __timeval
impl Clone for aiocb
impl Clone for cmsghdr
impl Clone for fanotify_event_info_error
impl Clone for fanotify_event_info_pidfd
impl Clone for glob64_t
impl Clone for iocb
impl Clone for mallinfo2
impl Clone for mallinfo
impl Clone for msghdr
impl Clone for nl_mmap_hdr
impl Clone for nl_mmap_req
impl Clone for nl_pktinfo
impl Clone for ntptimeval
impl Clone for ptrace_peeksiginfo_args
impl Clone for ptrace_syscall_info
impl Clone for regex_t
impl Clone for rtentry
impl Clone for sem_t
impl Clone for seminfo
impl Clone for sockaddr_xdp
impl Clone for tcp_info
impl Clone for termios
impl Clone for timex
impl Clone for utmpx
impl Clone for xdp_desc
impl Clone for xdp_mmap_offsets
impl Clone for xdp_mmap_offsets_v1
impl Clone for xdp_options
impl Clone for xdp_ring_offset
impl Clone for xdp_ring_offset_v1
impl Clone for xdp_statistics
impl Clone for xdp_statistics_v1
impl Clone for xdp_umem_reg
impl Clone for xdp_umem_reg_v1
impl Clone for Elf32_Ehdr
impl Clone for Elf32_Phdr
impl Clone for Elf32_Shdr
impl Clone for Elf32_Sym
impl Clone for Elf64_Ehdr
impl Clone for Elf64_Phdr
impl Clone for Elf64_Shdr
impl Clone for Elf64_Sym
impl Clone for __c_anonymous__kernel_fsid_t
impl Clone for __c_anonymous_elf32_rel
impl Clone for __c_anonymous_elf32_rela
impl Clone for __c_anonymous_elf64_rel
impl Clone for __c_anonymous_elf64_rela
impl Clone for __c_anonymous_ifru_map
impl Clone for __c_anonymous_sockaddr_can_j1939
impl Clone for __c_anonymous_sockaddr_can_tp
impl Clone for af_alg_iv
impl Clone for arpd_request
impl Clone for can_filter
impl Clone for can_frame
impl Clone for canfd_frame
impl Clone for canxl_frame
impl Clone for cpu_set_t
impl Clone for dirent64
impl Clone for dirent
impl Clone for dl_phdr_info
impl Clone for dqblk
impl Clone for epoll_params
impl Clone for fanotify_event_info_fid
impl Clone for fanotify_event_info_header
impl Clone for fanotify_event_metadata
impl Clone for fanotify_response
impl Clone for fanout_args
impl Clone for ff_condition_effect
impl Clone for ff_constant_effect
impl Clone for ff_effect
impl Clone for ff_envelope
impl Clone for ff_periodic_effect
impl Clone for ff_ramp_effect
impl Clone for ff_replay
impl Clone for ff_rumble_effect
impl Clone for ff_trigger
impl Clone for file_clone_range
impl Clone for fsid_t
impl Clone for genlmsghdr
impl Clone for glob_t
impl Clone for hwtstamp_config
impl Clone for if_nameindex
impl Clone for ifconf
impl Clone for ifreq
impl Clone for in6_ifreq
impl Clone for in6_pktinfo
impl Clone for inotify_event
impl Clone for input_absinfo
impl Clone for input_event
impl Clone for input_id
impl Clone for input_keymap_entry
impl Clone for input_mask
impl Clone for itimerspec
impl Clone for iw_discarded
impl Clone for iw_encode_ext
impl Clone for iw_event
impl Clone for iw_freq
impl Clone for iw_michaelmicfailure
impl Clone for iw_missed
impl Clone for iw_mlme
impl Clone for iw_param
impl Clone for iw_pmkid_cand
impl Clone for iw_pmksa
impl Clone for iw_point
impl Clone for iw_priv_args
impl Clone for iw_quality
impl Clone for iw_range
impl Clone for iw_scan_req
impl Clone for iw_statistics
impl Clone for iw_thrspy
impl Clone for iwreq
impl Clone for j1939_filter
impl Clone for mntent
impl Clone for mount_attr
impl Clone for mq_attr
impl Clone for msginfo
impl Clone for nlattr
impl Clone for nlmsgerr
impl Clone for nlmsghdr
impl Clone for open_how
impl Clone for option
impl Clone for packet_mreq
impl Clone for passwd
impl Clone for posix_spawn_file_actions_t
impl Clone for posix_spawnattr_t
impl Clone for pthread_barrier_t
impl Clone for pthread_barrierattr_t
impl Clone for pthread_cond_t
impl Clone for pthread_condattr_t
impl Clone for pthread_mutex_t
impl Clone for pthread_mutexattr_t
impl Clone for pthread_rwlock_t
impl Clone for pthread_rwlockattr_t
impl Clone for ptp_clock_caps
impl Clone for ptp_clock_time
impl Clone for ptp_extts_event
impl Clone for ptp_extts_request
impl Clone for ptp_perout_request
impl Clone for ptp_pin_desc
impl Clone for ptp_sys_offset
impl Clone for ptp_sys_offset_extended
impl Clone for ptp_sys_offset_precise
impl Clone for regmatch_t
impl Clone for rlimit64
impl Clone for sched_attr
impl Clone for sctp_authinfo
impl Clone for sctp_initmsg
impl Clone for sctp_nxtinfo
impl Clone for sctp_prinfo
impl Clone for sctp_rcvinfo
impl Clone for sctp_sndinfo
impl Clone for sctp_sndrcvinfo
impl Clone for seccomp_data
impl Clone for seccomp_notif
impl Clone for seccomp_notif_addfd
impl Clone for seccomp_notif_resp
impl Clone for seccomp_notif_sizes
impl Clone for sembuf
impl Clone for signalfd_siginfo
impl Clone for sock_extended_err
impl Clone for sock_filter
impl Clone for sock_fprog
impl Clone for sock_txtime
impl Clone for sockaddr_alg
impl Clone for sockaddr_can
impl Clone for sockaddr_nl
impl Clone for sockaddr_pkt
impl Clone for sockaddr_vm
impl Clone for spwd
impl Clone for tls12_crypto_info_aes_gcm_128
impl Clone for tls12_crypto_info_aes_gcm_256
impl Clone for tls12_crypto_info_chacha20_poly1305
impl Clone for tls_crypto_info
impl Clone for tpacket2_hdr
impl Clone for tpacket3_hdr
impl Clone for tpacket_auxdata
impl Clone for tpacket_bd_ts
impl Clone for tpacket_block_desc
impl Clone for tpacket_hdr
impl Clone for tpacket_hdr_v1
impl Clone for tpacket_hdr_variant1
impl Clone for tpacket_req3
impl Clone for tpacket_req
impl Clone for tpacket_rollover_stats
impl Clone for tpacket_stats
impl Clone for tpacket_stats_v3
impl Clone for ucred
impl Clone for uinput_abs_setup
impl Clone for uinput_ff_erase
impl Clone for uinput_ff_upload
impl Clone for uinput_setup
impl Clone for uinput_user_dev
impl Clone for xsk_tx_metadata
impl Clone for xsk_tx_metadata_completion
impl Clone for xsk_tx_metadata_request
impl Clone for Dl_info
impl Clone for addrinfo
impl Clone for arphdr
impl Clone for arpreq
impl Clone for arpreq_old
impl Clone for epoll_event
impl Clone for fd_set
impl Clone for ifaddrs
impl Clone for in6_rtmsg
impl Clone for in_addr
impl Clone for in_pktinfo
impl Clone for ip_mreq
impl Clone for ip_mreq_source
impl Clone for ip_mreqn
impl Clone for lconv
impl Clone for mmsghdr
impl Clone for sched_param
impl Clone for sigevent
impl Clone for sockaddr
impl Clone for sockaddr_in6
impl Clone for sockaddr_in
impl Clone for sockaddr_ll
impl Clone for sockaddr_storage
impl Clone for sockaddr_un
impl Clone for statx
impl Clone for statx_timestamp
impl Clone for tm
impl Clone for utsname
impl Clone for group
impl Clone for hostent
impl Clone for in6_addr
impl Clone for iovec
impl Clone for ipv6_mreq
impl Clone for itimerval
impl Clone for linger
impl Clone for pollfd
impl Clone for protoent
impl Clone for rlimit
impl Clone for rusage
impl Clone for servent
impl Clone for sigval
impl Clone for timespec
impl Clone for timeval
impl Clone for tms
impl Clone for utimbuf
impl Clone for winsize
impl Clone for git_blame_hunk
impl Clone for git_blame_options
impl Clone for git_buf
impl Clone for git_index_entry
impl Clone for git_index_time
impl Clone for git_indexer_progress
impl Clone for git_message_trailer_array
impl Clone for git_oid
impl Clone for git_oidarray
impl Clone for git_strarray
impl Clone for git_time
impl Clone for gz_header
impl Clone for z_stream
impl Clone for One
impl Clone for Three
impl Clone for Two
impl Clone for memchr::arch::all::packedpair::Finder
impl Clone for Pair
impl Clone for memchr::arch::all::rabinkarp::Finder
impl Clone for memchr::arch::all::rabinkarp::FinderRev
impl Clone for memchr::arch::all::twoway::Finder
impl Clone for memchr::arch::all::twoway::FinderRev
impl Clone for FinderBuilder
impl Clone for FormatterOptions
impl Clone for ryu::buffer::Buffer
impl Clone for BuildMetadata
impl Clone for Comparator
impl Clone for Prerelease
impl Clone for Version
impl Clone for VersionReq
impl Clone for IgnoredAny
impl Clone for serde::de::value::Error
impl Clone for serde_json::map::Map<String, Value>
impl Clone for Number
impl Clone for CompactFormatter
impl Clone for time_core::convert::Day
impl Clone for time_core::convert::Hour
impl Clone for Microsecond
impl Clone for Millisecond
impl Clone for time_core::convert::Minute
impl Clone for Nanosecond
impl Clone for time_core::convert::Second
impl Clone for Week
impl Clone for Date
impl Clone for time::duration::Duration
impl Clone for ComponentRange
impl Clone for ConversionRange
impl Clone for DifferentVariant
impl Clone for IndeterminateOffset
impl Clone for InvalidVariant
impl Clone for time::format_description::modifier::Day
impl Clone for End
impl Clone for time::format_description::modifier::Hour
impl Clone for Ignore
impl Clone for time::format_description::modifier::Minute
impl Clone for time::format_description::modifier::Month
impl Clone for OffsetHour
impl Clone for OffsetMinute
impl Clone for OffsetSecond
impl Clone for Ordinal
impl Clone for Period
impl Clone for time::format_description::modifier::Second
impl Clone for Subsecond
impl Clone for UnixTimestamp
impl Clone for WeekNumber
impl Clone for time::format_description::modifier::Weekday
impl Clone for Year
impl Clone for Rfc2822
impl Clone for Rfc3339
impl Clone for OffsetDateTime
impl Clone for Parsed
impl Clone for PrimitiveDateTime
impl Clone for time::time::Time
impl Clone for UtcOffset
impl Clone for FoundDateTimeList
impl Clone for DateTime
impl Clone for UtcDateTime
impl Clone for AlternateTime
impl Clone for Julian0WithLeap
impl Clone for Julian1WithoutLeap
impl Clone for MonthWeekDay
impl Clone for LeapSecond
impl Clone for LocalTimeType
impl Clone for TimeZone
impl Clone for Transition
impl Clone for OpaqueOrigin
impl Clone for Url
impl Clone for LengthHint
impl Clone for Part
impl Clone for FlexZeroVecOwned
impl Clone for CharULE
impl Clone for UnvalidatedChar
impl Clone for Index16
impl Clone for Index32
impl Clone for Box<str>
impl Clone for Box<ByteStr>
impl Clone for Box<CStr>
impl Clone for Box<OsStr>
impl Clone for Box<Path>
impl Clone for Box<Utf8Path>
impl Clone for String
impl Clone for __c_anonymous_ptrace_syscall_info_data
impl Clone for __c_anonymous_ifc_ifcu
impl Clone for __c_anonymous_ifr_ifru
impl Clone for __c_anonymous_iwreq
impl Clone for __c_anonymous_ptp_perout_request_1
impl Clone for __c_anonymous_ptp_perout_request_2
impl Clone for __c_anonymous_sockaddr_can_can_addr
impl Clone for __c_anonymous_xsk_tx_metadata_union
impl Clone for iwreq_data
impl Clone for tpacket_bd_header_u
impl Clone for tpacket_req_u
impl<'a> Clone for Utf8Pattern<'a>
impl<'a> Clone for std::path::Component<'a>
impl<'a> Clone for Prefix<'a>
impl<'a> Clone for Utf8Component<'a>
impl<'a> Clone for Utf8Prefix<'a>
impl<'a> Clone for Unexpected<'a>
impl<'a> Clone for BorrowedFormatItem<'a>
impl<'a> Clone for Arguments<'a>
impl<'a> Clone for core::error::Source<'a>
impl<'a> Clone for core::ffi::c_str::Bytes<'a>
impl<'a> Clone for PhantomContravariantLifetime<'a>
impl<'a> Clone for PhantomCovariantLifetime<'a>
impl<'a> Clone for PhantomInvariantLifetime<'a>
impl<'a> Clone for Location<'a>
impl<'a> Clone for EscapeAscii<'a>
impl<'a> Clone for core::str::iter::Bytes<'a>
impl<'a> Clone for CharIndices<'a>
impl<'a> Clone for Chars<'a>
impl<'a> Clone for EncodeUtf16<'a>
impl<'a> Clone for core::str::iter::EscapeDebug<'a>
impl<'a> Clone for core::str::iter::EscapeDefault<'a>
impl<'a> Clone for core::str::iter::EscapeUnicode<'a>
impl<'a> Clone for Lines<'a>
impl<'a> Clone for LinesAny<'a>
impl<'a> Clone for SplitAsciiWhitespace<'a>
impl<'a> Clone for SplitWhitespace<'a>
impl<'a> Clone for Utf8Chunk<'a>
impl<'a> Clone for Utf8Chunks<'a>
impl<'a> Clone for CharSearcher<'a>
impl<'a> Clone for IoSlice<'a>
impl<'a> Clone for Ancestors<'a>
impl<'a> Clone for Components<'a>
impl<'a> Clone for std::path::Iter<'a>
impl<'a> Clone for PrefixComponent<'a>
impl<'a> Clone for camino::Iter<'a>
impl<'a> Clone for Utf8Ancestors<'a>
impl<'a> Clone for Utf8Components<'a>
impl<'a> Clone for Utf8PrefixComponent<'a>
impl<'a> Clone for form_urlencoded::Parse<'a>
impl<'a> Clone for TreeEntry<'a>
impl<'a> Clone for Char16TrieIterator<'a>
impl<'a> Clone for LocaleFallbackerBorrowed<'a>
impl<'a> Clone for LocaleFallbackerWithConfig<'a>
impl<'a> Clone for LanguageStrStrPair<'a>
impl<'a> Clone for StrStrPair<'a>
impl<'a> Clone for ScriptExtensionsSet<'a>
impl<'a> Clone for ScriptWithExtensionsBorrowed<'a>
impl<'a> Clone for CodePointSetDataBorrowed<'a>
impl<'a> Clone for UnicodeSetDataBorrowed<'a>
impl<'a> Clone for DataRequest<'a>
impl<'a> Clone for log::Metadata<'a>
impl<'a> Clone for Record<'a>
impl<'a> Clone for PercentDecode<'a>
impl<'a> Clone for PercentEncode<'a>
impl<'a> Clone for PrettyFormatter<'a>
impl<'a> Clone for TimeZoneRef<'a>
impl<'a> Clone for ParseOptions<'a>
impl<'a> Clone for Utf8CharIndices<'a>
impl<'a> Clone for ErrorReportingUtf8Chars<'a>
impl<'a> Clone for Utf8Chars<'a>
impl<'a> Clone for Utf16CharIndices<'a>
impl<'a> Clone for ErrorReportingUtf16Chars<'a>
impl<'a> Clone for Utf16Chars<'a>
impl<'a, 'b> Clone for CharSliceSearcher<'a, 'b>
impl<'a, 'b> Clone for StrSearcher<'a, 'b>
impl<'a, 'b, const N: usize> Clone for CharArrayRefSearcher<'a, 'b, N>
impl<'a, 'h> Clone for OneIter<'a, 'h>
impl<'a, 'h> Clone for ThreeIter<'a, 'h>
impl<'a, 'h> Clone for TwoIter<'a, 'h>
impl<'a, E> Clone for BytesDeserializer<'a, E>
impl<'a, E> Clone for CowStrDeserializer<'a, E>
impl<'a, F> Clone for CharPredicateSearcher<'a, F>
impl<'a, K0, K1, V> Clone for ZeroMap2dBorrowed<'a, K0, K1, V>
impl<'a, K0, K1, V> Clone for ZeroMap2d<'a, K0, K1, V>
impl<'a, K> Clone for alloc::collections::btree::set::Cursor<'a, K>where
K: Clone + 'a,
impl<'a, K, V> Clone for ZeroMapBorrowed<'a, K, V>
impl<'a, K, V> Clone for ZeroMap<'a, K, V>
impl<'a, P> Clone for MatchIndices<'a, P>
impl<'a, P> Clone for Matches<'a, P>
impl<'a, P> Clone for RMatchIndices<'a, P>
impl<'a, P> Clone for RMatches<'a, P>
impl<'a, P> Clone for core::str::iter::RSplit<'a, P>
impl<'a, P> Clone for RSplitN<'a, P>
impl<'a, P> Clone for RSplitTerminator<'a, P>
impl<'a, P> Clone for core::str::iter::Split<'a, P>
impl<'a, P> Clone for core::str::iter::SplitInclusive<'a, P>
impl<'a, P> Clone for SplitN<'a, P>
impl<'a, P> Clone for SplitTerminator<'a, P>
impl<'a, T> Clone for RChunksExact<'a, T>
impl<'a, T> Clone for CodePointMapDataBorrowed<'a, T>
impl<'a, T> Clone for PropertyEnumToValueNameLinearMapperBorrowed<'a, T>where
T: Clone,
impl<'a, T> Clone for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>where
T: Clone,
impl<'a, T> Clone for PropertyEnumToValueNameSparseMapperBorrowed<'a, T>where
T: Clone,
impl<'a, T> Clone for PropertyValueNameToEnumMapperBorrowed<'a, T>where
T: Clone,
impl<'a, T> Clone for ZeroVec<'a, T>where
T: AsULE,
impl<'a, T, F> Clone for VarZeroVec<'a, T, F>where
T: ?Sized,
impl<'a, T, const N: usize> Clone for ArrayWindows<'a, T, N>where
T: Clone + 'a,
impl<'a, const N: usize> Clone for CharArraySearcher<'a, N>
impl<'data> Clone for PropertyCodePointSetV1<'data>
impl<'data> Clone for PropertyUnicodeSetV1<'data>
impl<'data> Clone for Char16Trie<'data>
impl<'data> Clone for CodePointInversionList<'data>
impl<'data> Clone for CodePointInversionListAndStringList<'data>
impl<'data> Clone for AliasesV1<'data>
impl<'data> Clone for AliasesV2<'data>
impl<'data> Clone for ScriptDirectionV1<'data>
impl<'data> Clone for LocaleFallbackParentsV1<'data>
impl<'data> Clone for LocaleFallbackSupplementV1<'data>
impl<'data> Clone for CanonicalCompositionsV1<'data>
impl<'data> Clone for DecompositionDataV1<'data>
impl<'data> Clone for DecompositionSupplementV1<'data>
impl<'data> Clone for DecompositionTablesV1<'data>
impl<'data> Clone for NonRecursiveDecompositionSupplementV1<'data>
impl<'data> Clone for BidiAuxiliaryPropertiesV1<'data>
impl<'data> Clone for PropertyEnumToValueNameLinearMapV1<'data>
impl<'data> Clone for PropertyEnumToValueNameLinearTiny4MapV1<'data>
impl<'data> Clone for PropertyEnumToValueNameSparseMapV1<'data>
impl<'data> Clone for PropertyValueNameToEnumMapV1<'data>
impl<'data> Clone for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Clone for HelloWorldV1<'data>
impl<'data, T> Clone for PropertyCodePointMapV1<'data, T>
impl<'de, E> Clone for BorrowedBytesDeserializer<'de, E>
impl<'de, E> Clone for BorrowedStrDeserializer<'de, E>
impl<'de, E> Clone for StrDeserializer<'de, E>
impl<'de, I, E> Clone for MapDeserializer<'de, I, E>
impl<'f> Clone for VaListImpl<'f>
impl<'fd> Clone for BorrowedFd<'fd>
impl<'h> Clone for Memchr2<'h>
impl<'h> Clone for Memchr3<'h>
impl<'h> Clone for Memchr<'h>
impl<'h, 'n> Clone for FindIter<'h, 'n>
impl<'h, 'n> Clone for FindRevIter<'h, 'n>
impl<'n> Clone for memchr::memmem::Finder<'n>
impl<'n> Clone for memchr::memmem::FinderRev<'n>
impl<'repo> Clone for Blob<'repo>
impl<'repo> Clone for Commit<'repo>
impl<'repo> Clone for Object<'repo>
impl<'repo> Clone for Remote<'repo>
impl<'repo> Clone for Tag<'repo>
impl<'repo> Clone for Tree<'repo>
impl<'string> Clone for AttrValue<'string>
impl<'trie, T> Clone for CodePointTrie<'trie, T>
impl<A> Clone for Repeat<A>where
A: Clone,
impl<A> Clone for RepeatN<A>where
A: Clone,
impl<A> Clone for core::option::IntoIter<A>where
A: Clone,
impl<A> Clone for core::option::Iter<'_, A>
impl<A> Clone for IterRange<A>where
A: Clone,
impl<A> Clone for IterRangeFrom<A>where
A: Clone,
impl<A> Clone for IterRangeInclusive<A>where
A: Clone,
impl<A> Clone for EnumAccessDeserializer<A>where
A: Clone,
impl<A> Clone for MapAccessDeserializer<A>where
A: Clone,
impl<A> Clone for SeqAccessDeserializer<A>where
A: Clone,
impl<A> Clone for smallvec::IntoIter<A>
impl<A> Clone for SmallVec<A>
impl<A, B> Clone for Chain<A, B>
impl<A, B> Clone for Zip<A, B>
impl<A, B> Clone for Tuple2ULE<A, B>
impl<A, B, C> Clone for Tuple3ULE<A, B, C>
impl<A, B, C, D> Clone for Tuple4ULE<A, B, C, D>
impl<A, B, C, D, E> Clone for Tuple5ULE<A, B, C, D, E>
impl<A, B, C, D, E, F> Clone for Tuple6ULE<A, B, C, D, E, F>
impl<B> Clone for Cow<'_, B>
impl<B, C> Clone for ControlFlow<B, C>
impl<C0, C1> Clone for EitherCart<C0, C1>
impl<C> Clone for CartableOptionPointer<C>where
C: CloneableCartablePointerLike,
impl<Dyn> Clone for DynMetadata<Dyn>where
Dyn: ?Sized,
impl<E> Clone for BoolDeserializer<E>
impl<E> Clone for CharDeserializer<E>
impl<E> Clone for F32Deserializer<E>
impl<E> Clone for F64Deserializer<E>
impl<E> Clone for I8Deserializer<E>
impl<E> Clone for I16Deserializer<E>
impl<E> Clone for I32Deserializer<E>
impl<E> Clone for I64Deserializer<E>
impl<E> Clone for I128Deserializer<E>
impl<E> Clone for IsizeDeserializer<E>
impl<E> Clone for StringDeserializer<E>
impl<E> Clone for U8Deserializer<E>
impl<E> Clone for U16Deserializer<E>
impl<E> Clone for U32Deserializer<E>
impl<E> Clone for U64Deserializer<E>
impl<E> Clone for U128Deserializer<E>
impl<E> Clone for UnitDeserializer<E>
impl<E> Clone for UsizeDeserializer<E>
impl<F> Clone for FromFn<F>where
F: Clone,
impl<F> Clone for OnceWith<F>where
F: Clone,
impl<F> Clone for RepeatWith<F>where
F: Clone,
impl<G> Clone for FromCoroutine<G>where
G: Clone,
impl<H> Clone for BuildHasherDefault<H>
impl<I> Clone for FromIter<I>where
I: Clone,
impl<I> Clone for DecodeUtf16<I>
impl<I> Clone for Cloned<I>where
I: Clone,
impl<I> Clone for Copied<I>where
I: Clone,
impl<I> Clone for Cycle<I>where
I: Clone,
impl<I> Clone for Enumerate<I>where
I: Clone,
impl<I> Clone for Fuse<I>where
I: Clone,
impl<I> Clone for Intersperse<I>
impl<I> Clone for Peekable<I>
impl<I> Clone for Skip<I>where
I: Clone,
impl<I> Clone for StepBy<I>where
I: Clone,
impl<I> Clone for Take<I>where
I: Clone,
impl<I, E> Clone for SeqDeserializer<I, E>
impl<I, F> Clone for FilterMap<I, F>
impl<I, F> Clone for Inspect<I, F>
impl<I, F> Clone for core::iter::adapters::map::Map<I, F>
impl<I, F, const N: usize> Clone for MapWindows<I, F, N>
impl<I, G> Clone for IntersperseWith<I, G>
impl<I, P> Clone for Filter<I, P>
impl<I, P> Clone for MapWhile<I, P>
impl<I, P> Clone for SkipWhile<I, P>
impl<I, P> Clone for TakeWhile<I, P>
impl<I, St, F> Clone for Scan<I, St, F>
impl<I, U> Clone for Flatten<I>
impl<I, U, F> Clone for FlatMap<I, U, F>
impl<I, const N: usize> Clone for core::iter::adapters::array_chunks::ArrayChunks<I, N>
impl<Idx> Clone for core::ops::range::Range<Idx>where
Idx: Clone,
impl<Idx> Clone for core::ops::range::RangeFrom<Idx>where
Idx: Clone,
impl<Idx> Clone for core::ops::range::RangeInclusive<Idx>where
Idx: Clone,
impl<Idx> Clone for RangeTo<Idx>where
Idx: Clone,
impl<Idx> Clone for RangeToInclusive<Idx>where
Idx: Clone,
impl<Idx> Clone for core::range::Range<Idx>where
Idx: Clone,
impl<Idx> Clone for core::range::RangeFrom<Idx>where
Idx: Clone,
impl<Idx> Clone for core::range::RangeInclusive<Idx>where
Idx: Clone,
impl<K> Clone for std::collections::hash::set::Iter<'_, K>
impl<K, V> Clone for alloc::collections::btree::map::Cursor<'_, K, V>
impl<K, V> Clone for alloc::collections::btree::map::Iter<'_, K, V>
impl<K, V> Clone for alloc::collections::btree::map::Keys<'_, K, V>
impl<K, V> Clone for alloc::collections::btree::map::Range<'_, K, V>
impl<K, V> Clone for alloc::collections::btree::map::Values<'_, K, V>
impl<K, V> Clone for std::collections::hash::map::Iter<'_, K, V>
impl<K, V> Clone for std::collections::hash::map::Keys<'_, K, V>
impl<K, V> Clone for std::collections::hash::map::Values<'_, K, V>
impl<K, V, A> Clone for BTreeMap<K, V, A>
impl<K, V, S> Clone for HashMap<K, V, S>
impl<K, V, S> Clone for LiteMap<K, V, S>
impl<M> Clone for DataPayload<M>where
M: DataMarker,
YokeTraitHack<<<M as DataMarker>::Yokeable as Yokeable<'a>>::Output>: for<'a> Clone,
Cloning a DataPayload is generally a cheap operation.
See notes in the Clone
impl for Yoke
.
§Examples
use icu_provider::hello_world::*;
use icu_provider::prelude::*;
let resp1: DataPayload<HelloWorldV1Marker> = todo!();
let resp2 = resp1.clone();
impl<M> Clone for DataResponse<M>where
M: DataMarker,
YokeTraitHack<<<M as DataMarker>::Yokeable as Yokeable<'a>>::Output>: for<'a> Clone,
Cloning a DataResponse is generally a cheap operation.
See notes in the Clone
impl for Yoke
.
§Examples
use icu_provider::hello_world::*;
use icu_provider::prelude::*;
let resp1: DataResponse<HelloWorldV1Marker> = todo!();
let resp2 = resp1.clone();
impl<Ptr> Clone for Pin<Ptr>where
Ptr: Clone,
impl<S> Clone for Host<S>where
S: Clone,
impl<T> !Clone for &mut Twhere
T: ?Sized,
Shared references can be cloned, but mutable references cannot!
impl<T> Clone for Option<T>where
T: Clone,
impl<T> Clone for Bound<T>where
T: Clone,
impl<T> Clone for Poll<T>where
T: Clone,
impl<T> Clone for SendTimeoutError<T>where
T: Clone,
impl<T> Clone for TrySendError<T>where
T: Clone,
impl<T> Clone for *const Twhere
T: ?Sized,
impl<T> Clone for *mut Twhere
T: ?Sized,
impl<T> Clone for &Twhere
T: ?Sized,
Shared references can be cloned, but mutable references cannot!
impl<T> Clone for PWrapper<T>where
T: Clone,
impl<T> Clone for alloc::collections::binary_heap::Iter<'_, T>
impl<T> Clone for alloc::collections::btree::set::Iter<'_, T>
impl<T> Clone for alloc::collections::btree::set::Range<'_, T>
impl<T> Clone for alloc::collections::btree::set::SymmetricDifference<'_, T>
impl<T> Clone for alloc::collections::btree::set::Union<'_, T>
impl<T> Clone for alloc::collections::linked_list::Iter<'_, T>
impl<T> Clone for alloc::collections::vec_deque::iter::Iter<'_, T>
impl<T> Clone for OnceCell<T>where
T: Clone,
impl<T> Clone for Cell<T>where
T: Copy,
impl<T> Clone for RefCell<T>where
T: Clone,
impl<T> Clone for Reverse<T>where
T: Clone,
impl<T> Clone for Pending<T>
impl<T> Clone for Ready<T>where
T: Clone,
impl<T> Clone for Rev<T>where
T: Clone,
impl<T> Clone for core::iter::sources::empty::Empty<T>
impl<T> Clone for Once<T>where
T: Clone,
impl<T> Clone for PhantomData<T>where
T: ?Sized,
impl<T> Clone for PhantomContravariant<T>where
T: ?Sized,
impl<T> Clone for PhantomCovariant<T>where
T: ?Sized,
impl<T> Clone for PhantomInvariant<T>where
T: ?Sized,
impl<T> Clone for ManuallyDrop<T>
impl<T> Clone for Discriminant<T>
impl<T> Clone for NonZero<T>where
T: ZeroablePrimitive,
impl<T> Clone for Saturating<T>where
T: Clone,
impl<T> Clone for Wrapping<T>where
T: Clone,
impl<T> Clone for NonNull<T>where
T: ?Sized,
impl<T> Clone for core::result::IntoIter<T>where
T: Clone,
impl<T> Clone for core::result::Iter<'_, T>
impl<T> Clone for Chunks<'_, T>
impl<T> Clone for ChunksExact<'_, T>
impl<T> Clone for core::slice::iter::Iter<'_, T>
impl<T> Clone for RChunks<'_, T>
impl<T> Clone for Windows<'_, T>
impl<T> Clone for std::io::cursor::Cursor<T>where
T: Clone,
impl<T> Clone for Receiver<T>
impl<T> Clone for std::sync::mpmc::Sender<T>
impl<T> Clone for SendError<T>where
T: Clone,
impl<T> Clone for std::sync::mpsc::Sender<T>
impl<T> Clone for SyncSender<T>
impl<T> Clone for OnceLock<T>where
T: Clone,
impl<T> Clone for CodePointMapRange<T>where
T: Clone,
impl<T> Clone for CodePointMapData<T>
impl<T> Clone for powerfmt::smart_display::Metadata<'_, T>
impl<T> Clone for TryWriteableInfallibleAsWriteable<T>where
T: Clone,
impl<T> Clone for WriteableAsTryWriteableInfallible<T>where
T: Clone,
impl<T> Clone for YokeTraitHack<T>where
T: Clone,
impl<T> Clone for MaybeUninit<T>where
T: Copy,
impl<T, A> Clone for BinaryHeap<T, A>
impl<T, A> Clone for alloc::collections::binary_heap::IntoIter<T, A>
impl<T, A> Clone for IntoIterSorted<T, A>
impl<T, A> Clone for BTreeSet<T, A>
impl<T, A> Clone for alloc::collections::btree::set::Difference<'_, T, A>
impl<T, A> Clone for alloc::collections::btree::set::Intersection<'_, T, A>
impl<T, A> Clone for alloc::collections::linked_list::Cursor<'_, T, A>where
A: Allocator,
impl<T, A> Clone for alloc::collections::linked_list::IntoIter<T, A>
impl<T, A> Clone for LinkedList<T, A>
impl<T, A> Clone for alloc::collections::vec_deque::into_iter::IntoIter<T, A>
impl<T, A> Clone for VecDeque<T, A>
impl<T, A> Clone for Rc<T, A>
impl<T, A> Clone for alloc::rc::Weak<T, A>
impl<T, A> Clone for Arc<T, A>
impl<T, A> Clone for alloc::sync::Weak<T, A>
impl<T, A> Clone for alloc::vec::into_iter::IntoIter<T, A>
impl<T, A> Clone for Box<[T], A>
impl<T, A> Clone for Box<T, A>
impl<T, A> Clone for Vec<T, A>
impl<T, E> Clone for Result<T, E>
impl<T, F> Clone for Successors<T, F>
impl<T, F> Clone for VarZeroVecOwned<T, F>where
T: ?Sized,
impl<T, P> Clone for core::slice::iter::RSplit<'_, T, P>
impl<T, P> Clone for core::slice::iter::Split<'_, T, P>
impl<T, P> Clone for core::slice::iter::SplitInclusive<'_, T, P>
impl<T, S> Clone for std::collections::hash::set::Difference<'_, T, S>
impl<T, S> Clone for HashSet<T, S>
impl<T, S> Clone for std::collections::hash::set::Intersection<'_, T, S>
impl<T, S> Clone for std::collections::hash::set::SymmetricDifference<'_, T, S>
impl<T, S> Clone for std::collections::hash::set::Union<'_, T, S>
impl<T, const N: usize> Clone for [T; N]where
T: Clone,
impl<T, const N: usize> Clone for core::array::iter::IntoIter<T, N>where
T: Clone,
impl<T, const N: usize> Clone for Mask<T, N>
impl<T, const N: usize> Clone for Simd<T, N>
impl<T, const N: usize> Clone for core::slice::iter::ArrayChunks<'_, T, N>
impl<U> Clone for OptionULE<U>where
U: Copy,
impl<U, const N: usize> Clone for NichedOption<U, N>where
U: Clone,
impl<U, const N: usize> Clone for NichedOptionULE<U, N>where
U: NicheBytes<N> + ULE,
impl<Y> Clone for NeverMarker<Y>where
Y: Clone,
impl<Y, C> Clone for Yoke<Y, C>where
Y: for<'a> Yokeable<'a>,
C: CloneableCart,
YokeTraitHack<<Y as Yokeable<'a>>::Output>: for<'a> Clone,
Clone requires that the cart type C
derefs to the same address after it is cloned. This works for
Rc, Arc, and &’a T.
For other cart types, clone .backing_cart()
and re-use .attach_to_cart()
; however, doing
so may lose mutations performed via .with_mut()
.
Cloning a Yoke
is often a cheap operation requiring no heap allocations, in much the same
way that cloning an Rc
is a cheap operation. However, if the yokeable
contains owned data
(e.g., from .with_mut()
), that data will need to be cloned.