Trait core::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

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.

Implementors§

source§

impl Clone for AsciiChar

source§

impl Clone for CharErrorKind

source§

impl Clone for CaseMappingIter

source§

impl Clone for EscapeDebugInner

source§

impl Clone for core::cmp::Ordering

1.34.0 · source§

impl Clone for Infallible

source§

impl Clone for Which

source§

impl Clone for FromBytesWithNulErrorKind

1.28.0 · source§

impl Clone for core::fmt::Alignment

source§

impl Clone for core::fmt::rt::Alignment

source§

impl Clone for Count

source§

impl Clone for Flag

1.7.0 · source§

impl Clone for IpAddr

source§

impl Clone for Ipv6MulticastScope

source§

impl Clone for AddrKind

source§

impl Clone for SocketAddr

source§

impl Clone for FloatErrorKind

source§

impl Clone for FpCategory

1.55.0 · source§

impl Clone for IntErrorKind

source§

impl Clone for FullDecoded

source§

impl Clone for Sign

source§

impl Clone for AlignmentEnum16

source§

impl Clone for AlignmentEnum32

source§

impl Clone for AlignmentEnum64

source§

impl Clone for SearchStep

source§

impl Clone for StrSearcherImpl

source§

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

source§

impl Clone for TryFromFloatSecsErrorKind

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 ()

source§

impl Clone for usize

1.28.0 · source§

impl Clone for Layout

1.50.0 · source§

impl Clone for LayoutError

source§

impl Clone for AllocError

source§

impl Clone for TypeId

1.34.0 · source§

impl Clone for TryFromSliceError

source§

impl Clone for core::ascii::EscapeDefault

source§

impl Clone for BorrowRef<'_>

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

source§

impl Clone for core::char::EscapeDefault

source§

impl Clone for core::char::EscapeUnicode

source§

impl Clone for ToLowercase

source§

impl Clone for ToUppercase

1.59.0 · source§

impl Clone for TryFromCharError

1.59.0 · source§

impl Clone for float64x1_t

Available on AArch64 only.
1.59.0 · source§

impl Clone for float64x1x2_t

Available on AArch64 only.
1.59.0 · source§

impl Clone for float64x1x3_t

Available on AArch64 only.
1.59.0 · source§

impl Clone for float64x1x4_t

Available on AArch64 only.
1.59.0 · source§

impl Clone for float64x2_t

Available on AArch64 only.
1.59.0 · source§

impl Clone for float64x2x2_t

Available on AArch64 only.
1.59.0 · source§

impl Clone for float64x2x3_t

Available on AArch64 only.
1.59.0 · source§

impl Clone for float64x2x4_t

Available on AArch64 only.
source§

impl Clone for int16x2_t

Available on ARM only.
source§

impl Clone for uint16x2_t

Available on ARM only.
source§

impl Clone for int8x4_t

Available on ARM only.
source§

impl Clone for uint8x4_t

Available on ARM only.
1.59.0 · source§

impl Clone for float32x2_t

1.59.0 · source§

impl Clone for float32x2x2_t

1.59.0 · source§

impl Clone for float32x2x3_t

1.59.0 · source§

impl Clone for float32x2x4_t

1.59.0 · source§

impl Clone for float32x4_t

1.59.0 · source§

impl Clone for float32x4x2_t

1.59.0 · source§

impl Clone for float32x4x3_t

1.59.0 · source§

impl Clone for float32x4x4_t

1.59.0 · source§

impl Clone for int8x8_t

1.59.0 · source§

impl Clone for int8x8x2_t

1.59.0 · source§

impl Clone for int8x8x3_t

1.59.0 · source§

impl Clone for int8x8x4_t

1.59.0 · source§

impl Clone for int8x16_t

1.59.0 · source§

impl Clone for int8x16x2_t

1.59.0 · source§

impl Clone for int8x16x3_t

1.59.0 · source§

impl Clone for int8x16x4_t

1.59.0 · source§

impl Clone for int16x4_t

1.59.0 · source§

impl Clone for int16x4x2_t

1.59.0 · source§

impl Clone for int16x4x3_t

1.59.0 · source§

impl Clone for int16x4x4_t

1.59.0 · source§

impl Clone for int16x8_t

1.59.0 · source§

impl Clone for int16x8x2_t

1.59.0 · source§

impl Clone for int16x8x3_t

1.59.0 · source§

impl Clone for int16x8x4_t

1.59.0 · source§

impl Clone for int32x2_t

1.59.0 · source§

impl Clone for int32x2x2_t

1.59.0 · source§

impl Clone for int32x2x3_t

1.59.0 · source§

impl Clone for int32x2x4_t

1.59.0 · source§

impl Clone for int32x4_t

1.59.0 · source§

impl Clone for int32x4x2_t

1.59.0 · source§

impl Clone for int32x4x3_t

1.59.0 · source§

impl Clone for int32x4x4_t

1.59.0 · source§

impl Clone for int64x1_t

1.59.0 · source§

impl Clone for int64x1x2_t

1.59.0 · source§

impl Clone for int64x1x3_t

1.59.0 · source§

impl Clone for int64x1x4_t

1.59.0 · source§

impl Clone for int64x2_t

1.59.0 · source§

impl Clone for int64x2x2_t

1.59.0 · source§

impl Clone for int64x2x3_t

1.59.0 · source§

impl Clone for int64x2x4_t

1.59.0 · source§

impl Clone for poly8x8_t

1.59.0 · source§

impl Clone for poly8x8x2_t

1.59.0 · source§

impl Clone for poly8x8x3_t

1.59.0 · source§

impl Clone for poly8x8x4_t

1.59.0 · source§

impl Clone for poly8x16_t

1.59.0 · source§

impl Clone for poly8x16x2_t

1.59.0 · source§

impl Clone for poly8x16x3_t

1.59.0 · source§

impl Clone for poly8x16x4_t

1.59.0 · source§

impl Clone for poly16x4_t

1.59.0 · source§

impl Clone for poly16x4x2_t

1.59.0 · source§

impl Clone for poly16x4x3_t

1.59.0 · source§

impl Clone for poly16x4x4_t

1.59.0 · source§

impl Clone for poly16x8_t

1.59.0 · source§

impl Clone for poly16x8x2_t

1.59.0 · source§

impl Clone for poly16x8x3_t

1.59.0 · source§

impl Clone for poly16x8x4_t

1.59.0 · source§

impl Clone for poly64x1_t

1.59.0 · source§

impl Clone for poly64x1x2_t

1.59.0 · source§

impl Clone for poly64x1x3_t

1.59.0 · source§

impl Clone for poly64x1x4_t

1.59.0 · source§

impl Clone for poly64x2_t

1.59.0 · source§

impl Clone for poly64x2x2_t

1.59.0 · source§

impl Clone for poly64x2x3_t

1.59.0 · source§

impl Clone for poly64x2x4_t

1.59.0 · source§

impl Clone for uint8x8_t

1.59.0 · source§

impl Clone for uint8x8x2_t

1.59.0 · source§

impl Clone for uint8x8x3_t

1.59.0 · source§

impl Clone for uint8x8x4_t

1.59.0 · source§

impl Clone for uint8x16_t

1.59.0 · source§

impl Clone for uint8x16x2_t

1.59.0 · source§

impl Clone for uint8x16x3_t

1.59.0 · source§

impl Clone for uint8x16x4_t

1.59.0 · source§

impl Clone for uint16x4_t

1.59.0 · source§

impl Clone for uint16x4x2_t

1.59.0 · source§

impl Clone for uint16x4x3_t

1.59.0 · source§

impl Clone for uint16x4x4_t

1.59.0 · source§

impl Clone for uint16x8_t

1.59.0 · source§

impl Clone for uint16x8x2_t

1.59.0 · source§

impl Clone for uint16x8x3_t

1.59.0 · source§

impl Clone for uint16x8x4_t

1.59.0 · source§

impl Clone for uint32x2_t

1.59.0 · source§

impl Clone for uint32x2x2_t

1.59.0 · source§

impl Clone for uint32x2x3_t

1.59.0 · source§

impl Clone for uint32x2x4_t

1.59.0 · source§

impl Clone for uint32x4_t

1.59.0 · source§

impl Clone for uint32x4x2_t

1.59.0 · source§

impl Clone for uint32x4x3_t

1.59.0 · source§

impl Clone for uint32x4x4_t

1.59.0 · source§

impl Clone for uint64x1_t

1.59.0 · source§

impl Clone for uint64x1x2_t

1.59.0 · source§

impl Clone for uint64x1x3_t

1.59.0 · source§

impl Clone for uint64x1x4_t

1.59.0 · source§

impl Clone for uint64x2_t

1.59.0 · source§

impl Clone for uint64x2x2_t

1.59.0 · source§

impl Clone for uint64x2x3_t

1.59.0 · source§

impl Clone for uint64x2x4_t

source§

impl Clone for vector_bool_char

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_bool_int

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_bool_short

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_float

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_signed_char

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_signed_int

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_signed_short

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_unsigned_char

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_unsigned_int

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_unsigned_short

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_bool_long

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_double

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_signed_long

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for vector_unsigned_long

Available on PowerPC or PowerPC-64 only.
source§

impl Clone for f32x2

source§

impl Clone for f32x4

source§

impl Clone for f32x8

source§

impl Clone for f32x16

source§

impl Clone for f64x1

source§

impl Clone for f64x2

source§

impl Clone for f64x4

source§

impl Clone for f64x8

source§

impl Clone for i8x2

source§

impl Clone for i8x4

source§

impl Clone for i8x8

source§

impl Clone for i8x16

source§

impl Clone for i8x32

source§

impl Clone for i8x64

source§

impl Clone for i16x2

source§

impl Clone for i16x4

source§

impl Clone for i16x8

source§

impl Clone for i16x16

source§

impl Clone for i16x32

source§

impl Clone for i32x2

source§

impl Clone for i32x4

source§

impl Clone for i32x8

source§

impl Clone for i32x16

source§

impl Clone for i64x1

source§

impl Clone for i64x2

source§

impl Clone for i64x4

source§

impl Clone for i64x8

source§

impl Clone for m8x16

source§

impl Clone for m16x8

source§

impl Clone for m32x4

source§

impl Clone for m64x2

source§

impl Clone for u8x2

source§

impl Clone for u8x4

source§

impl Clone for u8x8

source§

impl Clone for u8x16

source§

impl Clone for u8x32

source§

impl Clone for u8x64

source§

impl Clone for u16x2

source§

impl Clone for u16x4

source§

impl Clone for u16x8

source§

impl Clone for u16x16

source§

impl Clone for u16x32

source§

impl Clone for u32x2

source§

impl Clone for u32x4

source§

impl Clone for u32x8

source§

impl Clone for u32x16

source§

impl Clone for u64x1

source§

impl Clone for u64x2

source§

impl Clone for u64x4

source§

impl Clone for u64x8

1.54.0 · source§

impl Clone for v128

Available on target_family="wasm" only.
1.27.0 · source§

impl Clone for CpuidResult

Available on x86 or x86-64 only.
1.27.0 · source§

impl Clone for __m128

Available on x86 or x86-64 only.
source§

impl Clone for __m128bh

Available on x86 or x86-64 only.
1.27.0 · source§

impl Clone for __m128d

Available on x86 or x86-64 only.
1.27.0 · source§

impl Clone for __m128i

Available on x86 or x86-64 only.
1.27.0 · source§

impl Clone for __m256

Available on x86 or x86-64 only.
source§

impl Clone for __m256bh

Available on x86 or x86-64 only.
1.27.0 · source§

impl Clone for __m256d

Available on x86 or x86-64 only.
1.27.0 · source§

impl Clone for __m256i

Available on x86 or x86-64 only.
1.73.0-nightly · source§

impl Clone for __m512

Available on x86 or x86-64 only.
source§

impl Clone for __m512bh

Available on x86 or x86-64 only.
1.73.0-nightly · source§

impl Clone for __m512d

Available on x86 or x86-64 only.
1.73.0-nightly · source§

impl Clone for __m512i

Available on x86 or x86-64 only.
1.69.0 · source§

impl Clone for FromBytesUntilNulError

1.64.0 · source§

impl Clone for FromBytesWithNulError

source§

impl Clone for Binary

source§

impl Clone for LowerHex

source§

impl Clone for Octal

source§

impl Clone for UpperHex

source§

impl Clone for Placeholder

source§

impl Clone for Error

source§

impl Clone for Sip13Rounds

source§

impl Clone for Sip24Rounds

source§

impl Clone for SipHasher24

source§

impl Clone for SipHasher

source§

impl Clone for State

1.33.0 · source§

impl Clone for PhantomPinned

source§

impl Clone for Assume

source§

impl Clone for Ipv4Addr

source§

impl Clone for Ipv6Addr

source§

impl Clone for AddrParseError

source§

impl Clone for SocketAddrV4

source§

impl Clone for SocketAddrV6

source§

impl Clone for Big32x40

source§

impl Clone for Big8x3

source§

impl Clone for BiasedFp

source§

impl Clone for Decimal

source§

impl Clone for Number

source§

impl Clone for ParseIntError

1.34.0 · source§

impl Clone for TryFromIntError

source§

impl Clone for Decoded

1.34.0 · source§

impl Clone for NonZeroI8

1.34.0 · source§

impl Clone for NonZeroI16

1.34.0 · source§

impl Clone for NonZeroI32

1.34.0 · source§

impl Clone for NonZeroI64

1.34.0 · source§

impl Clone for NonZeroI128

1.34.0 · source§

impl Clone for NonZeroIsize

1.28.0 · source§

impl Clone for NonZeroU8

1.28.0 · source§

impl Clone for NonZeroU16

1.28.0 · source§

impl Clone for NonZeroU32

1.28.0 · source§

impl Clone for NonZeroU64

1.28.0 · source§

impl Clone for NonZeroU128

1.28.0 · source§

impl Clone for NonZeroUsize

source§

impl Clone for ParseFloatError

source§

impl Clone for IndexRange

source§

impl Clone for RangeFull

source§

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

source§

impl Clone for EscapeByte

source§

impl Clone for TimSortRun

source§

impl Clone for ParseBoolError

source§

impl Clone for Utf8Error

source§

impl Clone for EmptyNeedle

source§

impl Clone for TwoWaySearcher

source§

impl Clone for BytesIsNotEmpty

source§

impl Clone for CharEscapeDebugContinue

source§

impl Clone for CharEscapeDefault

source§

impl Clone for CharEscapeUnicode

source§

impl Clone for IsAsciiWhitespace

source§

impl Clone for IsNotEmpty

source§

impl Clone for IsWhitespace

source§

impl Clone for LinesMap

source§

impl Clone for UnsafeBytesToStr

1.36.0 · source§

impl Clone for RawWakerVTable

1.36.0 · source§

impl Clone for Waker

1.3.0 · source§

impl Clone for Duration

source§

impl Clone for Nanoseconds

1.66.0 · source§

impl Clone for TryFromFloatSecsError

source§

impl Clone for Span

source§

impl<'a> Clone for Part<'a>

source§

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

source§

impl<'a> Clone for Argument<'a>

source§

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

source§

impl<'a> Clone for Formatted<'a>

1.10.0 · source§

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

1.60.0 · source§

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

source§

impl<'a> Clone for 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 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>

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> 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, C: Clone + MultiCharEq> Clone for MultiCharEqSearcher<'a, C>

source§

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

1.5.0 · source§

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

source§

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

1.2.0 · source§

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

source§

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

1.5.0 · source§

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

1.2.0 · source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

1.51.0 · source§

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

1.31.0 · source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<A: Clone> Clone for Item<A>

source§

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

source§

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

1.55.0 · source§

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

source§

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

1.34.0 · source§

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

1.43.0 · source§

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

1.28.0 · source§

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

source§

impl<G: Clone> Clone for FromGenerator<G>

1.7.0 · source§

impl<H> Clone for BuildHasherDefault<H>

1.9.0 · source§

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

source§

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

1.29.0 · source§

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

source§

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

source§

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

source§

impl<I: Clone + Iterator, const N: usize> Clone for core::iter::adapters::array_chunks::ArrayChunks<I, N>where I::Item: Clone,

source§

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

1.1.0 · source§

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

1.36.0 · source§

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

source§

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

source§

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

source§

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

source§

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

1.28.0 · source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

1.57.0 · source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<I: Clone, U: Clone> Clone for FlattenCompat<I, U>

source§

impl<Idx: Clone> Clone for Range<Idx>

source§

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

1.26.0 · source§

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

source§

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

1.26.0 · source§

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

1.33.0 · source§

impl<P: Clone> Clone for Pin<P>

source§

impl<Ret, T> Clone for fn (T₁, T₂, …, Tₙ) -> Ret

This trait is implemented on function pointers with any number of arguments.

source§

impl<S: Sip> Clone for Hasher<S>

source§

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

1.48.0 · source§

impl<T> Clone for Pending<T>

1.2.0 · source§

impl<T> Clone for Empty<T>

1.21.0 · source§

impl<T> Clone for Discriminant<T>

source§

impl<T> Clone for core::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 core::slice::iter::Iter<'_, T>

1.31.0 · source§

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

source§

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

source§

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

1.27.0 · source§

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

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,

source§

impl<T, const LANES: usize> Clone for core::core_simd::masks::mask_impl::Mask<T, LANES>where T: MaskElement, LaneCount<LANES>: SupportedLaneCount,

source§

impl<T, const LANES: usize> Clone for core::core_simd::masks::Mask<T, LANES>where T: MaskElement, LaneCount<LANES>: SupportedLaneCount,

source§

impl<T, const N: usize> Clone for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement,

source§

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

source§

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

source§

impl<T: Copy> Clone for Unaligned<T>

Available on target_family="wasm" only.
1.36.0 · source§

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

1.20.0 · source§

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

1.17.0 · source§

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

1.36.0 · source§

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

source§

impl<T: Clone> Clone for (T₁, T₂, …, Tₙ)

This trait is implemented on arbitrary-length tuples.

1.70.0 · source§

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

source§

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

1.19.0 · source§

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

1.48.0 · source§

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

source§

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

1.2.0 · source§

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

source§

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

source§

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

source§

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

1.34.0 · source§

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

1.58.0 · source§

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

1.40.0 · source§

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

source§

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

Shared references can be cloned, but mutable references cannot!

source§

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

source§

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

source§

impl<T: ?Sized> Clone for &T

Shared references can be cloned, but mutable references cannot!

source§

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

source§

impl<T: ?Sized> Clone for PtrComponents<T>

1.25.0 · source§

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

source§

impl<Y: Clone, R: Clone> Clone for GeneratorState<Y, R>

source§

impl<const N: usize> Clone for EscapeIterInner<N>