rust: prelude: add zerocopy{,_derive}::FromBytes

In order to easily use `FromBytes`, add it to the prelude.

This adds both the trait (`zerocopy::FromBytes`) as well as the derive
macro (`zerocopy_derive::FromBytes`).

We will be adding more as we need them.

Link: https://patch.msgid.link/20260608141439.182634-19-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
Miguel Ojeda
2026-06-08 16:14:37 +02:00
parent 5060549804
commit 54e7926044
+6
View File
@@ -60,6 +60,12 @@ pub use pin_init::{
Zeroable, //
};
#[doc(no_inline)]
pub use zerocopy::FromBytes;
#[doc(no_inline)]
pub use zerocopy_derive::FromBytes;
#[doc(no_inline)]
pub use super::{
alloc::{