Commit | Line | Data |
---|---|---|
247b365d WAF |
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 | ||
dec1df54 | 14 | #[doc(no_inline)] |
247b365d | 15 | pub use core::pin::Pin; |
474be445 | 16 | |
dec1df54 | 17 | #[doc(no_inline)] |
474be445 MO |
18 | pub use alloc::{boxed::Box, vec::Vec}; |
19 | ||
dec1df54 | 20 | #[doc(no_inline)] |
8586f1ac | 21 | pub use macros::{module, pin_data, pinned_drop, vtable}; |
474be445 | 22 | |
0f595bab GG |
23 | pub use super::build_assert; |
24 | ||
dec1df54 FB |
25 | // `super::std_vendor` is hidden, which makes the macro inline for some reason. |
26 | #[doc(no_inline)] | |
27 | pub use super::dbg; | |
28 | pub use super::{pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn}; | |
474be445 | 29 | |
8586f1ac BL |
30 | pub use super::{init, pin_init, try_init, try_pin_init}; |
31 | ||
ef9e3797 MO |
32 | pub use super::static_assert; |
33 | ||
25d176a4 | 34 | pub use super::error::{code::*, Error, Result}; |
474be445 | 35 | |
d126d238 | 36 | pub use super::{str::CStr, ThisModule}; |
8586f1ac BL |
37 | |
38 | pub use super::init::{InPlaceInit, Init, PinInit}; | |
8da7a2b7 WAF |
39 | |
40 | pub use super::current; |