Derive Macro macros::Zeroable

source ·
#[derive(Zeroable)]
Expand description

Derives the Zeroable trait for the given struct.

This can only be used for structs where every field implements the Zeroable trait.

Examples

#[derive(Zeroable)]
pub struct DriverData {
    id: i64,
    buf_ptr: *mut u8,
    len: usize,
}
This documentation is an old archive. Please see https://rust.docs.kernel.org instead.