possibly_uninit 0.1.0

Traits and types helping with using uninitialized memory safely.
Documentation
  • Coverage
  • 100%
    81 out of 81 items documented2 out of 58 items with examples
  • Size
  • Source code size: 118.15 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 12.25 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
  • Homepage
  • Kixunil/possibly_uninit
    1 0 5
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Kixunil

Possibly uninitialized

Traits and types helping with using uninitialized memory safely.

About

This crate provides several traits and types that make working with uninitialized memory safer. They avoid memory bugs like accidentally writing uninitialized value into initialized memory, reading uninitialized memory, etc. They also provide strong guarantees for other safe code, which is expressed as unsafe traits.

Since uninitialized values make most sense when it comes to large objects, the main focus is on slices and arrays. For instance, you can initialize Box<[T]> or Box<[T; N]> after it was allocated, avoiding copying. Unfortunately that part isn't quite perfect right now, but it does seem to work correctly.

The crate is no_std-compatible and alloc-compatible, of course.