Added
Wrapper<T>trait added for creating wrapper structs with a structurally pinned value.MaybeZeroablederive macro to try to deriveZeroable, but not error if not all fields
implement it.unsafe fn cast_[pin_]init()functions to unsafely change the initialized type of an initializerimpl<T, E> [Pin]Init<T, E> for Result<T, E>, so results are now (pin-)initializers- add
Zeroable::init_zeroed()delegating toinit_zeroed() - add new
zeroed(), a safe version ofmem::zeroed()and also provide it viaZeroable::zeroed() - implement
ZeroableforOption<&T>andOption<&mut T> - implement
ZeroableforOption<[unsafe] [extern "abi"] fn(...args...) -> ret>for"Rust"and
"C"ABIs and up to 20 arguments
Changed
InPlaceInitnow only exists when theallocorstdfeatures are enabled- added support for visibility in
Zeroablederive macro - added support for
unions inZeroablederive macro - renamed the crate from
pinned-inittopin-initandpinned-init-macrotopin-init-internal - blanket impls of
InitandPinInitfromimpl<T, E> [Pin]Init<T, E> for Tto
impl<T> [Pin]Init<T> for T - renamed
zeroed()toinit_zeroed()
Fixed
-
Zeroableimplementation forOption<Box<T>>&Option<NonNull<T>>to only allowT: Sized
(soundness issue)Full changes: v0.0.9...v0.0.10