1 // SPDX-License-Identifier: GPL-2.0
3 //! The `kernel` prelude.
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.
11 //! use kernel::prelude::*;
15 pub use core::pin::Pin;
17 pub use crate::alloc::{box_ext::BoxExt, flags::*, vec_ext::VecExt};
20 pub use alloc::{boxed::Box, vec::Vec};
23 pub use macros::{module, pin_data, pinned_drop, vtable, Zeroable};
25 pub use super::build_assert;
27 // `super::std_vendor` is hidden, which makes the macro inline for some reason.
30 pub use super::{pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn};
32 pub use super::{init, pin_init, try_init, try_pin_init};
34 pub use super::static_assert;
36 pub use super::error::{code::*, Error, Result};
38 pub use super::{str::CStr, ThisModule};
40 pub use super::init::{InPlaceInit, InPlaceWrite, Init, PinInit};
42 pub use super::current;