Movatterモバイル変換


[0]ホーム

URL:


Clone

core::clone

TraitClone 

1.6.0 (const:unstable) ·Source
pub trait Clone:Sized {    // Required method    fnclone(&self) -> Self;    // Provided method    fnclone_from(&mut self, source: &Self)where Self: { ... }}
Expand description

A common trait that allows explicit creation of a duplicate value.

Callingclone always produces a new value.However, for types that are references to other data (such as smart pointers or references),the new value may still point to the same underlying data, rather than duplicating it.SeeClone::clone for more details.

This distinction is especially important when using#[derive(Clone)] on structs containingsmart pointers likeArc<Mutex<T>> - the cloned struct will share mutable state with theoriginal.

Differs fromCopy in thatCopy is implicit and an inexpensive bit-wise copy, whileClone is always explicit and may or may not be expensive. In order to enforcethese characteristics, Rust does not allow you to reimplementCopy, but youmay reimplementClone and run arbitrary code.

SinceClone is more general thanCopy, you can automatically make anythingCopy beClone as well.

§Derivable

This trait can be used with#[derive] if all fields areClone. Thederivedimplementation ofClone callsclone on each field.

For a generic struct,#[derive] implementsClone conditionally by adding boundClone ongeneric parameters.

// `derive` implements Clone for Reading<T> when T is Clone.#[derive(Clone)]structReading<T> {    frequency: T,}

§How can I implementClone?

Types that areCopy should have a trivial implementation ofClone. More formally:ifT: Copy,x: T, andy: &T, thenlet x = y.clone(); is equivalent tolet x = *y;.Manual implementations should be careful to uphold this invariant; however, unsafe codemust not rely on it to ensure memory safety.

An example is a generic struct holding a function pointer. In this case, theimplementation ofClone cannot bederived, but can be implemented as:

structGenerate<T>(fn() -> T);impl<T> CopyforGenerate<T> {}impl<T> CloneforGenerate<T> {fnclone(&self) ->Self{*self}}

If wederive:

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

the auto-derived implementations will have unnecessaryT: Copy andT: Clone bounds:

// Automatically derivedimpl<T: Copy> CopyforGenerate<T> { }// Automatically derivedimpl<T: Clone> CloneforGenerate<T> {fnclone(&self) -> Generate<T> {        Generate(Clone::clone(&self.0))    }}

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

#[derive(Copy, Clone)]structGenerate<T>(fn() -> T);structNotCloneable;fngenerate_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.

§Clone andPartialEq/Eq

Clone is intended for the duplication of objects. Consequently, when implementingbothClone andPartialEq, the following property is expected to hold:

x == x -> x.clone() == x

In other words, if an object compares equal to itself,its clone must also compare equal to the original.

For types that also implementEq – for whichx == x always holds –this implies thatx.clone() == x must always be true.Standard library collections such asHashMap,HashSet,BTreeMap,BTreeSet andBinaryHeaprely on their keys respecting this property for correct behavior.Furthermore, these collections require that cloning a key preserves the outcome of theHash andOrd methods. Thankfully, this follows automatically fromx.clone() == xifHash andOrd are correctly implemented according to their own requirements.

When deriving bothClone andPartialEq using#[derive(Clone, PartialEq)]or when additionally derivingEq using#[derive(Clone, PartialEq, Eq)],then this property is automatically upheld – provided that it is satisfied bythe underlying types.

Violating this property is a logic error. The behavior resulting from a logic error is notspecified, but users of the trait must ensure that such logic errors donot result inundefined behavior. This means thatunsafe codemust not rely on this propertybeing satisfied.

§Additional implementors

In addition to theimplementors listed below,the following types also implementClone:

  • 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 environmentor if all such captured values implementClone 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§

1.0.0 ·Source

fnclone(&self) -> Self

Returns a duplicate of the value.

Note that what “duplicate” means varies by type:

  • For most types, this creates a deep, independent copy
  • For reference types like&T, this creates another reference to the same value
  • For smart pointers likeArc orRc, this increments the reference countbut still points to the same underlying data
§Examples
lethello ="Hello";// &str implements Cloneassert_eq!("Hello", hello.clone());

Example with a reference-counted type:

usestd::sync::{Arc, Mutex};letdata = Arc::new(Mutex::new(vec![1,2,3]));letdata_clone = data.clone();// Creates another Arc pointing to the same Mutex{letmutlock = data.lock().unwrap();    lock.push(4);}// Changes are visible through the clone because they share the same underlying dataassert_eq!(*data_clone.lock().unwrap(),vec![1,2,3,4]);

Provided Methods§

1.0.0 ·Source

fnclone_from(&mut self, source: &Self)
where Self:,

Performs copy-assignment fromsource.

a.clone_from(&b) is equivalent toa = b.clone() in functionality,but can be overridden to reuse the resources ofa to avoid unnecessaryallocations.

Dyn Compatibility§

This trait isnotdyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

implClone forAsciiChar

1.0.0 (const:unstable) ·Source§

implClone for core::cmp::Ordering

1.34.0 (const:unstable) ·Source§

implClone forInfallible

1.64.0 ·Source§

implClone forFromBytesWithNulError

1.28.0 ·Source§

implClone for core::fmt::Alignment

Source§

implClone forDebugAsHex

Source§

implClone forSign

1.7.0 ·Source§

implClone forIpAddr

Source§

implClone forIpv6MulticastScope

1.0.0 ·Source§

implClone forSocketAddr

1.0.0 ·Source§

implClone forFpCategory

1.55.0 ·Source§

implClone forIntErrorKind

1.86.0 ·Source§

implClone forGetDisjointMutError

Source§

implClone forSearchStep

1.0.0 ·Source§

implClone for core::sync::atomic::Ordering

1.0.0 (const:unstable) ·Source§

implClone forbool

1.0.0 (const:unstable) ·Source§

implClone forchar

1.0.0 (const:unstable) ·Source§

implClone forf16

1.0.0 (const:unstable) ·Source§

implClone forf32

1.0.0 (const:unstable) ·Source§

implClone forf64

1.0.0 (const:unstable) ·Source§

implClone forf128

1.0.0 (const:unstable) ·Source§

implClone fori8

1.0.0 (const:unstable) ·Source§

implClone fori16

1.0.0 (const:unstable) ·Source§

implClone fori32

1.0.0 (const:unstable) ·Source§

implClone fori64

1.0.0 (const:unstable) ·Source§

implClone fori128

1.0.0 (const:unstable) ·Source§

implClone forisize

Source§

implClone for!

1.0.0 (const:unstable) ·Source§

implClone foru8

1.0.0 (const:unstable) ·Source§

implClone foru16

1.0.0 (const:unstable) ·Source§

implClone foru32

1.0.0 (const:unstable) ·Source§

implClone foru64

1.0.0 (const:unstable) ·Source§

implClone foru128

1.0.0 (const:unstable) ·Source§

implClone forusize

Source§

implClone forAllocError

1.28.0 ·Source§

implClone forLayout

1.50.0 ·Source§

implClone forLayoutError

1.0.0 (const:unstable) ·Source§

implClone forTypeId

1.59.0 ·Source§

implClone forfloat64x1_t

Available onAArch64 ortarget_arch=arm64ec only.
1.59.0 ·Source§

implClone forfloat64x1x2_t

Available onAArch64 ortarget_arch=arm64ec only.
1.59.0 ·Source§

implClone forfloat64x1x3_t

Available onAArch64 ortarget_arch=arm64ec only.
1.59.0 ·Source§

implClone forfloat64x1x4_t

Available onAArch64 ortarget_arch=arm64ec only.
1.59.0 ·Source§

implClone forfloat64x2_t

Available onAArch64 ortarget_arch=arm64ec only.
1.59.0 ·Source§

implClone forfloat64x2x2_t

Available onAArch64 ortarget_arch=arm64ec only.
1.59.0 ·Source§

implClone forfloat64x2x3_t

Available onAArch64 ortarget_arch=arm64ec only.
1.59.0 ·Source§

implClone forfloat64x2x4_t

Available onAArch64 ortarget_arch=arm64ec only.
Source§

implClone forfloat16x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
Source§

implClone forfloat16x4x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
Source§

implClone forfloat16x4x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
Source§

implClone forfloat16x4x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
Source§

implClone forfloat16x8_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
Source§

implClone forfloat16x8x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
Source§

implClone forfloat16x8x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
Source§

implClone forfloat16x8x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forfloat32x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forfloat32x2x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forfloat32x2x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forfloat32x2x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forfloat32x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forfloat32x4x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forfloat32x4x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forfloat32x4x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint8x8_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint8x8x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint8x8x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint8x8x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint8x16_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint8x16x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint8x16x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint8x16x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint16x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint16x4x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint16x4x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint16x4x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint16x8_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint16x8x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint16x8x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint16x8x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint32x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint32x2x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint32x2x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint32x2x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint32x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint32x4x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint32x4x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint32x4x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint64x1_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint64x1x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint64x1x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint64x1x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint64x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint64x2x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint64x2x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forint64x2x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly8x8_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly8x8x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly8x8x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly8x8x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly8x16_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly8x16x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly8x16x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly8x16x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly16x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly16x4x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly16x4x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly16x4x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly16x8_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly16x8x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly16x8x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly16x8x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly64x1_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly64x1x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly64x1x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly64x1x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly64x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly64x2x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly64x2x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone forpoly64x2x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint8x8_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint8x8x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint8x8x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint8x8x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint8x16_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint8x16x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint8x16x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint8x16x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint16x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint16x4x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint16x4x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint16x4x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint16x8_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint16x8x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint16x8x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint16x8x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint32x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint32x2x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint32x2x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint32x2x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint32x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint32x4x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint32x4x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint32x4x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint64x1_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint64x1x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint64x1x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint64x1x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint64x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint64x2x2_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint64x2x3_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
1.59.0 ·Source§

implClone foruint64x2x4_t

Available on(AArch64 ortarget_arch=arm64ec or target featurev7) and (ARM or AArch64 ortarget_arch=arm64ec) only.
Source§

implClone form128

Available onLoongArch LA64 only.
Source§

implClone form128d

Available onLoongArch LA64 only.
Source§

implClone form128i

Available onLoongArch LA64 only.
Source§

implClone form256

Available onLoongArch LA64 only.
Source§

implClone form256d

Available onLoongArch LA64 only.
Source§

implClone form256i

Available onLoongArch LA64 only.
Source§

implClone forf16x2

Available ontarget_arch=nvptx64 only.
Source§

implClone for core::arch::powerpc::vector_bool_char

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::powerpc::vector_bool_int

Available onPowerPC or PowerPC-64 only.
Source§

implClone forvector_bool_long

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::powerpc::vector_bool_short

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::powerpc::vector_double

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::powerpc::vector_float

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::powerpc::vector_signed_char

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::powerpc::vector_signed_int

Available onPowerPC or PowerPC-64 only.
Source§

implClone forvector_signed_long

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::powerpc::vector_signed_short

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::powerpc::vector_unsigned_char

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::powerpc::vector_unsigned_int

Available onPowerPC or PowerPC-64 only.
Source§

implClone forvector_unsigned_long

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::powerpc::vector_unsigned_short

Available onPowerPC or PowerPC-64 only.
Source§

implClone for core::arch::s390x::vector_bool_char

Available ons390x only.
Source§

implClone for core::arch::s390x::vector_bool_int

Available ons390x only.
Source§

implClone forvector_bool_long_long

Available ons390x only.
Source§

implClone for core::arch::s390x::vector_bool_short

Available ons390x only.
Source§

implClone for core::arch::s390x::vector_double

Available ons390x only.
Source§

implClone for core::arch::s390x::vector_float

Available ons390x only.
Source§

implClone for core::arch::s390x::vector_signed_char

Available ons390x only.
Source§

implClone for core::arch::s390x::vector_signed_int

Available ons390x only.
Source§

implClone forvector_signed_long_long

Available ons390x only.
Source§

implClone for core::arch::s390x::vector_signed_short

Available ons390x only.
Source§

implClone for core::arch::s390x::vector_unsigned_char

Available ons390x only.
Source§

implClone for core::arch::s390x::vector_unsigned_int

Available ons390x only.
Source§

implClone forvector_unsigned_long_long

Available ons390x only.
Source§

implClone for core::arch::s390x::vector_unsigned_short

Available ons390x only.
1.54.0 ·Source§

implClone forv128

Available ontarget_family=wasm only.
1.27.0 ·Source§

implClone forCpuidResult

Available onx86 or x86-64 only.
1.27.0 ·Source§

implClone for__m128

Available onx86 or x86-64 only.
1.89.0 ·Source§

implClone for__m128bh

Available onx86 or x86-64 only.
1.27.0 ·Source§

implClone for__m128d

Available onx86 or x86-64 only.
Source§

implClone for__m128h

Available onx86 or x86-64 only.
1.27.0 ·Source§

implClone for__m128i

Available onx86 or x86-64 only.
1.27.0 ·Source§

implClone for__m256

Available onx86 or x86-64 only.
1.89.0 ·Source§

implClone for__m256bh

Available onx86 or x86-64 only.
1.27.0 ·Source§

implClone for__m256d

Available onx86 or x86-64 only.
Source§

implClone for__m256h

Available onx86 or x86-64 only.
1.27.0 ·Source§

implClone for__m256i

Available onx86 or x86-64 only.
1.72.0 ·Source§

implClone for__m512

Available onx86 or x86-64 only.
1.89.0 ·Source§

implClone for__m512bh

Available onx86 or x86-64 only.
1.72.0 ·Source§

implClone for__m512d

Available onx86 or x86-64 only.
Source§

implClone for__m512h

Available onx86 or x86-64 only.
1.72.0 ·Source§

implClone for__m512i

Available onx86 or x86-64 only.
Source§

implClone forbf16

Available onx86 or x86-64 only.
1.34.0 ·Source§

implClone forTryFromSliceError

1.0.0 ·Source§

implClone for core::ascii::EscapeDefault

1.34.0 ·Source§

implClone forCharTryFromError

1.9.0 ·Source§

implClone forDecodeUtf16Error

1.20.0 ·Source§

implClone for core::char::EscapeDebug

1.0.0 ·Source§

implClone for core::char::EscapeDefault

1.0.0 ·Source§

implClone for core::char::EscapeUnicode

1.20.0 ·Source§

implClone forParseCharError

1.0.0 ·Source§

implClone forToLowercase

1.0.0 ·Source§

implClone forToUppercase

1.59.0 ·Source§

implClone forTryFromCharError

1.69.0 ·Source§

implClone forFromBytesUntilNulError

1.0.0 ·Source§

implClone forError

Source§

implClone forFormattingOptions

1.0.0 ·Source§

implClone forSipHasher

1.33.0 ·Source§

implClone forPhantomPinned

Source§

implClone forAssume

1.0.0 ·Source§

implClone forAddrParseError

1.0.0 ·Source§

implClone forIpv4Addr

1.0.0 ·Source§

implClone forIpv6Addr

1.0.0 ·Source§

implClone forSocketAddrV4

1.0.0 ·Source§

implClone forSocketAddrV6

1.0.0 ·Source§

implClone forParseFloatError

1.0.0 ·Source§

implClone forParseIntError

1.34.0 ·Source§

implClone forTryFromIntError

1.0.0 (const:unstable) ·Source§

implClone forRangeFull

Source§

implClone for core::ptr::Alignment

1.0.0 ·Source§

implClone forParseBoolError

1.0.0 ·Source§

implClone forUtf8Error

Source§

implClone forLocalWaker

1.36.0 ·Source§

implClone forRawWakerVTable

1.36.0 ·Source§

implClone forWaker

1.3.0 ·Source§

implClone forDuration

1.66.0 ·Source§

implClone forTryFromFloatSecsError

Source§

impl<'a>Clone forUtf8Pattern<'a>

Source§

impl<'a>Clone forSource<'a>

Source§

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

1.0.0 ·Source§

impl<'a>Clone forArguments<'a>

Source§

impl<'a>Clone forPhantomContravariantLifetime<'a>

Source§

impl<'a>Clone forPhantomCovariantLifetime<'a>

Source§

impl<'a>Clone forPhantomInvariantLifetime<'a>

1.10.0 ·Source§

impl<'a>Clone forLocation<'a>

1.60.0 ·Source§

impl<'a>Clone forEscapeAscii<'a>

Source§

impl<'a>Clone forCharSearcher<'a>

1.0.0 ·Source§

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

1.0.0 ·Source§

impl<'a>Clone forCharIndices<'a>

1.0.0 ·Source§

impl<'a>Clone forChars<'a>

1.8.0 ·Source§

impl<'a>Clone forEncodeUtf16<'a>

1.34.0 ·Source§

impl<'a>Clone for core::str::EscapeDebug<'a>

1.34.0 ·Source§

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

1.34.0 ·Source§

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

1.0.0 ·Source§

impl<'a>Clone forLines<'a>

1.0.0 ·Source§

impl<'a>Clone forLinesAny<'a>

1.34.0 ·Source§

impl<'a>Clone forSplitAsciiWhitespace<'a>

1.1.0 ·Source§

impl<'a>Clone forSplitWhitespace<'a>

1.79.0 ·Source§

impl<'a>Clone forUtf8Chunk<'a>

1.79.0 ·Source§

impl<'a>Clone forUtf8Chunks<'a>

Source§

impl<'a, 'b>Clone forCharSliceSearcher<'a, 'b>

Source§

impl<'a, 'b>Clone forStrSearcher<'a, 'b>

Source§

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

Source§

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

1.5.0 ·Source§

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

1.2.0 ·Source§

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

1.5.0 ·Source§

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

1.2.0 ·Source§

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

1.0.0 ·Source§

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

1.0.0 ·Source§

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

1.0.0 ·Source§

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

1.0.0 ·Source§

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

1.0.0 ·Source§

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

1.0.0 ·Source§

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

1.51.0 ·Source§

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

1.31.0 ·Source§

impl<'a, T>Clone forRChunksExact<'a, T>

1.89.0 ·Source§

impl<'a, T: 'a, P:Clone>Clone forChunkBy<'a, T, P>

Source§

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

Source§

impl<'a, const N:usize>Clone forCharArraySearcher<'a, N>

Source§

impl<'f>Clone forVaListImpl<'f>

1.0.0 ·Source§

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

1.0.0 ·Source§

impl<A:Clone>Clone forRepeat<A>

1.82.0 ·Source§

impl<A:Clone>Clone forRepeatN<A>

1.0.0 ·Source§

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

Source§

impl<A:Clone>Clone forIterRange<A>

Source§

impl<A:Clone>Clone forIterRangeFrom<A>

Source§

impl<A:Clone>Clone forIterRangeInclusive<A>

1.0.0 ·Source§

impl<A:Clone, B:Clone>Clone forChain<A, B>

1.0.0 ·Source§

impl<A:Clone, B:Clone>Clone forZip<A, B>

1.55.0 (const:unstable) ·Source§

impl<B:Clone, C:Clone>Clone forControlFlow<B, C>

Source§

impl<Dyn:PointeeSized>Clone forDynMetadata<Dyn>

1.34.0 ·Source§

impl<F:Clone>Clone forFromFn<F>

1.43.0 ·Source§

impl<F:Clone>Clone forOnceWith<F>

1.28.0 ·Source§

impl<F:Clone>Clone forRepeatWith<F>

Source§

impl<G:Clone>Clone forFromCoroutine<G>

1.7.0 ·Source§

impl<H>Clone forBuildHasherDefault<H>

1.9.0 ·Source§

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

Source§

impl<I, F, const N:usize>Clone forMapWindows<I, F, N>
where I:Iterator +Clone, F:Clone, I::Item:Clone,

Source§

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

1.29.0 ·Source§

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

Source§

impl<I:Clone +Iterator>Clone forIntersperse<I>
where I::Item:Clone +Clone,

1.0.0 ·Source§

impl<I:Clone +Iterator>Clone forPeekable<I>
where I::Item:Clone,

Source§

impl<I:Clone +Iterator, const N:usize>Clone forArrayChunks<I, N>
where I::Item:Clone,

Source§

impl<I:Clone>Clone forFromIter<I>

1.1.0 ·Source§

impl<I:Clone>Clone forCloned<I>

1.36.0 ·Source§

impl<I:Clone>Clone forCopied<I>

1.0.0 ·Source§

impl<I:Clone>Clone forCycle<I>

1.0.0 ·Source§

impl<I:Clone>Clone forEnumerate<I>

1.0.0 ·Source§

impl<I:Clone>Clone forFuse<I>

1.0.0 ·Source§

impl<I:Clone>Clone forSkip<I>

1.28.0 ·Source§

impl<I:Clone>Clone forStepBy<I>

1.0.0 ·Source§

impl<I:Clone>Clone forTake<I>

1.0.0 ·Source§

impl<I:Clone, F:Clone>Clone forFilterMap<I, F>

1.0.0 ·Source§

impl<I:Clone, F:Clone>Clone forInspect<I, F>

1.0.0 ·Source§

impl<I:Clone, F:Clone>Clone forMap<I, F>

1.0.0 ·Source§

impl<I:Clone, P:Clone>Clone forFilter<I, P>

1.57.0 ·Source§

impl<I:Clone, P:Clone>Clone forMapWhile<I, P>

1.0.0 ·Source§

impl<I:Clone, P:Clone>Clone forSkipWhile<I, P>

1.0.0 ·Source§

impl<I:Clone, P:Clone>Clone forTakeWhile<I, P>

1.0.0 ·Source§

impl<I:Clone, St:Clone, F:Clone>Clone forScan<I, St, F>

1.0.0 ·Source§

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

1.0.0 (const:unstable) ·Source§

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

1.0.0 (const:unstable) ·Source§

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

1.26.0 ·Source§

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

1.0.0 (const:unstable) ·Source§

impl<Idx:Clone>Clone forRangeTo<Idx>

1.26.0 ·Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

1.33.0 ·Source§

impl<Ptr:Clone>Clone forPin<Ptr>

1.0.0 (const:unstable) ·Source§

impl<T>Clone forOption<T>
where T:Clone,

1.48.0 ·Source§

impl<T>Clone forPending<T>

1.2.0 ·Source§

impl<T>Clone forEmpty<T>

Source§

impl<T>Clone forPhantomContravariant<T>
where T: ?Sized,

Source§

impl<T>Clone forPhantomCovariant<T>
where T: ?Sized,

Source§

impl<T>Clone forPhantomInvariant<T>
where T: ?Sized,

1.21.0 ·Source§

impl<T>Clone forDiscriminant<T>

1.28.0 ·Source§

impl<T>Clone forNonZero<T>

1.0.0 ·Source§

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

1.0.0 ·Source§

impl<T>Clone forChunks<'_, T>

1.31.0 ·Source§

impl<T>Clone forChunksExact<'_, T>

1.0.0 ·Source§

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

1.31.0 ·Source§

impl<T>Clone forRChunks<'_, T>

1.0.0 ·Source§

impl<T>Clone forWindows<'_, T>

Source§

impl<T>Clone forExclusive<T>
where T:Sync +Clone,

1.0.0 ·Source§

impl<T, E>Clone forResult<T, E>
where T:Clone, E:Clone,

1.27.0 ·Source§

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

1.0.0 ·Source§

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

1.51.0 ·Source§

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

Source§

impl<T, const N:usize>Clone forMask<T, N>

Source§

impl<T, const N:usize>Clone forSimd<T, N>

1.0.0 ·Source§

impl<T:Copy>Clone forCell<T>

1.36.0 ·Source§

impl<T:Copy>Clone forMaybeUninit<T>

1.0.0 ·Source§

impl<T:PointeeSized> !Clone for&mut T

Shared references can be cloned, but mutable referencescannot!

1.0.0 (const:unstable) ·Source§

impl<T:PointeeSized>Clone for*const T

1.0.0 (const:unstable) ·Source§

impl<T:PointeeSized>Clone for*mut T

1.0.0 (const:unstable) ·Source§

impl<T:PointeeSized>Clone for&T

Shared references can be cloned, but mutable referencescannot!

1.0.0 ·Source§

impl<T:PointeeSized>Clone forPhantomData<T>

1.25.0 ·Source§

impl<T:PointeeSized>Clone forNonNull<T>

1.20.0 ·Source§

impl<T:Clone + ?Sized>Clone forManuallyDrop<T>

1.17.0 (const:unstable) ·Source§

impl<T:Clone>Clone forBound<T>

1.36.0 ·Source§

impl<T:Clone>Clone forPoll<T>

1.70.0 ·Source§

impl<T:Clone>Clone forOnceCell<T>

1.0.0 ·Source§

impl<T:Clone>Clone forRefCell<T>

1.19.0 ·Source§

impl<T:Clone>Clone forReverse<T>

1.48.0 ·Source§

impl<T:Clone>Clone forReady<T>

1.2.0 ·Source§

impl<T:Clone>Clone forOnce<T>

1.0.0 ·Source§

impl<T:Clone>Clone forRev<T>

1.74.0 ·Source§

impl<T:Clone>Clone forSaturating<T>

1.0.0 ·Source§

impl<T:Clone>Clone forWrapping<T>

1.0.0 ·Source§

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

1.34.0 ·Source§

impl<T:Clone, F:Clone>Clone forSuccessors<T, F>

1.58.0 ·Source§

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

1.51.0 ·Source§

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

Source§

impl<Y:Clone, R:Clone>Clone forCoroutineState<Y, R>


[8]ページ先頭

©2009-2025 Movatter.jp