Trait gstd::prelude::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,
}

§How can I implement Clone?

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

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

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

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

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

If we derive:

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

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


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

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

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

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

struct NotCloneable;

fn generate_not_cloneable() -> NotCloneable {
    NotCloneable
}

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

§Additional implementors

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

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

Required Methods§

1.0.0 · source

fn clone(&self) -> Self

Returns a copy of the value.

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

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

Provided Methods§

1.0.0 · source

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

Performs copy-assignment from source.

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

Object Safety§

This trait is not object safe.

Implementors§

§

impl Clone for ConversionError

source§

impl Clone for gstd::errors::CoreError

source§

impl Clone for gstd::errors::Error

source§

impl Clone for ErrorReplyReason

source§

impl Clone for ExecutionError

source§

impl Clone for ExtError

source§

impl Clone for MemoryError

source§

impl Clone for MessageError

source§

impl Clone for ReplyCode

source§

impl Clone for ReservationError

source§

impl Clone for SignalCode

source§

impl Clone for SimpleExecutionError

source§

impl Clone for SimpleProgramCreationError

source§

impl Clone for SuccessReplyReason

source§

impl Clone for UsageError

source§

impl Clone for AsciiChar

1.0.0 · source§

impl Clone for gstd::prelude::cmp::Ordering

source§

impl Clone for TryReserveErrorKind

§

impl Clone for gstd::prelude::collections::hashbrown::TryReserveError

1.34.0 · source§

impl Clone for Infallible

1.28.0 · source§

impl Clone for gstd::prelude::fmt::Alignment

1.0.0 · source§

impl Clone for FpCategory

1.55.0 · source§

impl Clone for IntErrorKind

source§

impl Clone for SearchStep

1.7.0 · source§

impl Clone for IpAddr

source§

impl Clone for Ipv6MulticastScope

1.0.0 · source§

impl Clone for SocketAddr

1.0.0 · source§

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

source§

impl Clone for hex::error::FromHexError

1.0.0 · source§

impl Clone for bool

1.0.0 · source§

impl Clone for char

1.0.0 · source§

impl Clone for f16

1.0.0 · source§

impl Clone for f32

1.0.0 · source§

impl Clone for f64

1.0.0 · source§

impl Clone for f128

1.0.0 · source§

impl Clone for i8

1.0.0 · source§

impl Clone for i16

1.0.0 · source§

impl Clone for i32

1.0.0 · source§

impl Clone for i64

1.0.0 · source§

impl Clone for i128

1.0.0 · source§

impl Clone for isize

source§

impl Clone for !

1.0.0 · source§

impl Clone for u8

1.0.0 · source§

impl Clone for u16

1.0.0 · source§

impl Clone for u32

1.0.0 · source§

impl Clone for u64

1.0.0 · source§

impl Clone for u128

1.0.0 · source§

impl Clone for usize

§

impl Clone for gstd::errors::CodecError

source§

impl Clone for ErrorReplyPayload

source§

impl Clone for SyscallError

source§

impl Clone for gstd::msg::MessageHandle

§

impl Clone for ActorId

§

impl Clone for CodeId

§

impl Clone for EnvVars

§

impl Clone for GasMultiplier

§

impl Clone for MessageId

§

impl Clone for Percent

source§

impl Clone for Reservation

§

impl Clone for ReservationId

source§

impl Clone for Reservations

§

impl Clone for MetaType

1.0.0 · source§

impl Clone for TypeId

1.34.0 · source§

impl Clone for TryFromSliceError

1.0.0 · source§

impl Clone for gstd::prelude::ascii::EscapeDefault

1.34.0 · source§

impl Clone for CharTryFromError

1.9.0 · source§

impl Clone for DecodeUtf16Error

1.20.0 · source§

impl Clone for gstd::prelude::char::EscapeDebug

1.0.0 · source§

impl Clone for gstd::prelude::char::EscapeDefault

1.0.0 · source§

impl Clone for gstd::prelude::char::EscapeUnicode

1.20.0 · source§

impl Clone for ParseCharError

1.0.0 · source§

impl Clone for ToLowercase

1.0.0 · source§

impl Clone for ToUppercase

1.59.0 · source§

impl Clone for TryFromCharError

source§

impl Clone for UnorderedKeyError

1.57.0 · source§

impl Clone for gstd::prelude::collections::TryReserveError

1.64.0 · source§

impl Clone for CString

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

impl Clone for gstd::prelude::fmt::Error

1.0.0 · source§

impl Clone for SipHasher

1.33.0 · source§

impl Clone for PhantomPinned

source§

impl Clone for Assume

1.0.0 · source§

impl Clone for ParseFloatError

1.0.0 · source§

impl Clone for ParseIntError

1.34.0 · source§

impl Clone for TryFromIntError

1.0.0 · source§

impl Clone for RangeFull

source§

impl Clone for gstd::prelude::ptr::Alignment

1.0.0 · source§

impl Clone for ParseBoolError

1.0.0 · source§

impl Clone for Utf8Error

1.0.0 · source§

impl Clone for FromUtf8Error

1.3.0 · source§

impl Clone for gstd::prelude::Box<str>

1.29.0 · source§

impl Clone for gstd::prelude::Box<CStr>

1.0.0 · source§

impl Clone for String

source§

impl Clone for LocalWaker

1.36.0 · source§

impl Clone for RawWakerVTable

1.36.0 · source§

impl Clone for Waker

1.3.0 · source§

impl Clone for Duration

1.66.0 · source§

impl Clone for TryFromFloatSecsError

source§

impl Clone for alloc::alloc::Global

1.28.0 · source§

impl Clone for Layout

1.50.0 · source§

impl Clone for LayoutError

source§

impl Clone for core::alloc::AllocError

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

1.0.0 · source§

impl Clone for Ipv4Addr

1.0.0 · source§

impl Clone for Ipv6Addr

1.0.0 · source§

impl Clone for AddrParseError

1.0.0 · source§

impl Clone for SocketAddrV4

1.0.0 · source§

impl Clone for SocketAddrV6

source§

impl Clone for Choice

source§

impl Clone for ATerm

source§

impl Clone for B0

source§

impl Clone for B1

source§

impl Clone for Z0

source§

impl Clone for Equal

source§

impl Clone for Greater

source§

impl Clone for Less

source§

impl Clone for UTerm

§

impl Clone for AHasher

§

impl Clone for AbortHandle

§

impl Clone for Aborted

§

impl Clone for AllocError

§

impl Clone for Alphabet

§

impl Clone for BigEndian

§

impl Clone for Blake2bVarCore

§

impl Clone for Blake2sVarCore

§

impl Clone for Box<str>

§

impl Clone for Box<CStr>

§

impl Clone for Canceled

§

impl Clone for Eager

§

impl Clone for Error

§

impl Clone for Error

§

impl Clone for Error

§

impl Clone for Error

§

impl Clone for Error

§

impl Clone for FromHexError

§

impl Clone for FromStrRadixErrKind

§

impl Clone for Global

§

impl Clone for H128

§

impl Clone for H160

§

impl Clone for H256

§

impl Clone for H384

§

impl Clone for H512

§

impl Clone for H768

§

impl Clone for HashWithValue

§

impl Clone for InvalidBufferSize

§

impl Clone for InvalidLength

§

impl Clone for InvalidOutputSize

§

impl Clone for Lazy

§

impl Clone for LittleEndian

§

impl Clone for MacError

§

impl Clone for MessageHandle

§

impl Clone for MetaForm

§

impl Clone for NonZeroU256

§

impl Clone for OptionBool

§

impl Clone for PollNext

§

impl Clone for PortableForm

§

impl Clone for PortableRegistry

§

impl Clone for PortableType

§

impl Clone for RandomState

§

impl Clone for TruncSide

§

impl Clone for TypeDefPrimitive

§

impl Clone for U128

§

impl Clone for U256

§

impl Clone for U512

source§

impl<'a> Clone for gstd::prelude::ffi::c_str::Bytes<'a>

1.0.0 · source§

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

1.0.0 · source§

impl<'a> Clone for gstd::prelude::str::Bytes<'a>

1.0.0 · source§

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

1.0.0 · source§

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

1.8.0 · source§

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

1.34.0 · source§

impl<'a> Clone for gstd::prelude::str::EscapeDebug<'a>

1.34.0 · source§

impl<'a> Clone for gstd::prelude::str::EscapeDefault<'a>

1.34.0 · source§

impl<'a> Clone for gstd::prelude::str::EscapeUnicode<'a>

1.0.0 · source§

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

1.0.0 · source§

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

1.34.0 · source§

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

1.1.0 · source§

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

1.79.0 · source§

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

1.79.0 · source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

1.5.0 · source§

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

1.2.0 · source§

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

1.5.0 · source§

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

1.2.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.51.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.31.0 · source§

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

§

impl<'a, T> Clone for CompactRef<'a, T>
where T: Clone,

§

impl<'a, T> Clone for Ptr<'a, T>
where T: ?Sized,

§

impl<'a, T> Clone for Symbol<'a, T>
where T: Clone + 'a,

source§

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

source§

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

source§

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

1.0.0 · source§

impl<A> Clone for gstd::prelude::iter::Repeat<A>
where A: Clone,

source§

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

1.0.0 · source§

impl<A> Clone for gstd::prelude::option::IntoIter<A>
where A: Clone,

1.0.0 · source§

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

source§

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

source§

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

source§

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

1.0.0 · source§

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

1.0.0 · source§

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

§

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

1.0.0 · 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,

§

impl<BlockSize, Kind> Clone for BlockBuffer<BlockSize, Kind>
where BlockSize: ArrayLength<u8> + IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>, <BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero, Kind: BufferKind,

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 gstd::prelude::iter::RepeatWith<F>
where F: Clone,

§

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

§

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

1.7.0 · source§

impl<H> Clone for BuildHasherDefault<H>

1.9.0 · source§

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

1.1.0 · source§

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

1.36.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.28.0 · source§

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

1.0.0 · source§

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

source§

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

§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

source§

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

source§

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

1.0.0 · source§

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

1.57.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.29.0 · source§

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

1.0.0 · source§

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

source§

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

1.0.0 · source§

impl<Idx> Clone for gstd::prelude::ops::Range<Idx>
where Idx: Clone,

1.0.0 · source§

impl<Idx> Clone for gstd::prelude::ops::RangeFrom<Idx>
where Idx: Clone,

1.26.0 · source§

impl<Idx> Clone for gstd::prelude::ops::RangeInclusive<Idx>
where Idx: Clone,

1.0.0 · source§

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

1.26.0 · source§

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

source§

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

source§

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

source§

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

§

impl<K> Clone for gstd::prelude::collections::hash_set::Iter<'_, K>

source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.17.0 · source§

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

1.0.0 · source§

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

§

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

§

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

§

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

1.0.0 · source§

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

§

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

§

impl<OutSize> Clone for Blake2bMac<OutSize>
where OutSize: Clone + ArrayLength<u8> + IsLessOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>, <OutSize as IsLessOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,

§

impl<OutSize> Clone for Blake2sMac<OutSize>
where OutSize: Clone + ArrayLength<u8> + IsLessOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>, <OutSize as IsLessOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,

1.33.0 · source§

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

§

impl<S> Clone for PollImmediate<S>
where S: Clone,

§

impl<Si, F> Clone for SinkMapErr<Si, F>
where Si: Clone, F: Clone,

§

impl<Si, Item, U, Fut, F> Clone for With<Si, Item, U, Fut, F>
where Si: Clone, F: Clone, Fut: Clone,

1.0.0 · source§

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

Shared references can be cloned, but mutable references cannot!

1.0.0 · source§

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

1.17.0 · source§

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

1.36.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

Shared references can be cloned, but mutable references cannot!

1.0.0 · source§

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

1.70.0 · source§

impl<T> Clone for gstd::prelude::cell::OnceCell<T>
where T: Clone,

1.0.0 · source§

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

1.19.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.17.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.48.0 · source§

impl<T> Clone for gstd::prelude::future::Pending<T>

1.48.0 · source§

impl<T> Clone for gstd::prelude::future::Ready<T>
where T: Clone,

1.2.0 · source§

impl<T> Clone for gstd::prelude::iter::Empty<T>

1.2.0 · source§

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

1.0.0 · source§

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

1.0.0 · 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,

1.0.0 · source§

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

1.25.0 · source§

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

1.0.0 · source§

impl<T> Clone for gstd::prelude::result::IntoIter<T>
where T: Clone,

1.0.0 · source§

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

1.0.0 · source§

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

1.31.0 · source§

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

1.0.0 · source§

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

1.31.0 · source§

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

1.0.0 · source§

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

source§

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

source§

impl<T> Clone for BlackBox<T>
where T: Clone + Copy,

source§

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

1.36.0 · source§

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

§

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

§

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

§

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

§

impl<T> Clone for CoreWrapper<T>
where T: Clone + BufferKindUser, <T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>> + Clone, <<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero, <T as BufferKindUser>::BufferKind: Clone,

§

impl<T> Clone for CtOutput<T>
where T: Clone + OutputSizeUser,

§

impl<T> Clone for Drain<T>

§

impl<T> Clone for Empty<T>

§

impl<T> Clone for Field<T>
where T: Clone + Form, <T as Form>::String: Clone, <T as Form>::Type: Clone,

§

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

§

impl<T> Clone for Path<T>
where T: Clone + Form, <T as Form>::String: Clone,

§

impl<T> Clone for Pending<T>

§

impl<T> Clone for Pending<T>

§

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

§

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

§

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

§

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

§

impl<T> Clone for RtVariableCoreWrapper<T>
where T: Clone + VariableOutputCore + UpdateCore, <T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>> + Clone, <<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero, <T as BufferKindUser>::BufferKind: Clone,

§

impl<T> Clone for Type<T>
where T: Clone + Form, <T as Form>::String: Clone,

§

impl<T> Clone for TypeDef<T>
where T: Clone + Form,

§

impl<T> Clone for TypeDefArray<T>
where T: Clone + Form, <T as Form>::Type: Clone,

§

impl<T> Clone for TypeDefBitSequence<T>
where T: Clone + Form, <T as Form>::Type: Clone,

§

impl<T> Clone for TypeDefCompact<T>
where T: Clone + Form, <T as Form>::Type: Clone,

§

impl<T> Clone for TypeDefComposite<T>
where T: Clone + Form,

§

impl<T> Clone for TypeDefSequence<T>
where T: Clone + Form, <T as Form>::Type: Clone,

§

impl<T> Clone for TypeDefTuple<T>
where T: Clone + Form, <T as Form>::Type: Clone,

§

impl<T> Clone for TypeDefVariant<T>
where T: Clone + Form,

§

impl<T> Clone for TypeParameter<T>
where T: Clone + Form, <T as Form>::String: Clone, <T as Form>::Type: Clone,

§

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

§

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

§

impl<T> Clone for Variant<T>
where T: Clone + Form, <T as Form>::String: Clone,

§

impl<T> Clone for XofReaderCoreWrapper<T>
where T: Clone + XofReaderCore, <T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>> + Clone, <<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,

1.0.0 · source§

impl<T, A> Clone for gstd::prelude::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,

1.0.0 · source§

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

1.0.0 · source§

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

source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.4.0 · source§

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

1.3.0 · source§

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

1.0.0 · source§

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

1.0.0 · source§

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

1.8.0 · source§

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

1.0.0 · source§

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

1.4.0 · source§

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

§

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

§

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

§

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

§

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

§

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

1.0.0 · source§

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

1.34.0 · source§

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

§

impl<T, N> Clone for GenericArray<T, N>
where T: Clone, N: ArrayLength<T>,

§

impl<T, N> Clone for GenericArrayIter<T, N>
where T: Clone, N: ArrayLength<T>,

§

impl<T, OutSize, O> Clone for CtVariableCoreWrapper<T, OutSize, O>
where T: Clone + VariableOutputCore, OutSize: Clone + ArrayLength<u8> + IsLessOrEqual<<T as OutputSizeUser>::OutputSize>, O: Clone, <OutSize as IsLessOrEqual<<T as OutputSizeUser>::OutputSize>>::Output: NonZero, <T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>, <<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,

1.27.0 · source§

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

1.0.0 · source§

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

1.51.0 · source§

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

§

impl<T, S, A> Clone for gstd::prelude::collections::hash_set::Difference<'_, T, S, A>
where A: Allocator,

§

impl<T, S, A> Clone for gstd::prelude::collections::hash_set::Intersection<'_, T, S, A>
where A: Allocator,

§

impl<T, S, A> Clone for gstd::prelude::collections::hash_set::SymmetricDifference<'_, T, S, A>
where A: Allocator,

§

impl<T, S, A> Clone for gstd::prelude::collections::hash_set::Union<'_, T, S, A>
where A: Allocator,

§

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

source§

impl<T, const CAP: usize> Clone for ArrayVec<T, CAP>
where T: Clone,

source§

impl<T, const CAP: usize> Clone for arrayvec::arrayvec::IntoIter<T, CAP>
where T: Clone,

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 gstd::prelude::array::IntoIter<T, N>
where T: Clone,

source§

impl<T, const N: usize> Clone for gstd::prelude::slice::ArrayChunks<'_, T, N>

source§

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

source§

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

source§

impl<U> Clone for NInt<U>
where U: Clone + Unsigned + NonZero,

source§

impl<U> Clone for PInt<U>
where U: Clone + Unsigned + NonZero,

source§

impl<U, B> Clone for UInt<U, B>
where U: Clone, B: Clone,

source§

impl<V, A> Clone for TArr<V, A>
where V: Clone, A: Clone,

source§

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

source§

impl<const CAP: usize> Clone for ArrayString<CAP>