Skip to main content

Crate clone_behavior

Crate clone_behavior 

Source
Expand description

Clone Behavior

github Latest version Documentation Apache 2.0 or MIT license.

Bound the semantic behavior and time complexity of cloning a value.

A future version of this crate might provide a derive macro if there is interest.

§Conditions for v1.0.0

This crate currently feels relatively stable and complete. A v1.0.0 release will be made if continued usage of clone-behavior does not reveal flaws.

§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§

Fast
Indicates that a cloning operation is constant-time.
MaybeSlow
Places no constraints on the speed of a cloning operation.

Traits§

DeepClone
Get deep clones of a value, which do not share any semantically-important mutable state.
FastDeepClone
Quickly get deep clones of a value, which do not share any semantically-important mutable state.
FastMirroredClone
Quickly get clones that share all semantically-important mutable state.
MirroredClone
Get clones that share all semantically-important mutable state.
Speed
Trait for indicating the overhead and/or time complexity of a cloning operation.