bytemuck/src
zachs18 291a924518
Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256)
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].
2024-07-30 17:05:11 -06:00
..
allocation.rs Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256) 2024-07-30 17:05:11 -06:00
anybitpattern.rs Fix the errors CI is showing (#247) 2024-05-28 12:22:59 -06:00
checked.rs Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256) 2024-07-30 17:05:11 -06:00
contiguous.rs make clippy be quiet about useless nonsense. 2024-05-13 10:53:18 -06:00
internal.rs Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256) 2024-07-30 17:05:11 -06:00
lib.rs Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256) 2024-07-30 17:05:11 -06:00
must.rs Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256) 2024-07-30 17:05:11 -06:00
no_uninit.rs run cargo fmt (#120) 2022-07-24 09:27:49 -06:00
offset_of.rs [Feature] extend TransparentWrapper conversion functions (#58) 2021-03-28 23:11:13 -06:00
pod_in_option.rs improve docs 2022-07-02 15:29:48 -06:00
pod.rs Support Zeroable and Pod for f16 and f128 (#251) 2024-06-18 21:24:29 -06:00
transparent.rs Update TransparentWrapper asserts (#232) 2024-04-09 19:02:38 -06:00
zeroable_in_option.rs improve documentation for optional features (#203) 2023-09-05 13:39:41 -06:00
zeroable.rs Support Zeroable and Pod for f16 and f128 (#251) 2024-06-18 21:24:29 -06:00