Function pre::std::ptr::write_unaligned [−][src]
pub unsafe fn write_unaligned<T>(dst: *mut T, src: T)
Expand description
std::ptr::write_unaligned
with preconditions.
This function behaves exactly like std::ptr::write_unaligned
, but also has preconditions checked by pre
.
You should also read the Safety section on the documentation of std::ptr::write_unaligned
.
This function has preconditions
This function has the following precondition generated by the pre
attribute:
- the pointer
dst
must be valid for writes
To call the function you need to assure
that the precondition holds:
ⓘ
#[assure(
valid_ptr(dst, w),
reason = "<specify the reason why you can assure this here>"
)]
write_unaligned(/* parameters omitted */);