Added
Wrapper<T>
trait added for creating wrapper structs with a structurally pinned value.MaybeZeroable
derive 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
Zeroable
forOption<&T>
andOption<&mut T>
- implement
Zeroable
forOption<[unsafe] [extern "abi"] fn(...args...) -> ret>
for"Rust"
and
"C"
ABIs and up to 20 arguments
Changed
InPlaceInit
now only exists when thealloc
orstd
features are enabled- added support for visibility in
Zeroable
derive macro - added support for
union
s inZeroable
derive macro - renamed the crate from
pinned-init
topin-init
andpinned-init-macro
topin-init-internal
- blanket impls of
Init
andPinInit
fromimpl<T, E> [Pin]Init<T, E> for T
to
impl<T> [Pin]Init<T> for T
- renamed
zeroed()
toinit_zeroed()
Fixed
-
Zeroable
implementation forOption<Box<T>>
&Option<NonNull<T>>
to only allowT: Sized
(soundness issue)Full changes: v0.0.9...v0.0.10