Crate clone_behavior

Source
Expand description

Clone Behavior

This is a stub, with the bare minimum that I need right now to bound the semantic behavior of clones, as I do not wish to go on a yak-shaving sidequest at the moment.

A proper version of this crate will have documentation and provide a derive macro.

§License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Enums§

AnySpeed
Places no constraint on the overhead or time complexity of a cloning operation.
ConstantTime
Indicates that a cloning operation is constant-time, but might involve acquiring a lock or performing some computations that aren’t NearInstant.
LogTime
Indicates that a cloning operation operates in logarithmic time or faster.
NearInstant
Indicates that a cloning operation is:

Traits§

IndependentClone
Get deep clones of a value, which do not share any semantically-important mutable state.
MirroredClone
Get clones that share all semantically-important mutable state.
MixedClone
Get clones that could share some but not all semantically-important mutable state.
NonRecursive
Indicates that the speed of cloning a type does not recursively depend on any generics, opting the type into several blanket implementations.
Speed
Trait for indicating the overhead and/or time complexity of a cloning operation.