try-clone

Crates.iotry-clone
lib.rstry-clone
version0.2.0
created_at2025-12-28 20:55:55.235445+00
updated_at2026-01-02 22:47:15.620918+00
descriptionFallible cloning.
homepage
repositoryhttps://github.com/OpenByteDev/try-clone
max_upload_size
id2009378
size20,602
OpenByte (OpenByteDev)

documentation

https://docs.rs/try-clone

README

try-clone

CI crates.io Documentation dependency status MIT

Fallible cloning.

This crate defines TryClone, a small trait for types whose cloning operation can fail. Unlike Clone, which is infallible by design, TryClone returns a Result to allow implementations to report errors.

Implementations are provided for standard library types that expose a try_clone API, such as File, as well as for common containers and collections (Box, Arc, Vec, ...) where appropriate APIs exists.

A blanket implementation is available behind the blanket-impl feature, which implements TryClone for all Clone types.

License

Licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT)

Commit count: 0

cargo fmt