Function pre::std::mem::zeroed [−][src]
pub unsafe fn zeroed<T>() -> T
Expand description
std::mem::zeroed
with preconditions.
This function behaves exactly like std::mem::zeroed
, but also has preconditions checked by pre
.
You should also read the Safety section on the documentation of std::mem::zeroed
.
This function has preconditions
This function has the following precondition generated by the pre
attribute:
- an all-zero byte-pattern is a valid value of
T
To call the function you need to assure
that the precondition holds:
ⓘ
#[assure(
"an all-zero byte-pattern is a valid value of `T`",
reason = "<specify the reason why you can assure this here>"
)]
zeroed();