mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-21 14:22:26 +00:00
291a924518
Casting ZST to non-ZST will result in a slice length of 0. Casting non-ZST to ZST will only work if the input slice has length 0, and results in a slice length of 0; if the input slice is not of length 0, PodCastError::OutputSliceWouldHaveSlop is returned. Updates the docs of the PodCastError variants to reflect when they can occur. Updates the docs of try_cast_slice (and checked::) to remove note about ZST <-> non-ZST not being allowed. Update bytes_of(_mut) to remove ZST check, since casting [ZST] -> [u8] is now allowed directly using cast_slice(_mut). Update must_cast_slice checks and doctests to allow [ZST] -> [non-ZST], but disallow [non-ZST] -> [ZST]. |
||
---|---|---|
.. | ||
allocation.rs | ||
anybitpattern.rs | ||
checked.rs | ||
contiguous.rs | ||
internal.rs | ||
lib.rs | ||
must.rs | ||
no_uninit.rs | ||
offset_of.rs | ||
pod_in_option.rs | ||
pod.rs | ||
transparent.rs | ||
zeroable_in_option.rs | ||
zeroable.rs |