aboutsummaryrefslogtreecommitdiff
path: root/rust/kernel/static_assert.rs
diff options
context:
space:
mode:
authorBenno Lossin <[email protected]>2023-04-08 12:26:12 +0000
committerMiguel Ojeda <[email protected]>2023-04-12 18:41:05 +0200
commit38cde0bd7b6772003a37b9aa6822568409556ee9 (patch)
treeff98bf79b564584914cefda0c9eedf1dd7cee218 /rust/kernel/static_assert.rs
parent6841d45a303029c54d6ad1ebb5dc72f7b2a74700 (diff)
rust: init: add `Zeroable` trait and `init::zeroed` function
Add the `Zeroable` trait which marks types that can be initialized by writing `0x00` to every byte of the type. Also add the `init::zeroed` function that creates an initializer for a `Zeroable` type that writes `0x00` to every byte. Signed-off-by: Benno Lossin <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Gary Guo <[email protected]> Reviewed-by: Andreas Hindborg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/kernel/static_assert.rs')
0 files changed, 0 insertions, 0 deletions