Trait core::clone::Clone 1.0.0[−][src]
pub trait Clone: Sized { #[must_use = "cloning is often expensive and is not expected to have side effects"] fn clone(&self) -> Self; fn clone_from(&mut self, source: &Self) { ... } }
A common trait for the ability to explicitly duplicate an object.
Differs from Copy
in that Copy
is implicit and extremely inexpensive, 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, }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 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 } }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
) - Array types, for all sizes, if the item type also implements
Clone
(e.g.,[i32; 123456]
) - Tuple types, if each component also implements
Clone
(e.g.,()
,(i32, bool)
) - 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
#[must_use = "cloning is often expensive and is not expected to have side effects"]fn clone(&self) -> Self
[src]
Provided methods
fn clone_from(&mut self, source: &Self)
[src]
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
impl Clone for Infallible
1.34.0[src]
impl Clone for Infallible
1.34.0[src]fn clone(&self) -> Infallible
[src]
impl Clone for FpCategory
[src]
impl Clone for FpCategory
[src]fn clone(&self) -> FpCategory
[src]
impl Clone for IntErrorKind
[src]
impl Clone for IntErrorKind
[src]fn clone(&self) -> IntErrorKind
[src]
impl Clone for SearchStep
[src]
impl Clone for SearchStep
[src]fn clone(&self) -> SearchStep
[src]
impl Clone for AllocError
[src]
impl Clone for AllocError
[src]fn clone(&self) -> AllocError
[src]
impl Clone for LayoutError
1.50.0[src]
impl Clone for LayoutError
1.50.0[src]fn clone(&self) -> LayoutError
[src]
impl Clone for float64x1_t
[src]
impl Clone for float64x1_t
[src]fn clone(&self) -> float64x1_t
[src]
impl Clone for float64x2_t
[src]
impl Clone for float64x2_t
[src]fn clone(&self) -> float64x2_t
[src]
impl Clone for int8x16x2_t
[src]
impl Clone for int8x16x2_t
[src]fn clone(&self) -> int8x16x2_t
[src]
impl Clone for int8x16x3_t
[src]
impl Clone for int8x16x3_t
[src]fn clone(&self) -> int8x16x3_t
[src]
impl Clone for int8x16x4_t
[src]
impl Clone for int8x16x4_t
[src]fn clone(&self) -> int8x16x4_t
[src]
impl Clone for poly8x16x2_t
[src]
impl Clone for poly8x16x2_t
[src]fn clone(&self) -> poly8x16x2_t
[src]
impl Clone for poly8x16x3_t
[src]
impl Clone for poly8x16x3_t
[src]fn clone(&self) -> poly8x16x3_t
[src]
impl Clone for poly8x16x4_t
[src]
impl Clone for poly8x16x4_t
[src]fn clone(&self) -> poly8x16x4_t
[src]
impl Clone for uint8x16x2_t
[src]
impl Clone for uint8x16x2_t
[src]fn clone(&self) -> uint8x16x2_t
[src]
impl Clone for uint8x16x3_t
[src]
impl Clone for uint8x16x3_t
[src]fn clone(&self) -> uint8x16x3_t
[src]
impl Clone for uint8x16x4_t
[src]
impl Clone for uint8x16x4_t
[src]fn clone(&self) -> uint8x16x4_t
[src]
impl Clone for float32x2_t
[src]
impl Clone for float32x2_t
[src]fn clone(&self) -> float32x2_t
[src]
impl Clone for float32x4_t
[src]
impl Clone for float32x4_t
[src]fn clone(&self) -> float32x4_t
[src]
impl Clone for int8x8x2_t
[src]
impl Clone for int8x8x2_t
[src]fn clone(&self) -> int8x8x2_t
[src]
impl Clone for int8x8x3_t
[src]
impl Clone for int8x8x3_t
[src]fn clone(&self) -> int8x8x3_t
[src]
impl Clone for int8x8x4_t
[src]
impl Clone for int8x8x4_t
[src]fn clone(&self) -> int8x8x4_t
[src]
impl Clone for poly8x8x2_t
[src]
impl Clone for poly8x8x2_t
[src]fn clone(&self) -> poly8x8x2_t
[src]
impl Clone for poly8x8x3_t
[src]
impl Clone for poly8x8x3_t
[src]fn clone(&self) -> poly8x8x3_t
[src]
impl Clone for poly8x8x4_t
[src]
impl Clone for poly8x8x4_t
[src]fn clone(&self) -> poly8x8x4_t
[src]
impl Clone for poly8x16_t
[src]
impl Clone for poly8x16_t
[src]fn clone(&self) -> poly8x16_t
[src]
impl Clone for poly16x4_t
[src]
impl Clone for poly16x4_t
[src]fn clone(&self) -> poly16x4_t
[src]
impl Clone for poly16x8_t
[src]
impl Clone for poly16x8_t
[src]fn clone(&self) -> poly16x8_t
[src]
impl Clone for poly64x1_t
[src]
impl Clone for poly64x1_t
[src]fn clone(&self) -> poly64x1_t
[src]
impl Clone for poly64x2_t
[src]
impl Clone for poly64x2_t
[src]fn clone(&self) -> poly64x2_t
[src]
impl Clone for uint8x8x2_t
[src]
impl Clone for uint8x8x2_t
[src]fn clone(&self) -> uint8x8x2_t
[src]
impl Clone for uint8x8x3_t
[src]
impl Clone for uint8x8x3_t
[src]fn clone(&self) -> uint8x8x3_t
[src]
impl Clone for uint8x8x4_t
[src]
impl Clone for uint8x8x4_t
[src]fn clone(&self) -> uint8x8x4_t
[src]
impl Clone for uint8x16_t
[src]
impl Clone for uint8x16_t
[src]fn clone(&self) -> uint8x16_t
[src]
impl Clone for uint16x4_t
[src]
impl Clone for uint16x4_t
[src]fn clone(&self) -> uint16x4_t
[src]
impl Clone for uint16x8_t
[src]
impl Clone for uint16x8_t
[src]fn clone(&self) -> uint16x8_t
[src]
impl Clone for uint32x2_t
[src]
impl Clone for uint32x2_t
[src]fn clone(&self) -> uint32x2_t
[src]
impl Clone for uint32x4_t
[src]
impl Clone for uint32x4_t
[src]fn clone(&self) -> uint32x4_t
[src]
impl Clone for uint64x1_t
[src]
impl Clone for uint64x1_t
[src]fn clone(&self) -> uint64x1_t
[src]
impl Clone for uint64x2_t
[src]
impl Clone for uint64x2_t
[src]fn clone(&self) -> uint64x2_t
[src]
impl Clone for vector_bool_long
[src]
impl Clone for vector_bool_long
[src]fn clone(&self) -> vector_bool_long
[src]
impl Clone for vector_double
[src]
impl Clone for vector_double
[src]fn clone(&self) -> vector_double
[src]
impl Clone for vector_signed_long
[src]
impl Clone for vector_signed_long
[src]fn clone(&self) -> vector_signed_long
[src]
impl Clone for vector_unsigned_long
[src]
impl Clone for vector_unsigned_long
[src]fn clone(&self) -> vector_unsigned_long
[src]
impl Clone for CpuidResult
1.27.0[src]
impl Clone for CpuidResult
1.27.0[src]fn clone(&self) -> CpuidResult
[src]
impl Clone for TryFromSliceError
1.34.0[src]
impl Clone for TryFromSliceError
1.34.0[src]fn clone(&self) -> TryFromSliceError
[src]
impl Clone for core::ascii::EscapeDefault
[src]
impl Clone for core::ascii::EscapeDefault
[src]fn clone(&self) -> EscapeDefaultⓘNotable traits for EscapeDefault
impl Iterator for EscapeDefault type Item = u8;
[src]
Notable traits for EscapeDefault
impl Iterator for EscapeDefault type Item = u8;
impl Clone for CharTryFromError
1.34.0[src]
impl Clone for CharTryFromError
1.34.0[src]fn clone(&self) -> CharTryFromError
[src]
impl Clone for DecodeUtf16Error
1.9.0[src]
impl Clone for DecodeUtf16Error
1.9.0[src]fn clone(&self) -> DecodeUtf16Error
[src]
impl Clone for core::char::EscapeDebug
1.20.0[src]
impl Clone for core::char::EscapeDebug
1.20.0[src]fn clone(&self) -> EscapeDebugⓘNotable traits for EscapeDebug
impl Iterator for EscapeDebug type Item = char;
[src]
Notable traits for EscapeDebug
impl Iterator for EscapeDebug type Item = char;
impl Clone for core::char::EscapeDefault
[src]
impl Clone for core::char::EscapeDefault
[src]fn clone(&self) -> EscapeDefaultⓘNotable traits for EscapeDefault
impl Iterator for EscapeDefault type Item = char;
[src]
Notable traits for EscapeDefault
impl Iterator for EscapeDefault type Item = char;
impl Clone for core::char::EscapeUnicode
[src]
impl Clone for core::char::EscapeUnicode
[src]fn clone(&self) -> EscapeUnicodeⓘNotable traits for EscapeUnicode
impl Iterator for EscapeUnicode type Item = char;
[src]
Notable traits for EscapeUnicode
impl Iterator for EscapeUnicode type Item = char;
impl Clone for ParseCharError
1.20.0[src]
impl Clone for ParseCharError
1.20.0[src]fn clone(&self) -> ParseCharError
[src]
impl Clone for ToLowercase
[src]
impl Clone for ToLowercase
[src]fn clone(&self) -> ToLowercaseⓘNotable traits for ToLowercase
impl Iterator for ToLowercase type Item = char;
[src]
Notable traits for ToLowercase
impl Iterator for ToLowercase type Item = char;
impl Clone for ToUppercase
[src]
impl Clone for ToUppercase
[src]fn clone(&self) -> ToUppercaseⓘNotable traits for ToUppercase
impl Iterator for ToUppercase type Item = char;
[src]
Notable traits for ToUppercase
impl Iterator for ToUppercase type Item = char;
impl Clone for PhantomPinned
1.33.0[src]
impl Clone for PhantomPinned
1.33.0[src]fn clone(&self) -> PhantomPinned
[src]
impl Clone for NonZeroI16
1.34.0[src]
impl Clone for NonZeroI16
1.34.0[src]fn clone(&self) -> NonZeroI16
[src]
impl Clone for NonZeroI32
1.34.0[src]
impl Clone for NonZeroI32
1.34.0[src]fn clone(&self) -> NonZeroI32
[src]
impl Clone for NonZeroI64
1.34.0[src]
impl Clone for NonZeroI64
1.34.0[src]fn clone(&self) -> NonZeroI64
[src]
impl Clone for NonZeroI128
1.34.0[src]
impl Clone for NonZeroI128
1.34.0[src]fn clone(&self) -> NonZeroI128
[src]
impl Clone for NonZeroIsize
1.34.0[src]
impl Clone for NonZeroIsize
1.34.0[src]fn clone(&self) -> NonZeroIsize
[src]
impl Clone for NonZeroU16
1.28.0[src]
impl Clone for NonZeroU16
1.28.0[src]fn clone(&self) -> NonZeroU16
[src]
impl Clone for NonZeroU32
1.28.0[src]
impl Clone for NonZeroU32
1.28.0[src]fn clone(&self) -> NonZeroU32
[src]
impl Clone for NonZeroU64
1.28.0[src]
impl Clone for NonZeroU64
1.28.0[src]fn clone(&self) -> NonZeroU64
[src]
impl Clone for NonZeroU128
1.28.0[src]
impl Clone for NonZeroU128
1.28.0[src]fn clone(&self) -> NonZeroU128
[src]
impl Clone for NonZeroUsize
1.28.0[src]
impl Clone for NonZeroUsize
1.28.0[src]fn clone(&self) -> NonZeroUsize
[src]
impl Clone for ParseFloatError
[src]
impl Clone for ParseFloatError
[src]fn clone(&self) -> ParseFloatError
[src]
impl Clone for ParseIntError
[src]
impl Clone for ParseIntError
[src]fn clone(&self) -> ParseIntError
[src]
impl Clone for TryFromIntError
1.34.0[src]
impl Clone for TryFromIntError
1.34.0[src]fn clone(&self) -> TryFromIntError
[src]
impl Clone for TraitObject
[src]
impl Clone for TraitObject
[src]fn clone(&self) -> TraitObject
[src]
impl Clone for ParseBoolError
[src]
impl Clone for ParseBoolError
[src]fn clone(&self) -> ParseBoolError
[src]
impl Clone for RawWakerVTable
1.36.0[src]
impl Clone for RawWakerVTable
1.36.0[src]fn clone(&self) -> RawWakerVTable
[src]
impl<'a> Clone for EscapeAscii<'a>
[src]
impl<'a> Clone for EscapeAscii<'a>
[src]fn clone(&self) -> EscapeAscii<'a>ⓘNotable traits for EscapeAscii<'a>
impl<'a> Iterator for EscapeAscii<'a> type Item = u8;
[src]
Notable traits for EscapeAscii<'a>
impl<'a> Iterator for EscapeAscii<'a> type Item = u8;
impl<'a> Clone for CharSearcher<'a>
[src]
impl<'a> Clone for CharSearcher<'a>
[src]fn clone(&self) -> CharSearcher<'a>
[src]
impl<'a> Clone for CharIndices<'a>
[src]
impl<'a> Clone for CharIndices<'a>
[src]fn clone(&self) -> CharIndices<'a>ⓘNotable traits for CharIndices<'a>
impl<'a> Iterator for CharIndices<'a> type Item = (usize, char);
[src]
Notable traits for CharIndices<'a>
impl<'a> Iterator for CharIndices<'a> type Item = (usize, char);
impl<'a> Clone for EncodeUtf16<'a>
1.8.0[src]
impl<'a> Clone for EncodeUtf16<'a>
1.8.0[src]fn clone(&self) -> EncodeUtf16<'a>ⓘNotable traits for EncodeUtf16<'a>
impl<'a> Iterator for EncodeUtf16<'a> type Item = u16;
[src]
Notable traits for EncodeUtf16<'a>
impl<'a> Iterator for EncodeUtf16<'a> type Item = u16;
impl<'a> Clone for core::str::EscapeDebug<'a>
1.34.0[src]
impl<'a> Clone for core::str::EscapeDebug<'a>
1.34.0[src]fn clone(&self) -> EscapeDebug<'a>ⓘNotable traits for EscapeDebug<'a>
impl<'a> Iterator for EscapeDebug<'a> type Item = char;
[src]
Notable traits for EscapeDebug<'a>
impl<'a> Iterator for EscapeDebug<'a> type Item = char;
impl<'a> Clone for core::str::EscapeDefault<'a>
1.34.0[src]
impl<'a> Clone for core::str::EscapeDefault<'a>
1.34.0[src]fn clone(&self) -> EscapeDefault<'a>ⓘNotable traits for EscapeDefault<'a>
impl<'a> Iterator for EscapeDefault<'a> type Item = char;
[src]
Notable traits for EscapeDefault<'a>
impl<'a> Iterator for EscapeDefault<'a> type Item = char;
impl<'a> Clone for core::str::EscapeUnicode<'a>
1.34.0[src]
impl<'a> Clone for core::str::EscapeUnicode<'a>
1.34.0[src]fn clone(&self) -> EscapeUnicode<'a>ⓘNotable traits for EscapeUnicode<'a>
impl<'a> Iterator for EscapeUnicode<'a> type Item = char;
[src]
Notable traits for EscapeUnicode<'a>
impl<'a> Iterator for EscapeUnicode<'a> type Item = char;
impl<'a> Clone for SplitAsciiWhitespace<'a>
1.34.0[src]
impl<'a> Clone for SplitAsciiWhitespace<'a>
1.34.0[src]fn clone(&self) -> SplitAsciiWhitespace<'a>ⓘNotable traits for SplitAsciiWhitespace<'a>
impl<'a> Iterator for SplitAsciiWhitespace<'a> type Item = &'a str;
[src]
Notable traits for SplitAsciiWhitespace<'a>
impl<'a> Iterator for SplitAsciiWhitespace<'a> type Item = &'a str;
impl<'a> Clone for SplitWhitespace<'a>
1.1.0[src]
impl<'a> Clone for SplitWhitespace<'a>
1.1.0[src]fn clone(&self) -> SplitWhitespace<'a>ⓘNotable traits for SplitWhitespace<'a>
impl<'a> Iterator for SplitWhitespace<'a> type Item = &'a str;
[src]
Notable traits for SplitWhitespace<'a>
impl<'a> Iterator for SplitWhitespace<'a> type Item = &'a str;
impl<'a, 'b> Clone for CharSliceSearcher<'a, 'b>
[src]
impl<'a, 'b> Clone for CharSliceSearcher<'a, 'b>
[src]fn clone(&self) -> CharSliceSearcher<'a, 'b>
[src]
impl<'a, 'b> Clone for StrSearcher<'a, 'b>
[src]
impl<'a, 'b> Clone for StrSearcher<'a, 'b>
[src]fn clone(&self) -> StrSearcher<'a, 'b>
[src]
impl<'a, F: Clone> Clone for CharPredicateSearcher<'a, F> where
F: FnMut(char) -> bool,
[src]
impl<'a, F: Clone> Clone for CharPredicateSearcher<'a, F> where
F: FnMut(char) -> bool,
[src]fn clone(&self) -> CharPredicateSearcher<'a, F>
[src]
impl<'a, P> Clone for MatchIndices<'a, P> where
P: Pattern<'a, Searcher: Clone>,
1.5.0[src]
impl<'a, P> Clone for MatchIndices<'a, P> where
P: Pattern<'a, Searcher: Clone>,
1.5.0[src]impl<'a, P> Clone for RMatchIndices<'a, P> where
P: Pattern<'a, Searcher: Clone>,
1.5.0[src]
impl<'a, P> Clone for RMatchIndices<'a, P> where
P: Pattern<'a, Searcher: Clone>,
1.5.0[src]impl<'a, P> Clone for RSplitTerminator<'a, P> where
P: Pattern<'a, Searcher: Clone>,
[src]
impl<'a, P> Clone for RSplitTerminator<'a, P> where
P: Pattern<'a, Searcher: Clone>,
[src]impl<'a, P> Clone for SplitTerminator<'a, P> where
P: Pattern<'a, Searcher: Clone>,
[src]
impl<'a, P> Clone for SplitTerminator<'a, P> where
P: Pattern<'a, Searcher: Clone>,
[src]impl<'a, P: Pattern<'a, Searcher: Clone>> Clone for core::str::SplitInclusive<'a, P>
1.51.0[src]
impl<'a, P: Pattern<'a, Searcher: Clone>> Clone for core::str::SplitInclusive<'a, P>
1.51.0[src]impl<'a, T> Clone for RChunksExact<'a, T>
1.31.0[src]
impl<'a, T> Clone for RChunksExact<'a, T>
1.31.0[src]fn clone(&self) -> RChunksExact<'a, T>ⓘNotable traits for RChunksExact<'a, T>
impl<'a, T> Iterator for RChunksExact<'a, T> type Item = &'a [T];
[src]
Notable traits for RChunksExact<'a, T>
impl<'a, T> Iterator for RChunksExact<'a, T> type Item = &'a [T];
impl<'a, T: Clone + 'a, P: Clone> Clone for core::slice::RSplit<'a, T, P> where
P: FnMut(&T) -> bool,
1.27.0[src]
impl<'a, T: Clone + 'a, P: Clone> Clone for core::slice::RSplit<'a, T, P> where
P: FnMut(&T) -> bool,
1.27.0[src]impl<'a, T: Clone + 'a, const N: usize> Clone for ArrayWindows<'a, T, N>
[src]
impl<'a, T: Clone + 'a, const N: usize> Clone for ArrayWindows<'a, T, N>
[src]fn clone(&self) -> ArrayWindows<'a, T, N>ⓘNotable traits for ArrayWindows<'a, T, N>
impl<'a, T, const N: usize> Iterator for ArrayWindows<'a, T, N> type Item = &'a [T; N];
[src]
Notable traits for ArrayWindows<'a, T, N>
impl<'a, T, const N: usize> Iterator for ArrayWindows<'a, T, N> type Item = &'a [T; N];
impl<'f> Clone for VaListImpl<'f>
[src]
impl<'f> Clone for VaListImpl<'f>
[src]impl<B: Clone, C: Clone> Clone for ControlFlow<B, C>
[src]
impl<B: Clone, C: Clone> Clone for ControlFlow<B, C>
[src]fn clone(&self) -> ControlFlow<B, C>
[src]
impl<F: Clone> Clone for RepeatWith<F>
1.28.0[src]
impl<F: Clone> Clone for RepeatWith<F>
1.28.0[src]fn clone(&self) -> RepeatWith<F>ⓘNotable traits for RepeatWith<F>
impl<A, F: FnMut() -> A> Iterator for RepeatWith<F> type Item = A;
[src]
Notable traits for RepeatWith<F>
impl<A, F: FnMut() -> A> Iterator for RepeatWith<F> type Item = A;
impl<H> Clone for BuildHasherDefault<H>
1.7.0[src]
impl<H> Clone for BuildHasherDefault<H>
1.7.0[src]fn clone(&self) -> BuildHasherDefault<H>
[src]
impl<I, G> Clone for IntersperseWith<I, G> where
I: Iterator + Clone,
I::Item: Clone,
G: Clone,
[src]
impl<I, G> Clone for IntersperseWith<I, G> where
I: Iterator + Clone,
I::Item: Clone,
G: Clone,
[src]impl<I, U> Clone for Flatten<I> where
I: Clone + Iterator<Item: IntoIterator<IntoIter = U, Item = U::Item>>,
U: Clone + Iterator,
1.29.0[src]
impl<I, U> Clone for Flatten<I> where
I: Clone + Iterator<Item: IntoIterator<IntoIter = U, Item = U::Item>>,
U: Clone + Iterator,
1.29.0[src]impl<I: Clone + Iterator> Clone for Intersperse<I> where
I::Item: Clone,
I::Item: Clone,
[src]
impl<I: Clone + Iterator> Clone for Intersperse<I> where
I::Item: Clone,
I::Item: Clone,
[src]fn clone(&self) -> Intersperse<I>ⓘNotable traits for Intersperse<I>
impl<I> Iterator for Intersperse<I> where
I: Iterator,
I::Item: Clone, type Item = I::Item;
[src]
Notable traits for Intersperse<I>
impl<I> Iterator for Intersperse<I> where
I: Iterator,
I::Item: Clone, type Item = I::Item;
impl<I: Clone> Clone for DecodeUtf16<I> where
I: Iterator<Item = u16>,
1.9.0[src]
impl<I: Clone> Clone for DecodeUtf16<I> where
I: Iterator<Item = u16>,
1.9.0[src]fn clone(&self) -> DecodeUtf16<I>ⓘNotable traits for DecodeUtf16<I>
impl<I: Iterator<Item = u16>> Iterator for DecodeUtf16<I> type Item = Result<char, DecodeUtf16Error>;
[src]
Notable traits for DecodeUtf16<I>
impl<I: Iterator<Item = u16>> Iterator for DecodeUtf16<I> type Item = Result<char, DecodeUtf16Error>;
impl<I: Clone, U, F: Clone> Clone for FlatMap<I, U, F> where
U: Clone + IntoIterator<IntoIter: Clone>,
[src]
impl<I: Clone, U, F: Clone> Clone for FlatMap<I, U, F> where
U: Clone + IntoIterator<IntoIter: Clone>,
[src]impl<Idx: Clone> Clone for RangeInclusive<Idx>
1.26.0[src]
impl<Idx: Clone> Clone for RangeInclusive<Idx>
1.26.0[src]fn clone(&self) -> RangeInclusive<Idx>ⓘNotable traits for RangeInclusive<A>
impl<A: Step> Iterator for RangeInclusive<A> type Item = A;
[src]
Notable traits for RangeInclusive<A>
impl<A: Step> Iterator for RangeInclusive<A> type Item = A;
impl<Idx: Clone> Clone for RangeToInclusive<Idx>
1.26.0[src]
impl<Idx: Clone> Clone for RangeToInclusive<Idx>
1.26.0[src]fn clone(&self) -> RangeToInclusive<Idx>
[src]
impl<T> Clone for Discriminant<T>
1.21.0[src]
impl<T> Clone for Discriminant<T>
1.21.0[src]impl<T> Clone for ChunksExact<'_, T>
1.31.0[src]
impl<T> Clone for ChunksExact<'_, T>
1.31.0[src]impl<T, P> Clone for core::slice::SplitInclusive<'_, T, P> where
P: Clone + FnMut(&T) -> bool,
1.51.0[src]
impl<T, P> Clone for core::slice::SplitInclusive<'_, T, P> where
P: Clone + FnMut(&T) -> bool,
1.51.0[src]impl<T, const N: usize> Clone for ArrayChunks<'_, T, N>
[src]
impl<T, const N: usize> Clone for ArrayChunks<'_, T, N>
[src]impl<T: Clone + ?Sized> Clone for ManuallyDrop<T>
1.20.0[src]
impl<T: Clone + ?Sized> Clone for ManuallyDrop<T>
1.20.0[src]fn clone(&self) -> ManuallyDrop<T>
[src]
impl<T: Clone> Clone for Option<T>
[src]
impl<T: Clone> Clone for Option<T>
[src]fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
[src]
impl<T: Clone, E: Clone> Clone for Result<T, E>
[src]
impl<T: Clone, E: Clone> Clone for Result<T, E>
[src]fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
[src]
impl<T: Clone, F: Clone> Clone for Successors<T, F>
1.34.0[src]
impl<T: Clone, F: Clone> Clone for Successors<T, F>
1.34.0[src]fn clone(&self) -> Successors<T, F>ⓘNotable traits for Successors<T, F>
impl<T, F> Iterator for Successors<T, F> where
F: FnMut(&T) -> Option<T>, type Item = T;
[src]
Notable traits for Successors<T, F>
impl<T, F> Iterator for Successors<T, F> where
F: FnMut(&T) -> Option<T>, type Item = T;
impl<T: ?Sized> !Clone for &mut T
[src]
Shared references can be cloned, but mutable references cannot!
impl<Y: Clone, R: Clone> Clone for GeneratorState<Y, R>
[src]
impl<Y: Clone, R: Clone> Clone for GeneratorState<Y, R>
[src]