Home
last modified time | relevance | path

Searched refs:Zeroable (Results 1 – 6 of 6) sorted by relevance

/linux/rust/pin-init/src/
H A Dlib.rs398 /// 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 Dmacros.rs1033 /// - `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 Dzeroable.rs27 // 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 Dlib.rs46 #[proc_macro_derive(Zeroable)]
/linux/rust/kernel/
H A Dtypes.rs12 use pin_init::{PinInit, Wrapper, Zeroable};
330 unsafe impl<T> Zeroable for Opaque<T> {}
H A Dprelude.rs27 pub use pin_init::{init, pin_data, pin_init, pinned_drop, InPlaceWrite, Init, PinInit, Zeroable};