Searched refs:Zeroable (Results 1 – 6 of 6) sorted by relevance
/linux/rust/pin-init/src/ |
H A D | lib.rs | 398 /// Derives the [`Zeroable`] trait for the given `struct` or `union`. 400 /// This can only be used for `struct`s/`union`s where every field implements the [`Zeroable`] 406 /// use pin_init::Zeroable; 408 /// #[derive(Zeroable)] 417 /// use pin_init::Zeroable; 419 /// #[derive(Zeroable)] 425 pub use ::pin_init_internal::Zeroable; 427 /// Derives the [`Zeroable`] trait for the given `struct` or `union` if all fields implement 428 /// [`Zeroable`]. 430 /// Contrary to the derive macro named [`macro@Zeroable`], thi 1498 pub unsafe trait Zeroable { global() interface 1658 unsafe impl<$first: Zeroable, $($t: Zeroable),*> Zeroable for ($first, $($t),*) {} global() impl [all...] |
H A D | macros.rs | 1033 /// - `with_update_parsed`: when the `..Zeroable::init_zeroed()` syntax has been handled. 1077 @munch_fields(..Zeroable::init_zeroed()), 1153 // check that the type actually implements `Zeroable`. 1155 fn assert_zeroable<T: $crate::Zeroable>(_: *mut T) {} 1156 // Ensure that the struct is indeed `Zeroable`. 1158 // SAFETY: The type implements `Zeroable` by the check above. 1199 @munch_fields($(..Zeroable::init_zeroed())? $(,)?), 1303 @munch_fields(..Zeroable::init_zeroed() $(,)?), 1307 // `..Zeroable::init_zeroed()`, the slot will already have been zeroed and all field that have 1400 // SAFETY: Every field type implements `Zeroable` an [all...] |
/linux/rust/pin-init/internal/src/ |
H A D | zeroable.rs | 27 // Now we insert `Zeroable` as a bound for every generic parameter in `impl_generics`. in parse_zeroable_derive_input() 29 // Are we inside of a generic where we want to add `Zeroable`? in parse_zeroable_derive_input() 31 // Have we already inserted `Zeroable`? in parse_zeroable_derive_input() 40 new_impl_generics.extend(quote! { : ::pin_init::Zeroable }); in parse_zeroable_derive_input() 54 new_impl_generics.extend(quote! { ::pin_init::Zeroable + }); in parse_zeroable_derive_input() 72 new_impl_generics.extend(quote! { : ::pin_init::Zeroable }); in parse_zeroable_derive_input()
|
H A D | lib.rs | 46 #[proc_macro_derive(Zeroable)]
|
/linux/rust/kernel/ |
H A D | types.rs | 12 use pin_init::{PinInit, Wrapper, Zeroable}; 330 unsafe impl<T> Zeroable for Opaque<T> {}
|
H A D | prelude.rs | 27 pub use pin_init::{init, pin_data, pin_init, pinned_drop, InPlaceWrite, Init, PinInit, Zeroable};
|