[PATCH v2 18/19] rust: prelude: add `zerocopy{,_derive}::FromBytes`

Miguel Ojeda <[email protected]>
Newsgroups org.kernel.vger.linux-kbuild,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
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.

Signed-off-by: Miguel Ojeda <[email protected]>
---
 rust/kernel/prelude.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/rust/kernel/prelude.rs b/rust/kernel/prelude.rs
index bcd4e7f90bc7..ca260cc3937a 100644
--- a/rust/kernel/prelude.rs
+++ b/rust/kernel/prelude.rs
@@ -60,6 +60,12 @@
     Zeroable, //
 };
 
+#[doc(no_inline)]
+pub use zerocopy::FromBytes;
+
+#[doc(no_inline)]
+pub use zerocopy_derive::FromBytes;
+
 #[doc(no_inline)]
 pub use super::{
     alloc::{
-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.