unsafe-storage 0.1.1

Maintain invariants in macros without modules
Documentation
  • Coverage
  • 80%
    4 out of 5 items documented0 out of 4 items with examples
  • Size
  • Source code size: 2.94 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.54 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • andrewgazelka/unsafe-storage
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • andrewgazelka

UnsafeStorage

UnsafeStorage is used to mark that there are some arbitrary invariants which must be maintained in storing its inner value. Therefore, creation and modifying of the inner value is an "unsafe" behavior. Although it might not be unsafe in traditional Rust terms (no memory unsafety), behavior might be "undefined"—or at least undocumented, because invariants are expected to be upheld.

This is useful in macros which do not encapsulate their storage in modules. This makes the macros for the end-user more ergonomic, as they can use the macro multiple times in a single module.