xref: /linux/rust/kernel/prelude.rs (revision 2455f0e124d317dd08d337a7550a78a224d4ba41)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 //! The `kernel` prelude.
4 //!
5 //! These are the most common items used by Rust code in the kernel,
6 //! intended to be imported by all Rust code, for convenience.
7 //!
8 //! # Examples
9 //!
10 //! ```
11 //! use kernel::prelude::*;
12 //! ```
13 
14 pub use core::pin::Pin;
15 
16 pub use alloc::{boxed::Box, vec::Vec};
17 
18 pub use macros::{module, vtable};
19 
20 pub use super::build_assert;
21 
22 pub use super::{dbg, pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn};
23 
24 pub use super::static_assert;
25 
26 pub use super::error::{code::*, Error, Result};
27 
28 pub use super::{str::CStr, ThisModule};
29