pub trait Clone: Sized {
// Required method
fn clone(&self) -> Self;
// Provided method
fn clone_from(&mut self, source: &Self) { ... }
}
Expand description
A common trait that allows explicit creation of a duplicate value.
Calling clone
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.
See Clone::clone
for more details.
This distinction is especially important when using #[derive(Clone)]
on structs containing
smart pointers like Arc<Mutex<T>>
- the cloned struct will share mutable state with the
original.
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 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,
}
§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
}
}
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.
§Clone
and PartialEq
/Eq
Clone
is intended for the duplication of objects. Consequently, when implementing
both Clone
and PartialEq
, 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 implement Eq
– for which x == x
always holds –
this implies that x.clone() == x
must always be true.
Standard library collections such as
HashMap
, HashSet
, BTreeMap
, BTreeSet
and BinaryHeap
rely on their keys respecting this property for correct behavior.
Furthermore, these collections require that cloning a key preserves the outcome of the
Hash
and Ord
methods. Thankfully, this follows automatically from x.clone() == x
if Hash
and Ord
are correctly implemented according to their own requirements.
When deriving both Clone
and PartialEq
using #[derive(Clone, PartialEq)]
or when additionally deriving Eq
using #[derive(Clone, PartialEq, Eq)]
,
then this property is automatically upheld – provided that it is satisfied by
the underlying types.
Violating this property is a logic error. The behavior resulting from a logic error is not
specified, but users of the trait must ensure that such logic errors do not result in
undefined behavior. This means that unsafe
code must not rely on this property
being satisfied.
§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 implementClone
(even if the referent doesn’t), while variables captured by mutable reference never implementClone
.
Required Methods§
1.0.0 · Sourcefn clone(&self) -> Self
fn clone(&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 like
Arc
orRc
, this increments the reference count but still points to the same underlying data
§Examples
let hello = "Hello"; // &str implements Clone
assert_eq!("Hello", hello.clone());
Example with a reference-counted type:
use std::sync::{Arc, Mutex};
let data = Arc::new(Mutex::new(vec![1, 2, 3]));
let data_clone = data.clone(); // Creates another Arc pointing to the same Mutex
{
let mut lock = data.lock().unwrap();
lock.push(4);
}
// Changes are visible through the clone because they share the same underlying data
assert_eq!(*data_clone.lock().unwrap(), vec![1, 2, 3, 4]);
Provided Methods§
1.0.0 · Sourcefn clone_from(&mut self, source: &Self)
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl Clone for AsciiChar
impl Clone for mmcp_server::inventory::core::cmp::Ordering
impl Clone for Infallible
impl Clone for FromBytesWithNulError
impl Clone for mmcp_server::inventory::core::fmt::Alignment
impl Clone for DebugAsHex
impl Clone for Sign
impl Clone for IpAddr
impl Clone for Ipv6MulticastScope
impl Clone for mmcp_server::inventory::core::net::SocketAddr
impl Clone for FpCategory
impl Clone for IntErrorKind
impl Clone for mmcp_server::inventory::core::slice::GetDisjointMutError
impl Clone for SearchStep
impl Clone for mmcp_server::inventory::core::sync::atomic::Ordering
impl Clone for TryReserveErrorKind
impl Clone for VarError
impl Clone for SeekFrom
impl Clone for ErrorKind
impl Clone for Shutdown
impl Clone for BacktraceStyle
impl Clone for RecvTimeoutError
impl Clone for TryRecvError
impl Clone for DecodeError
impl Clone for DecodeSliceError
impl Clone for EncodeSliceError
impl Clone for DecodePaddingMode
impl Clone for PollNext
impl Clone for hashbrown::TryReserveError
impl Clone for indexmap::GetDisjointMutError
impl Clone for PrefilterConfig
impl Clone for ProtocolVersion
impl Clone for CallToolResultContent
impl Clone for ClientNotification
impl Clone for ClientRequest
impl Clone for ClientResult
impl Clone for CompleteRequestParamsRef
impl Clone for CreateMessageRequestParamsIncludeContext
impl Clone for CreateMessageResultContent
impl Clone for EmbeddedResourceResource
impl Clone for JSONRPCMessage
impl Clone for JsonrpcBatchRequestItem
impl Clone for JsonrpcBatchResponseItem
impl Clone for LoggingLevel
impl Clone for ProgressToken
impl Clone for PromptMessageContent
impl Clone for ReadResourceResultContents
impl Clone for RequestId
impl Clone for Role
impl Clone for SamplingMessageContent
impl Clone for ServerNotification
impl Clone for ServerRequest
impl Clone for ServerResult
impl Clone for Category
impl Clone for Value
impl Clone for slab::GetDisjointMutError
impl Clone for bool
impl Clone for char
impl Clone for f16
impl Clone for f32
impl Clone for f64
impl Clone for f128
impl Clone for i8
impl Clone for i16
impl Clone for i32
impl Clone for i64
impl Clone for i128
impl Clone for isize
impl Clone for !
impl Clone for u8
impl Clone for u16
impl Clone for u32
impl Clone for u64
impl Clone for u128
impl Clone for usize
impl Clone for AllocError
impl Clone for Layout
impl Clone for LayoutError
impl Clone for TypeId
impl Clone for CpuidResult
impl Clone for __m128
impl Clone for __m128bh
impl Clone for __m128d
impl Clone for __m128h
impl Clone for __m128i
impl Clone for __m256
impl Clone for __m256bh
impl Clone for __m256d
impl Clone for __m256h
impl Clone for __m256i
impl Clone for __m512
impl Clone for __m512bh
impl Clone for __m512d
impl Clone for __m512h
impl Clone for __m512i
impl Clone for bf16
impl Clone for TryFromSliceError
impl Clone for mmcp_server::inventory::core::ascii::EscapeDefault
impl Clone for CharTryFromError
impl Clone for DecodeUtf16Error
impl Clone for mmcp_server::inventory::core::char::EscapeDebug
impl Clone for mmcp_server::inventory::core::char::EscapeDefault
impl Clone for mmcp_server::inventory::core::char::EscapeUnicode
impl Clone for ParseCharError
impl Clone for ToLowercase
impl Clone for ToUppercase
impl Clone for TryFromCharError
impl Clone for FromBytesUntilNulError
impl Clone for mmcp_server::inventory::core::fmt::Error
impl Clone for FormattingOptions
impl Clone for SipHasher
impl Clone for PhantomPinned
impl Clone for Assume
impl Clone for AddrParseError
impl Clone for Ipv4Addr
impl Clone for Ipv6Addr
impl Clone for SocketAddrV4
impl Clone for SocketAddrV6
impl Clone for ParseFloatError
impl Clone for ParseIntError
impl Clone for TryFromIntError
impl Clone for RangeFull
impl Clone for mmcp_server::inventory::core::ptr::Alignment
impl Clone for ParseBoolError
impl Clone for Utf8Error
impl Clone for LocalWaker
impl Clone for RawWakerVTable
impl Clone for Waker
impl Clone for Duration
impl Clone for TryFromFloatSecsError
impl Clone for Global
impl Clone for Box<str>
impl Clone for Box<ByteStr>
impl Clone for Box<CStr>
impl Clone for Box<OsStr>
impl Clone for Box<Path>
impl Clone for Box<RawValue>
impl Clone for ByteString
impl Clone for UnorderedKeyError
impl Clone for alloc::collections::TryReserveError
impl Clone for CString
impl Clone for FromVecWithNulError
impl Clone for IntoStringError
impl Clone for NulError
impl Clone for FromUtf8Error
impl Clone for IntoChars
impl Clone for String
impl Clone for System
impl Clone for OsString
impl Clone for FileTimes
impl Clone for FileType
impl Clone for Metadata
impl Clone for OpenOptions
impl Clone for Permissions
impl Clone for DefaultHasher
impl Clone for RandomState
impl Clone for std::io::util::Empty
impl Clone for Sink
impl Clone for stat
impl Clone for std::os::unix::net::addr::SocketAddr
impl Clone for SocketCred
impl Clone for UCred
impl Clone for PathBuf
impl Clone for StripPrefixError
impl Clone for ExitCode
impl Clone for ExitStatus
impl Clone for ExitStatusError
impl Clone for Output
impl Clone for DefaultRandomSource
impl Clone for RecvError
impl Clone for WaitTimeoutResult
impl Clone for AccessError
impl Clone for Thread
impl Clone for ThreadId
impl Clone for Instant
impl Clone for SystemTime
impl Clone for SystemTimeError
impl Clone for Alphabet
impl Clone for GeneralPurpose
impl Clone for GeneralPurposeConfig
impl Clone for futures_channel::mpsc::SendError
impl Clone for Canceled
impl Clone for LocalSpawner
impl Clone for AbortHandle
impl Clone for Aborted
impl Clone for indexmap::TryReserveError
impl Clone for itoa::Buffer
impl Clone for memchr::arch::all::memchr::One
impl Clone for memchr::arch::all::memchr::Three
impl Clone for memchr::arch::all::memchr::Two
impl Clone for memchr::arch::all::packedpair::Finder
impl Clone for Pair
impl Clone for memchr::arch::all::rabinkarp::Finder
impl Clone for memchr::arch::all::rabinkarp::FinderRev
impl Clone for memchr::arch::all::twoway::Finder
impl Clone for memchr::arch::all::twoway::FinderRev
impl Clone for memchr::arch::x86_64::avx2::memchr::One
impl Clone for memchr::arch::x86_64::avx2::memchr::Three
impl Clone for memchr::arch::x86_64::avx2::memchr::Two
impl Clone for memchr::arch::x86_64::avx2::packedpair::Finder
impl Clone for memchr::arch::x86_64::sse2::memchr::One
impl Clone for memchr::arch::x86_64::sse2::memchr::Three
impl Clone for memchr::arch::x86_64::sse2::memchr::Two
impl Clone for memchr::arch::x86_64::sse2::packedpair::Finder
impl Clone for FinderBuilder
impl Clone for Annotations
impl Clone for AudioContent
impl Clone for BlobResourceContents
impl Clone for CallToolRequest
impl Clone for CallToolRequestParams
impl Clone for CallToolResult
impl Clone for CancelledNotification
impl Clone for CancelledNotificationParams
impl Clone for ClientCapabilities
impl Clone for ClientCapabilitiesRoots
impl Clone for CompleteRequest
impl Clone for CompleteRequestParams
impl Clone for CompleteRequestParamsArgument
impl Clone for CompleteResult
impl Clone for CompleteResultCompletion
impl Clone for CreateMessageRequest
impl Clone for CreateMessageRequestParams
impl Clone for CreateMessageResult
impl Clone for mmcp_protocol::mcp::Cursor
impl Clone for EmbeddedResource
impl Clone for EmptyResult
impl Clone for GetPromptRequest
impl Clone for GetPromptRequestParams
impl Clone for GetPromptResult
impl Clone for ImageContent
impl Clone for Implementation
impl Clone for InitializeRequest
impl Clone for InitializeRequestParams
impl Clone for InitializeResult
impl Clone for InitializedNotification
impl Clone for InitializedNotificationParams
impl Clone for JSONRPCBatchRequest
impl Clone for JSONRPCBatchResponse
impl Clone for JSONRPCError
impl Clone for JSONRPCNotification
impl Clone for JSONRPCRequest
impl Clone for JSONRPCResponse
impl Clone for JsonrpcErrorError
impl Clone for JsonrpcNotificationParams
impl Clone for JsonrpcRequestParams
impl Clone for JsonrpcRequestParamsMeta
impl Clone for ListPromptsRequest
impl Clone for ListPromptsRequestParams
impl Clone for ListPromptsResult
impl Clone for ListResourceTemplatesRequest
impl Clone for ListResourceTemplatesRequestParams
impl Clone for ListResourceTemplatesResult
impl Clone for ListResourcesRequest
impl Clone for ListResourcesRequestParams
impl Clone for ListResourcesResult
impl Clone for ListRootsRequest
impl Clone for ListRootsRequestParams
impl Clone for ListRootsRequestParamsMeta
impl Clone for ListRootsResult
impl Clone for ListToolsRequest
impl Clone for ListToolsRequestParams
impl Clone for ListToolsResult
impl Clone for LoggingMessageNotification
impl Clone for LoggingMessageNotificationParams
impl Clone for ModelHint
impl Clone for ModelPreferences
impl Clone for Notification
impl Clone for NotificationParams
impl Clone for PaginatedRequest
impl Clone for PaginatedRequestParams
impl Clone for PaginatedResult
impl Clone for PingRequest
impl Clone for PingRequestParams
impl Clone for PingRequestParamsMeta
impl Clone for ProgressNotification
impl Clone for ProgressNotificationParams
impl Clone for Prompt
impl Clone for PromptArgument
impl Clone for PromptListChangedNotification
impl Clone for PromptListChangedNotificationParams
impl Clone for PromptMessage
impl Clone for PromptReference
impl Clone for ReadResourceRequest
impl Clone for ReadResourceRequestParams
impl Clone for ReadResourceResult
impl Clone for Request
impl Clone for RequestParams
impl Clone for RequestParamsMeta
impl Clone for Resource
impl Clone for ResourceContents
impl Clone for ResourceListChangedNotification
impl Clone for ResourceListChangedNotificationParams
impl Clone for ResourceReference
impl Clone for ResourceTemplate
impl Clone for ResourceUpdatedNotification
impl Clone for ResourceUpdatedNotificationParams
impl Clone for mmcp_protocol::mcp::Result
impl Clone for Root
impl Clone for RootsListChangedNotification
impl Clone for RootsListChangedNotificationParams
impl Clone for SamplingMessage
impl Clone for ServerCapabilities
impl Clone for ServerCapabilitiesPrompts
impl Clone for ServerCapabilitiesResources
impl Clone for ServerCapabilitiesTools
impl Clone for SetLevelRequest
impl Clone for SetLevelRequestParams
impl Clone for SubscribeRequest
impl Clone for SubscribeRequestParams
impl Clone for TextContent
impl Clone for TextResourceContents
impl Clone for Tool
impl Clone for ToolAnnotations
impl Clone for ToolInputSchema
impl Clone for ToolListChangedNotification
impl Clone for ToolListChangedNotificationParams
impl Clone for UnsubscribeRequest
impl Clone for UnsubscribeRequestParams
impl Clone for ryu::buffer::Buffer
impl Clone for IgnoredAny
impl Clone for serde::de::value::Error
impl Clone for serde_json::map::Map<String, Value>
impl Clone for Number
impl Clone for CompactFormatter
impl<'a> Clone for Utf8Pattern<'a>
impl<'a> Clone for Component<'a>
impl<'a> Clone for Prefix<'a>
impl<'a> Clone for Unexpected<'a>
impl<'a> Clone for Source<'a>
impl<'a> Clone for mmcp_server::inventory::core::ffi::c_str::Bytes<'a>
impl<'a> Clone for Arguments<'a>
impl<'a> Clone for PhantomContravariantLifetime<'a>
impl<'a> Clone for PhantomCovariantLifetime<'a>
impl<'a> Clone for PhantomInvariantLifetime<'a>
impl<'a> Clone for Location<'a>
impl<'a> Clone for EscapeAscii<'a>
impl<'a> Clone for CharSearcher<'a>
impl<'a> Clone for mmcp_server::inventory::core::str::Bytes<'a>
impl<'a> Clone for CharIndices<'a>
impl<'a> Clone for Chars<'a>
impl<'a> Clone for EncodeUtf16<'a>
impl<'a> Clone for mmcp_server::inventory::core::str::EscapeDebug<'a>
impl<'a> Clone for mmcp_server::inventory::core::str::EscapeDefault<'a>
impl<'a> Clone for mmcp_server::inventory::core::str::EscapeUnicode<'a>
impl<'a> Clone for Lines<'a>
impl<'a> Clone for LinesAny<'a>
impl<'a> Clone for SplitAsciiWhitespace<'a>
impl<'a> Clone for SplitWhitespace<'a>
impl<'a> Clone for Utf8Chunk<'a>
impl<'a> Clone for Utf8Chunks<'a>
impl<'a> Clone for IoSlice<'a>
impl<'a> Clone for Ancestors<'a>
impl<'a> Clone for Components<'a>
impl<'a> Clone for std::path::Iter<'a>
impl<'a> Clone for PrefixComponent<'a>
impl<'a> Clone for anyhow::Chain<'a>
impl<'a> Clone for serde_json::map::Iter<'a>
impl<'a> Clone for serde_json::map::Keys<'a>
impl<'a> Clone for serde_json::map::Values<'a>
impl<'a> Clone for PrettyFormatter<'a>
impl<'a, 'b> Clone for CharSliceSearcher<'a, 'b>
impl<'a, 'b> Clone for StrSearcher<'a, 'b>
impl<'a, 'b, const N: usize> Clone for CharArrayRefSearcher<'a, 'b, N>
impl<'a, 'h> Clone for memchr::arch::all::memchr::OneIter<'a, 'h>
impl<'a, 'h> Clone for memchr::arch::all::memchr::ThreeIter<'a, 'h>
impl<'a, 'h> Clone for memchr::arch::all::memchr::TwoIter<'a, 'h>
impl<'a, 'h> Clone for memchr::arch::x86_64::avx2::memchr::OneIter<'a, 'h>
impl<'a, 'h> Clone for memchr::arch::x86_64::avx2::memchr::ThreeIter<'a, 'h>
impl<'a, 'h> Clone for memchr::arch::x86_64::avx2::memchr::TwoIter<'a, 'h>
impl<'a, 'h> Clone for memchr::arch::x86_64::sse2::memchr::OneIter<'a, 'h>
impl<'a, 'h> Clone for memchr::arch::x86_64::sse2::memchr::ThreeIter<'a, 'h>
impl<'a, 'h> Clone for memchr::arch::x86_64::sse2::memchr::TwoIter<'a, 'h>
impl<'a, E> Clone for BytesDeserializer<'a, E>
impl<'a, E> Clone for CowStrDeserializer<'a, E>
impl<'a, F> Clone for CharPredicateSearcher<'a, F>
impl<'a, K> Clone for alloc::collections::btree::set::Cursor<'a, K>where
K: Clone + 'a,
impl<'a, P> Clone for MatchIndices<'a, P>
impl<'a, P> Clone for Matches<'a, P>
impl<'a, P> Clone for RMatchIndices<'a, P>
impl<'a, P> Clone for RMatches<'a, P>
impl<'a, P> Clone for mmcp_server::inventory::core::str::RSplit<'a, P>
impl<'a, P> Clone for RSplitN<'a, P>
impl<'a, P> Clone for RSplitTerminator<'a, P>
impl<'a, P> Clone for mmcp_server::inventory::core::str::Split<'a, P>
impl<'a, P> Clone for mmcp_server::inventory::core::str::SplitInclusive<'a, P>
impl<'a, P> Clone for SplitN<'a, P>
impl<'a, P> Clone for SplitTerminator<'a, P>
impl<'a, T> Clone for RChunksExact<'a, T>
impl<'a, T> Clone for hashbrown::table::Iter<'a, T>
impl<'a, T> Clone for IterHash<'a, T>
impl<'a, T, P> Clone for ChunkBy<'a, T, P>where
T: 'a,
P: Clone,
impl<'a, T, const N: usize> Clone for ArrayWindows<'a, T, N>where
T: Clone + 'a,
impl<'a, const N: usize> Clone for CharArraySearcher<'a, N>
impl<'de, E> Clone for BorrowedBytesDeserializer<'de, E>
impl<'de, E> Clone for BorrowedStrDeserializer<'de, E>
impl<'de, E> Clone for StrDeserializer<'de, E>
impl<'de, I, E> Clone for MapDeserializer<'de, I, E>
impl<'f> Clone for VaListImpl<'f>
impl<'fd> Clone for BorrowedFd<'fd>
impl<'h> Clone for Memchr2<'h>
impl<'h> Clone for Memchr3<'h>
impl<'h> Clone for Memchr<'h>
impl<'h, 'n> Clone for FindIter<'h, 'n>
impl<'h, 'n> Clone for FindRevIter<'h, 'n>
impl<'n> Clone for memchr::memmem::Finder<'n>
impl<'n> Clone for memchr::memmem::FinderRev<'n>
impl<A> Clone for mmcp_server::inventory::core::iter::Repeat<A>where
A: Clone,
impl<A> Clone for RepeatN<A>where
A: Clone,
impl<A> Clone for mmcp_server::inventory::core::option::IntoIter<A>where
A: Clone,
impl<A> Clone for mmcp_server::inventory::core::option::Iter<'_, A>
impl<A> Clone for IterRange<A>where
A: Clone,
impl<A> Clone for IterRangeFrom<A>where
A: Clone,
impl<A> Clone for IterRangeInclusive<A>where
A: Clone,
impl<A> Clone for EnumAccessDeserializer<A>where
A: Clone,
impl<A> Clone for MapAccessDeserializer<A>where
A: Clone,
impl<A> Clone for SeqAccessDeserializer<A>where
A: Clone,
impl<A, B> Clone for Either<A, B>
impl<A, B> Clone for mmcp_server::inventory::core::iter::Chain<A, B>
impl<A, B> Clone for Zip<A, B>
impl<B> Clone for Cow<'_, B>
impl<B, C> Clone for ControlFlow<B, C>
impl<Dyn> Clone for DynMetadata<Dyn>where
Dyn: ?Sized,
impl<E> Clone for BoolDeserializer<E>
impl<E> Clone for CharDeserializer<E>
impl<E> Clone for F32Deserializer<E>
impl<E> Clone for F64Deserializer<E>
impl<E> Clone for I8Deserializer<E>
impl<E> Clone for I16Deserializer<E>
impl<E> Clone for I32Deserializer<E>
impl<E> Clone for I64Deserializer<E>
impl<E> Clone for I128Deserializer<E>
impl<E> Clone for IsizeDeserializer<E>
impl<E> Clone for StringDeserializer<E>
impl<E> Clone for U8Deserializer<E>
impl<E> Clone for U16Deserializer<E>
impl<E> Clone for U32Deserializer<E>
impl<E> Clone for U64Deserializer<E>
impl<E> Clone for U128Deserializer<E>
impl<E> Clone for UnitDeserializer<E>
impl<E> Clone for UsizeDeserializer<E>
impl<F> Clone for FromFn<F>where
F: Clone,
impl<F> Clone for OnceWith<F>where
F: Clone,
impl<F> Clone for mmcp_server::inventory::core::iter::RepeatWith<F>where
F: Clone,
impl<F> Clone for OptionFuture<F>where
F: Clone,
impl<F> Clone for futures_util::stream::repeat_with::RepeatWith<F>where
F: Clone,
impl<G> Clone for FromCoroutine<G>where
G: Clone,
impl<H> Clone for BuildHasherDefault<H>
impl<I> Clone for FromIter<I>where
I: Clone,
impl<I> Clone for DecodeUtf16<I>
impl<I> Clone for Cloned<I>where
I: Clone,
impl<I> Clone for Copied<I>where
I: Clone,
impl<I> Clone for Cycle<I>where
I: Clone,
impl<I> Clone for Enumerate<I>where
I: Clone,
impl<I> Clone for Fuse<I>where
I: Clone,
impl<I> Clone for Intersperse<I>
impl<I> Clone for Peekable<I>
impl<I> Clone for Skip<I>where
I: Clone,
impl<I> Clone for StepBy<I>where
I: Clone,
impl<I> Clone for Take<I>where
I: Clone,
impl<I> Clone for futures_util::stream::iter::Iter<I>where
I: Clone,
impl<I, E> Clone for SeqDeserializer<I, E>
impl<I, F> Clone for FilterMap<I, F>
impl<I, F> Clone for Inspect<I, F>
impl<I, F> Clone for mmcp_server::inventory::core::iter::Map<I, F>
impl<I, F, const N: usize> Clone for MapWindows<I, F, N>
impl<I, G> Clone for IntersperseWith<I, G>
impl<I, P> Clone for Filter<I, P>
impl<I, P> Clone for MapWhile<I, P>
impl<I, P> Clone for SkipWhile<I, P>
impl<I, P> Clone for TakeWhile<I, P>
impl<I, St, F> Clone for Scan<I, St, F>
impl<I, U> Clone for Flatten<I>
impl<I, U, F> Clone for FlatMap<I, U, F>
impl<I, const N: usize> Clone for ArrayChunks<I, N>
impl<Idx> Clone for mmcp_server::inventory::core::ops::Range<Idx>where
Idx: Clone,
impl<Idx> Clone for mmcp_server::inventory::core::ops::RangeFrom<Idx>where
Idx: Clone,
impl<Idx> Clone for mmcp_server::inventory::core::ops::RangeInclusive<Idx>where
Idx: Clone,
impl<Idx> Clone for RangeTo<Idx>where
Idx: Clone,
impl<Idx> Clone for RangeToInclusive<Idx>where
Idx: Clone,
impl<Idx> Clone for mmcp_server::inventory::core::range::Range<Idx>where
Idx: Clone,
impl<Idx> Clone for mmcp_server::inventory::core::range::RangeFrom<Idx>where
Idx: Clone,
impl<Idx> Clone for mmcp_server::inventory::core::range::RangeInclusive<Idx>where
Idx: Clone,
impl<K> Clone for std::collections::hash::set::Iter<'_, K>
impl<K> Clone for hashbrown::set::Iter<'_, K>
impl<K, V> Clone for Box<Slice<K, V>>
impl<K, V> Clone for alloc::collections::btree::map::Cursor<'_, K, V>
impl<K, V> Clone for alloc::collections::btree::map::Iter<'_, K, V>
impl<K, V> Clone for alloc::collections::btree::map::Keys<'_, K, V>
impl<K, V> Clone for alloc::collections::btree::map::Range<'_, K, V>
impl<K, V> Clone for alloc::collections::btree::map::Values<'_, K, V>
impl<K, V> Clone for std::collections::hash::map::Iter<'_, K, V>
impl<K, V> Clone for std::collections::hash::map::Keys<'_, K, V>
impl<K, V> Clone for std::collections::hash::map::Values<'_, K, V>
impl<K, V> Clone for hashbrown::map::Iter<'_, K, V>
impl<K, V> Clone for hashbrown::map::Keys<'_, K, V>
impl<K, V> Clone for hashbrown::map::Values<'_, K, V>
impl<K, V> Clone for indexmap::map::iter::IntoIter<K, V>
impl<K, V> Clone for indexmap::map::iter::Iter<'_, K, V>
impl<K, V> Clone for indexmap::map::iter::Keys<'_, K, V>
impl<K, V> Clone for indexmap::map::iter::Values<'_, K, V>
impl<K, V, A> Clone for BTreeMap<K, V, A>
impl<K, V, S> Clone for std::collections::hash::map::HashMap<K, V, S>
impl<K, V, S> Clone for IndexMap<K, V, S>
impl<K, V, S, A> Clone for hashbrown::map::HashMap<K, V, S, A>
impl<Ptr> Clone for Pin<Ptr>where
Ptr: Clone,
impl<S> Clone for futures_util::stream::poll_immediate::PollImmediate<S>where
S: Clone,
impl<Si, F> Clone for SinkMapErr<Si, F>
impl<Si, Item, U, Fut, F> Clone for With<Si, Item, U, Fut, F>
impl<T> !Clone for &mut Twhere
T: ?Sized,
Shared references can be cloned, but mutable references cannot!
impl<T> Clone for Bound<T>where
T: Clone,
impl<T> Clone for Option<T>where
T: Clone,
impl<T> Clone for Poll<T>where
T: Clone,
impl<T> Clone for SendTimeoutError<T>where
T: Clone,
impl<T> Clone for std::sync::mpsc::TrySendError<T>where
T: Clone,
impl<T> Clone for *const Twhere
T: ?Sized,
impl<T> Clone for *mut Twhere
T: ?Sized,
impl<T> Clone for &Twhere
T: ?Sized,
Shared references can be cloned, but mutable references cannot!