cloneless_cow 0.1.1

A greatly-reduced implementation of Cow that does not require T to be Clone but allows for storing either a reference or an owned instance for future needs of references to T.
Documentation
  • Coverage
  • 0%
    0 out of 4 items documented0 out of 1 items with examples
  • Size
  • Source code size: 15.72 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 713.19 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • AustinHellerRepo/cloneless_cow
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • AustinHellerRepo

Cloneless Cow

Allows for the storage of a reference or owned instance of a generic type T.

Features

  • Convenient storage of a reference or owned instance, even (and especially) for types that do not implement Clone
  • Able to access the instance reference via .as_ref()

Limitations

  • Impossible to clone T directly out of the instance or get back the owned T
    • This feature of Cow is also a limitation of Cow which this crate does not suffer from, as Cow requires T to implement the Clone trait when you may only want access to a reference of T