Trait std::clone::Clone

1.0.0 · source ·
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 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,
}
Run

§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
    }
}
Run

If we derive:

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

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))
    }
}
Run

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.
Run

§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§

source

fn clone(&self) -> Self

Returns a copy of the value.

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

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

Provided Methods§

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 AsciiChar

source§

impl Clone for std::cmp::Ordering

source§

impl Clone for TryReserveErrorKind

1.34.0 · source§

impl Clone for Infallible

source§

impl Clone for VarError

1.28.0 · source§

impl Clone for std::fmt::Alignment

source§

impl Clone for ErrorKind

source§

impl Clone for SeekFrom

1.7.0 · source§

impl Clone for IpAddr

source§

impl Clone for Ipv6MulticastScope

source§

impl Clone for Shutdown

source§

impl Clone for std::net::SocketAddr

source§

impl Clone for FpCategory

1.55.0 · source§

impl Clone for IntErrorKind

source§

impl Clone for BacktraceStyle

source§

impl Clone for SearchStep

source§

impl Clone for std::sync::atomic::Ordering

1.12.0 · source§

impl Clone for RecvTimeoutError

source§

impl Clone for TryRecvError

source§

impl Clone for DwarfFileType

source§

impl Clone for Format

source§

impl Clone for SectionId

source§

impl Clone for Vendor

source§

impl Clone for RunTimeEndian

source§

impl Clone for AbbreviationsCacheStrategy

source§

impl Clone for Pointer

source§

impl Clone for gimli::read::Error

source§

impl Clone for ColumnType

source§

impl Clone for Value

source§

impl Clone for ValueType

source§

impl Clone for Prefilter

source§

impl Clone for bool

source§

impl Clone for char

source§

impl Clone for f32

source§

impl Clone for f64

source§

impl Clone for i8

source§

impl Clone for i16

source§

impl Clone for i32

source§

impl Clone for i64

source§

impl Clone for i128

source§

impl Clone for isize

source§

impl Clone for !

source§

impl Clone for u8

source§

impl Clone for u16

source§

impl Clone for u32

source§

impl Clone for u64

source§

impl Clone for u128

source§

impl Clone for usize

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

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

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

1.72.0 · source§

impl Clone for __m512i

source§

impl Clone for TimSortRun

source§

impl Clone for AllocError

source§

impl Clone for Global

1.28.0 · source§

impl Clone for Layout

1.50.0 · source§

impl Clone for LayoutError

1.28.0 · source§

impl Clone for System

source§

impl Clone for TypeId

1.34.0 · source§

impl Clone for TryFromSliceError

source§

impl Clone for std::ascii::EscapeDefault

1.3.0 · source§

impl Clone for Box<str>

1.29.0 · source§

impl Clone for Box<CStr>

1.29.0 · source§

impl Clone for Box<OsStr>

1.29.0 · source§

impl Clone for Box<Path>

1.34.0 · source§

impl Clone for CharTryFromError

1.9.0 · source§

impl Clone for DecodeUtf16Error

1.20.0 · source§

impl Clone for std::char::EscapeDebug

source§

impl Clone for std::char::EscapeDefault

source§

impl Clone for std::char::EscapeUnicode

1.20.0 · source§

impl Clone for ParseCharError

source§

impl Clone for ToLowercase

source§

impl Clone for ToUppercase

1.59.0 · source§

impl Clone for TryFromCharError

source§

impl Clone for UnorderedKeyError

1.7.0 · source§

impl Clone for DefaultHasher

1.7.0 · source§

impl Clone for RandomState

1.57.0 · source§

impl Clone for TryReserveError

1.69.0 · source§

impl Clone for FromBytesUntilNulError

1.64.0 · source§

impl Clone for FromBytesWithNulError

1.64.0 · source§

impl Clone for FromVecWithNulError

1.64.0 · source§

impl Clone for IntoStringError

1.64.0 · source§

impl Clone for NulError

1.64.0 · source§

impl Clone for CString

source§

impl Clone for OsString

source§

impl Clone for std::fmt::Error

1.75.0 · source§

impl Clone for FileTimes

1.1.0 · source§

impl Clone for FileType

source§

impl Clone for Metadata

source§

impl Clone for OpenOptions

source§

impl Clone for Permissions

source§

impl Clone for SipHasher

source§

impl Clone for std::io::Empty

source§

impl Clone for Sink

1.33.0 · source§

impl Clone for PhantomPinned

source§

impl Clone for Assume

source§

impl Clone for AddrParseError

source§

impl Clone for Ipv4Addr

source§

impl Clone for Ipv6Addr

source§

impl Clone for SocketAddrV4

source§

impl Clone for SocketAddrV6

source§

impl Clone for ParseFloatError

source§

impl Clone for ParseIntError

1.34.0 · source§

impl Clone for TryFromIntError

source§

impl Clone for RangeFull

1.1.0 · source§

impl Clone for stat

Available on Linux only.
1.10.0 · source§

impl Clone for std::os::unix::net::SocketAddr

Available on Unix only.
source§

impl Clone for SocketCred

Available on (Android or Linux) and Unix only.
source§

impl Clone for UCred

Available on Unix only.
1.63.0 · source§

impl Clone for InvalidHandleError

Available on Windows only.
1.63.0 · source§

impl Clone for NullHandleError

Available on Windows only.
source§

impl Clone for PathBuf

1.7.0 · source§

impl Clone for StripPrefixError

1.61.0 · source§

impl Clone for ExitCode

source§

impl Clone for ExitStatus

source§

impl Clone for ExitStatusError

source§

impl Clone for Output

source§

impl Clone for std::ptr::Alignment

source§

impl Clone for ParseBoolError

source§

impl Clone for Utf8Error

source§

impl Clone for FromUtf8Error

source§

impl Clone for String

source§

impl Clone for RecvError

1.5.0 · source§

impl Clone for WaitTimeoutResult

source§

impl Clone for LocalWaker

1.36.0 · source§

impl Clone for RawWakerVTable

1.36.0 · source§

impl Clone for Waker

1.26.0 · source§

impl Clone for AccessError

source§

impl Clone for Thread

1.19.0 · source§

impl Clone for ThreadId

1.3.0 · source§

impl Clone for Duration

1.8.0 · source§

impl Clone for Instant

1.8.0 · source§

impl Clone for SystemTime

1.8.0 · source§

impl Clone for SystemTimeError

1.66.0 · source§

impl Clone for TryFromFloatSecsError

source§

impl Clone for AArch64

source§

impl Clone for Arm

source§

impl Clone for LoongArch

source§

impl Clone for RiscV

source§

impl Clone for X86

source§

impl Clone for X86_64

source§

impl Clone for DebugTypeSignature

source§

impl Clone for DwoId

source§

impl Clone for Encoding

source§

impl Clone for LineEncoding

source§

impl Clone for Register

source§

impl Clone for DwAccess

source§

impl Clone for DwAddr

source§

impl Clone for DwAt

source§

impl Clone for DwAte

source§

impl Clone for DwCc

source§

impl Clone for DwCfa

source§

impl Clone for DwChildren

source§

impl Clone for DwDefaulted

source§

impl Clone for DwDs

source§

impl Clone for DwDsc

source§

impl Clone for DwEhPe

source§

impl Clone for DwEnd

source§

impl Clone for DwForm

source§

impl Clone for DwId

source§

impl Clone for DwIdx

source§

impl Clone for DwInl

source§

impl Clone for DwLang

source§

impl Clone for DwLle

source§

impl Clone for DwLnct

source§

impl Clone for DwLne

source§

impl Clone for DwLns

source§

impl Clone for DwMacro

source§

impl Clone for DwOp

source§

impl Clone for DwOrd

source§

impl Clone for DwRle

source§

impl Clone for DwSect

source§

impl Clone for DwSectV2

source§

impl Clone for DwTag

source§

impl Clone for DwUt

source§

impl Clone for DwVirtuality

source§

impl Clone for DwVis

source§

impl Clone for BigEndian

source§

impl Clone for LittleEndian

source§

impl Clone for Abbreviation

source§

impl Clone for Abbreviations

source§

impl Clone for AttributeSpecification

source§

impl Clone for ArangeEntry

source§

impl Clone for Augmentation

source§

impl Clone for BaseAddresses

source§

impl Clone for SectionBaseAddresses

source§

impl Clone for UnitIndexSection

source§

impl Clone for FileEntryFormat

source§

impl Clone for LineRow

source§

impl Clone for ReaderOffsetId

source§

impl Clone for gimli::read::rnglists::Range

source§

impl Clone for StoreOnHeap

source§

impl Clone for FinderBuilder

source§

impl Clone for Adler32

source§

impl<'a> Clone for Component<'a>

source§

impl<'a> Clone for Prefix<'a>

source§

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

source§

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

source§

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

1.36.0 · source§

impl<'a> Clone for IoSlice<'a>

source§

impl<'a> Clone for EncodeWide<'a>

1.10.0 · source§

impl<'a> Clone for std::panic::Location<'a>

1.28.0 · source§

impl<'a> Clone for Ancestors<'a>

source§

impl<'a> Clone for Components<'a>

source§

impl<'a> Clone for std::path::Iter<'a>

source§

impl<'a> Clone for PrefixComponent<'a>

1.60.0 · source§

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

source§

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

source§

impl<'a> Clone for std::str::Bytes<'a>

source§

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

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 std::str::EscapeDebug<'a>

1.34.0 · source§

impl<'a> Clone for std::str::EscapeDefault<'a>

1.34.0 · source§

impl<'a> Clone for std::str::EscapeUnicode<'a>

source§

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

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>

source§

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

source§

impl<'a> Clone for Utf8Chunks<'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<'a>, <P as Pattern<'a>>::Searcher: Clone,

1.2.0 · source§

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

1.5.0 · source§

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

1.2.0 · source§

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

source§

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

source§

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

source§

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

source§

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

1.51.0 · source§

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

source§

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

source§

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

source§

impl<'a, R> Clone for CallFrameInstructionIter<'a, R>
where R: Clone + Reader,

source§

impl<'a, R> Clone for EhHdrTable<'a, R>
where R: Clone + Reader,

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<'abbrev, 'entry, 'unit, R> Clone for AttrsIter<'abbrev, 'entry, 'unit, R>
where R: Clone + Reader,

source§

impl<'abbrev, 'unit, R> Clone for EntriesCursor<'abbrev, 'unit, R>
where R: Clone + Reader,

source§

impl<'abbrev, 'unit, R> Clone for EntriesRaw<'abbrev, 'unit, R>
where R: Clone + Reader,

source§

impl<'abbrev, 'unit, R> Clone for EntriesTree<'abbrev, 'unit, R>
where R: Clone + Reader,

source§

impl<'abbrev, 'unit, R, Offset> Clone for DebuggingInformationEntry<'abbrev, 'unit, R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<'bases, Section, R> Clone for CieOrFde<'bases, Section, R>
where Section: Clone + UnwindSection<R>, R: Clone + Reader,

source§

impl<'bases, Section, R> Clone for CfiEntriesIter<'bases, Section, R>
where Section: Clone + UnwindSection<R>, R: Clone + Reader,

source§

impl<'bases, Section, R> Clone for PartialFrameDescriptionEntry<'bases, Section, R>
where Section: Clone + UnwindSection<R>, R: Clone + Reader, <R as Reader>::Offset: Clone, <Section as UnwindSection<R>>::Offset: Clone,

source§

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

1.63.0 · source§

impl<'fd> Clone for BorrowedFd<'fd>

1.63.0 · source§

impl<'handle> Clone for BorrowedHandle<'handle>

Available on Windows only.
source§

impl<'index, R> Clone for UnitIndexSectionIterator<'index, R>
where R: Clone + Reader,

source§

impl<'input, Endian> Clone for EndianSlice<'input, Endian>
where Endian: Clone + Endianity,

source§

impl<'iter, R> Clone for RegisterRuleIter<'iter, R>
where R: Clone + Reader,

source§

impl<'n> Clone for Finder<'n>

source§

impl<'n> Clone for FinderRev<'n>

1.63.0 · source§

impl<'socket> Clone for BorrowedSocket<'socket>

Available on Windows only.
source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<B> Clone for Cow<'_, B>
where B: ToOwned + ?Sized,

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,

source§

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

source§

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

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,

source§

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

source§

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

1.28.0 · source§

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

source§

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

source§

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

source§

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

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,

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,

source§

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

source§

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

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,

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 std::iter::ArrayChunks<I, N>
where I: Clone + Iterator, <I as Iterator>::Item: Clone,

source§

impl<Idx> Clone for std::ops::Range<Idx>
where Idx: Clone,

source§

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

1.26.0 · source§

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

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<K> Clone for std::collections::hash_set::Iter<'_, K>

source§

impl<K, V> Clone for std::collections::btree_map::Cursor<'_, K, V>

source§

impl<K, V> Clone for std::collections::btree_map::Iter<'_, K, V>

source§

impl<K, V> Clone for std::collections::btree_map::Keys<'_, K, V>

1.17.0 · source§

impl<K, V> Clone for std::collections::btree_map::Range<'_, K, V>

source§

impl<K, V> Clone for std::collections::btree_map::Values<'_, K, V>

source§

impl<K, V> Clone for std::collections::hash_map::Iter<'_, K, V>

source§

impl<K, V> Clone for std::collections::hash_map::Keys<'_, K, V>

source§

impl<K, V> Clone for std::collections::hash_map::Values<'_, K, V>

source§

impl<K, V, A> Clone for BTreeMap<K, V, A>
where K: Clone, V: Clone, A: Allocator + Clone,

source§

impl<K, V, S> Clone for HashMap<K, V, S>
where K: Clone, V: Clone, S: Clone,

source§

impl<Offset> Clone for UnitType<Offset>
where Offset: Clone + ReaderOffset,

1.33.0 · source§

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

source§

impl<R> Clone for CallFrameInstruction<R>
where R: Clone + Reader,

source§

impl<R> Clone for CfaRule<R>
where R: Clone + Reader,

source§

impl<R> Clone for RegisterRule<R>
where R: Clone + Reader,

source§

impl<R> Clone for RawLocListEntry<R>
where R: Clone + Reader, <R as Reader>::Offset: Clone,

source§

impl<R> Clone for DebugAbbrev<R>
where R: Clone,

source§

impl<R> Clone for DebugAddr<R>
where R: Clone,

source§

impl<R> Clone for ArangeEntryIter<R>
where R: Clone + Reader,

source§

impl<R> Clone for ArangeHeaderIter<R>
where R: Clone + Reader, <R as Reader>::Offset: Clone,

source§

impl<R> Clone for DebugAranges<R>
where R: Clone,

source§

impl<R> Clone for DebugFrame<R>
where R: Clone + Reader,

source§

impl<R> Clone for EhFrame<R>
where R: Clone + Reader,

source§

impl<R> Clone for EhFrameHdr<R>
where R: Clone + Reader,

source§

impl<R> Clone for ParsedEhFrameHdr<R>
where R: Clone + Reader,

source§

impl<R> Clone for DebugCuIndex<R>
where R: Clone,

source§

impl<R> Clone for DebugTuIndex<R>
where R: Clone,

source§

impl<R> Clone for UnitIndex<R>
where R: Clone + Reader,

source§

impl<R> Clone for DebugLine<R>
where R: Clone,

source§

impl<R> Clone for LineInstructions<R>
where R: Clone + Reader,

source§

impl<R> Clone for LineSequence<R>
where R: Clone + Reader,

source§

impl<R> Clone for DebugLoc<R>
where R: Clone,

source§

impl<R> Clone for DebugLocLists<R>
where R: Clone,

source§

impl<R> Clone for LocationListEntry<R>
where R: Clone + Reader,

source§

impl<R> Clone for LocationLists<R>
where R: Clone,

source§

impl<R> Clone for Expression<R>
where R: Clone + Reader,

source§

impl<R> Clone for OperationIter<R>
where R: Clone + Reader,

source§

impl<R> Clone for DebugPubNames<R>
where R: Clone + Reader,

source§

impl<R> Clone for PubNamesEntry<R>
where R: Clone + Reader, <R as Reader>::Offset: Clone,

source§

impl<R> Clone for PubNamesEntryIter<R>
where R: Clone + Reader,

source§

impl<R> Clone for DebugPubTypes<R>
where R: Clone + Reader,

source§

impl<R> Clone for PubTypesEntry<R>
where R: Clone + Reader, <R as Reader>::Offset: Clone,

source§

impl<R> Clone for PubTypesEntryIter<R>
where R: Clone + Reader,

source§

impl<R> Clone for DebugRanges<R>
where R: Clone,

source§

impl<R> Clone for DebugRngLists<R>
where R: Clone,

source§

impl<R> Clone for RangeLists<R>
where R: Clone,

source§

impl<R> Clone for DebugLineStr<R>
where R: Clone,

source§

impl<R> Clone for DebugStr<R>
where R: Clone,

source§

impl<R> Clone for DebugStrOffsets<R>
where R: Clone,

source§

impl<R> Clone for Attribute<R>
where R: Clone + Reader,

source§

impl<R> Clone for DebugInfo<R>
where R: Clone,

source§

impl<R> Clone for DebugInfoUnitHeadersIter<R>
where R: Clone + Reader, <R as Reader>::Offset: Clone,

source§

impl<R> Clone for DebugTypes<R>
where R: Clone,

source§

impl<R> Clone for DebugTypesUnitHeadersIter<R>
where R: Clone + Reader, <R as Reader>::Offset: Clone,

source§

impl<R, A> Clone for UnwindContext<R, A>

source§

impl<R, Offset> Clone for LineInstruction<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for gimli::read::op::Location<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for Operation<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for AttributeValue<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for ArangeHeader<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for CommonInformationEntry<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for FrameDescriptionEntry<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for CompleteLineProgram<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for FileEntry<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for IncompleteLineProgram<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for LineProgramHeader<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for Piece<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Offset> Clone for UnitHeader<R, Offset>
where R: Clone + Reader<Offset = Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, Program, Offset> Clone for LineRows<R, Program, Offset>
where R: Clone + Reader<Offset = Offset>, Program: Clone + LineProgram<R, Offset>, Offset: Clone + ReaderOffset,

source§

impl<R, S> Clone for UnwindTableRow<R, S>
where R: Reader, S: UnwindContextStorage<R>,

source§

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

Shared references can be cloned, but mutable references cannot!

1.17.0 · source§

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

source§

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

1.36.0 · source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Shared references can be cloned, but mutable references cannot!

source§

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

1.70.0 · source§

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

source§

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

1.19.0 · source§

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

source§

impl<T> Clone for std::collections::binary_heap::Iter<'_, T>

source§

impl<T> Clone for std::collections::btree_set::Iter<'_, T>

1.17.0 · source§

impl<T> Clone for std::collections::btree_set::Range<'_, T>

source§

impl<T> Clone for std::collections::btree_set::SymmetricDifference<'_, T>

source§

impl<T> Clone for std::collections::btree_set::Union<'_, T>

source§

impl<T> Clone for std::collections::linked_list::Iter<'_, T>

source§

impl<T> Clone for std::collections::vec_deque::Iter<'_, T>

1.48.0 · source§

impl<T> Clone for Pending<T>

1.48.0 · source§

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

source§

impl<T> Clone for std::io::Cursor<T>
where T: Clone,

1.2.0 · source§

impl<T> Clone for std::iter::Empty<T>

1.2.0 · source§

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

source§

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

source§

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

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.28.0 · source§

impl<T> Clone for NonZero<T>

1.74.0 · source§

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

source§

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

1.25.0 · source§

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

source§

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

source§

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

source§

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

1.31.0 · source§

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

source§

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

1.31.0 · source§

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

source§

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

source§

impl<T> Clone for Sender<T>

source§

impl<T> Clone for SyncSender<T>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

1.36.0 · source§

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

1.3.0 · source§

impl<T, A> Clone for Box<[T], A>
where T: Clone, A: Allocator + Clone,

source§

impl<T, A> Clone for Box<T, A>
where T: Clone, A: Allocator + Clone,

source§

impl<T, A> Clone for std::collections::binary_heap::IntoIter<T, A>
where T: Clone, A: Clone + Allocator,

source§

impl<T, A> Clone for IntoIterSorted<T, A>
where T: Clone, A: Clone + Allocator,

source§

impl<T, A> Clone for std::collections::btree_set::Difference<'_, T, A>
where A: Allocator + Clone,

source§

impl<T, A> Clone for std::collections::btree_set::Intersection<'_, T, A>
where A: Allocator + Clone,

source§

impl<T, A> Clone for std::collections::linked_list::Cursor<'_, T, A>
where A: Allocator,

source§

impl<T, A> Clone for std::collections::linked_list::IntoIter<T, A>
where T: Clone, A: Clone + Allocator,

source§

impl<T, A> Clone for BTreeSet<T, A>
where T: Clone, A: Allocator + Clone,

source§

impl<T, A> Clone for BinaryHeap<T, A>
where T: Clone, A: Allocator + Clone,

source§

impl<T, A> Clone for LinkedList<T, A>
where T: Clone, A: Allocator + Clone,

source§

impl<T, A> Clone for VecDeque<T, A>
where T: Clone, A: Allocator + Clone,

source§

impl<T, A> Clone for std::collections::vec_deque::IntoIter<T, A>
where T: Clone, A: Clone + Allocator,

source§

impl<T, A> Clone for Rc<T, A>
where A: Allocator + Clone, T: ?Sized,

1.4.0 · source§

impl<T, A> Clone for std::rc::Weak<T, A>
where A: Allocator + Clone, T: ?Sized,

source§

impl<T, A> Clone for Arc<T, A>
where A: Allocator + Clone, T: ?Sized,

1.4.0 · source§

impl<T, A> Clone for std::sync::Weak<T, A>
where A: Allocator + Clone, T: ?Sized,

1.8.0 · source§

impl<T, A> Clone for std::vec::IntoIter<T, A>
where T: Clone, A: Allocator + Clone,

source§

impl<T, A> Clone for Vec<T, A>
where T: Clone, A: Allocator + Clone,

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 std::slice::RSplit<'_, T, P>
where P: Clone + FnMut(&T) -> bool,

source§

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

1.51.0 · source§

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

source§

impl<T, S> Clone for std::collections::hash_set::Difference<'_, T, S>

source§

impl<T, S> Clone for HashSet<T, S>
where T: Clone, S: Clone,

source§

impl<T, S> Clone for std::collections::hash_set::Intersection<'_, T, S>

source§

impl<T, S> Clone for std::collections::hash_set::SymmetricDifference<'_, T, S>

source§

impl<T, S> Clone for std::collections::hash_set::Union<'_, T, S>

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 std::array::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 std::slice::ArrayChunks<'_, T, N>

source§

impl<T: Clone> Clone for TrySendError<T>

source§

impl<T: Clone> Clone for SendError<T>

1.70.0 · source§

impl<T: Clone> Clone for OnceLock<T>

source§

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