Traits and types helping with using uninitialized memory safely.
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
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; N]> after it was allocated, avoiding copying.
Unfortunately that part isn’t quite perfect right now, but it does seem to
The crate is
alloc-compatible, of course.
Helpers for casting between smart pointer types.
Traits used for marking safety properties of
This module contains traits and types for working with slices of uninitialized memory
Helpers for zeroing out the memory
Mutable reference wrapper that only allows writing valid values to the memory location.
Trait allowing mutably borrowing of
Trait allowing borrowing of