Trait std::clone::Clone[src]
pub trait Clone {
fn clone(&self) -> Self;
fn clone_from(&mut self, source: &Self) { ... }
}A common trait for cloning an object.
Required Methods
fn clone(&self) -> Self
Returns a copy of the value. The contents of owned pointers are copied to maintain uniqueness, while the contents of managed pointers are not copied.
Provided Methods
fn clone_from(&mut self, source: &Self)
Perform 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 Asciiimpl<T> Clone for Gc<T>impl<T> Clone for *Timpl<T> Clone for *mut Timpl<T: Clone> Clone for CovariantType<T>impl<T: Clone> Clone for ContravariantType<T>impl<T: Clone> Clone for InvariantType<T>impl<'a> Clone for CovariantLifetime<'a>impl<'a> Clone for ContravariantLifetime<'a>impl<'a> Clone for InvariantLifetime<'a>impl Clone for NoSendimpl Clone for NoCopyimpl Clone for NoShareimpl Clone for Managedimpl Clone for Orderingimpl<'a, T> Clone for &'a Timpl<'a, T> Clone for &'a [T]impl<'a> Clone for &'a strimpl Clone for intimpl Clone for i8impl Clone for i16impl Clone for i32impl Clone for i64impl Clone for uintimpl Clone for u8impl Clone for u16impl Clone for u32impl Clone for u64impl Clone for f32impl Clone for f64impl Clone for ()impl Clone for boolimpl Clone for charimpl<ReturnType> Clone for fn() -> ReturnTypeimpl<A, ReturnType> Clone for fn(A) -> ReturnTypeimpl<A, B, ReturnType> Clone for fn(A, B) -> ReturnTypeimpl<A, B, C, ReturnType> Clone for fn(A, B, C) -> ReturnTypeimpl<A, B, C, D, ReturnType> Clone for fn(A, B, C, D) -> ReturnTypeimpl<A, B, C, D, E, ReturnType> Clone for fn(A, B, C, D, E) -> ReturnTypeimpl<A, B, C, D, E, F, ReturnType> Clone for fn(A, B, C, D, E, F) -> ReturnTypeimpl<A, B, C, D, E, F, G, ReturnType> Clone for fn(A, B, C, D, E, F, G) -> ReturnTypeimpl<A, B, C, D, E, F, G, H, ReturnType> Clone for fn(A, B, C, D, E, F, G, H) -> ReturnTypeimpl<T: Copy> Clone for Cell<T>impl<T: Clone> Clone for RefCell<T>impl<T: Clone> Clone for Rev<T>impl<T: Clone> Clone for MinMaxResult<T>impl<T: Clone> Clone for Cycle<T>impl<T: Clone, U: Clone> Clone for Chain<T, U>impl<T: Clone, U: Clone> Clone for Zip<T, U>impl<T: Clone> Clone for Enumerate<T>impl<T: Clone> Clone for Skip<T>impl<T: Clone> Clone for Take<T>impl<T: Clone> Clone for Fuse<T>impl<A: Clone> Clone for Counter<A>impl<A: Clone> Clone for Range<A>impl<A: Clone> Clone for RangeInclusive<A>impl<A: Clone> Clone for RangeStep<A>impl<A: Clone> Clone for RangeStepInclusive<A>impl<A: Clone> Clone for Repeat<A>impl<T: Clone> Clone for Option<T>impl<A: Clone> Clone for Item<A>impl<T: Clone, E: Clone> Clone for Result<T, E>impl<'a, T: Clone> Clone for Windows<'a, T>impl<'a, T: Clone> Clone for Chunks<'a, T>impl<'a, T> Clone for Items<'a, T>impl<'a> Clone for Chars<'a>impl<'a> Clone for CharOffsets<'a>impl<'a, Sep: Clone> Clone for CharSplits<'a, Sep>impl<'a, Sep: Clone> Clone for CharSplitsN<'a, Sep>impl Clone for NaiveSearcherimpl Clone for TwoWaySearcherimpl Clone for Searcherimpl<'a> Clone for MatchIndices<'a>impl<'a> Clone for StrSplits<'a>impl<'a> Clone for Utf16Items<'a>impl Clone for Utf16Itemimpl<A: Clone> Clone for (A)impl<A: Clone, B: Clone> Clone for (A, B)impl<A: Clone, B: Clone, C: Clone> Clone for (A, B, C)impl<A: Clone, B: Clone, C: Clone, D: Clone> Clone for (A, B, C, D)impl<A: Clone, B: Clone, C: Clone, D: Clone, E: Clone> Clone for (A, B, C, D, E)impl<A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone> Clone for (A, B, C, D, E, F)impl<A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone> Clone for (A, B, C, D, E, F, G)impl<A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone> Clone for (A, B, C, D, E, F, G, H)impl<A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, I: Clone> Clone for (A, B, C, D, E, F, G, H, I)impl<A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, I: Clone, J: Clone> Clone for (A, B, C, D, E, F, G, H, I, J)impl<A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, I: Clone, J: Clone, K: Clone> Clone for (A, B, C, D, E, F, G, H, I, J, K)impl<A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, I: Clone, J: Clone, K: Clone, L: Clone> Clone for (A, B, C, D, E, F, G, H, I, J, K, L)impl Clone for Binaryimpl Clone for Octalimpl Clone for Decimalimpl Clone for LowerHeximpl Clone for UpperHeximpl Clone for Radiximpl<K: Clone, V: Clone, H: Clone> Clone for HashMap<K, V, H>impl<T: Clone, H: Clone> Clone for HashSet<T, H>impl Clone for SmallBitvimpl Clone for BigBitvimpl Clone for BitvVariantimpl Clone for Bitvimpl Clone for BitvSetimpl<K: Clone + Ord, V: Clone> Clone for BTree<K, V>impl<K: Clone + Ord, V: Clone> Clone for Node<K, V>impl<K: Clone + Ord, V: Clone> Clone for Leaf<K, V>impl<K: Clone + Ord, V: Clone> Clone for Branch<K, V>impl<K: Clone + Ord, V: Clone> Clone for LeafElt<K, V>impl<K: Clone + Ord, V: Clone> Clone for BranchElt<K, V>impl<'a, T> Clone for Items<'a, T>impl<T: Clone> Clone for MoveItems<T>impl<T> Clone for Rawlink<T>impl<A: Clone> Clone for DList<A>impl<E: Clone> Clone for EnumSet<E>impl<T: Clone> Clone for PriorityQueue<T>impl<T: Clone> Clone for RingBuf<T>impl<K: Clone, V: Clone> Clone for TreeMap<K, V>impl<T: Clone> Clone for TreeSet<T>impl<K: Clone, V: Clone> Clone for TreeNode<K, V>impl Clone for DecompositionTypeimpl<'a> Clone for Decompositions<'a>impl<'a> Clone for MaybeOwned<'a>impl Clone for Stringimpl<T: Clone> Clone for Vec<T>impl Clone for SipStateimpl Clone for SipHasherimpl<T: Send> Clone for Queue<T>impl<T: Send> Clone for BufferPool<T>impl<T: Send> Clone for Stealer<T>impl Clone for TryRecvErrorimpl<T: Clone> Clone for TrySendError<T>impl<T: Send> Clone for Sender<T>impl<T: Send> Clone for SyncSender<T>impl<T: Clone> Clone for Boximpl<T: Send + Share> Clone for Arc<T>impl<T: Send + Share> Clone for Weak<T>impl<T> Clone for Rc<T>impl<T> Clone for Weak<T>impl Clone for ChanWriterimpl Clone for TcpStreamimpl Clone for UdpSocketimpl Clone for IpAddrimpl Clone for SocketAddrimpl Clone for UnixStreamimpl Clone for PipeStreamimpl Clone for ProcessOutputimpl Clone for ProcessExitimpl Clone for IoErrorimpl Clone for IoErrorKindimpl Clone for FilePermissionimpl Clone for Pathimpl Clone for Pathimpl Clone for PathPrefiximpl Clone for CString