Loading...
Note: File does not exist in v3.1.
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#[doc(no_inline)]
15pub use core::pin::Pin;
16
17pub use crate::alloc::{flags::*, Box, KBox, KVBox, KVVec, KVec, VBox, VVec, Vec};
18
19#[doc(no_inline)]
20pub use macros::{module, pin_data, pinned_drop, vtable, Zeroable};
21
22pub use super::build_assert;
23
24// `super::std_vendor` is hidden, which makes the macro inline for some reason.
25#[doc(no_inline)]
26pub use super::dbg;
27pub use super::fmt;
28pub use super::{dev_alert, dev_crit, dev_dbg, dev_emerg, dev_err, dev_info, dev_notice, dev_warn};
29pub use super::{pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn};
30
31pub use super::{init, pin_init, try_init, try_pin_init};
32
33pub use super::static_assert;
34
35pub use super::error::{code::*, Error, Result};
36
37pub use super::{str::CStr, ThisModule};
38
39pub use super::init::{InPlaceInit, InPlaceWrite, Init, PinInit};
40
41pub use super::current;