2022-02-12 03:25:34 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
//! The `kernel` prelude.
|
|
|
|
//!
|
|
|
|
//! These are the most common items used by Rust code in the kernel,
|
|
|
|
//! intended to be imported by all Rust code, for convenience.
|
|
|
|
//!
|
|
|
|
//! # Examples
|
|
|
|
//!
|
|
|
|
//! ```
|
|
|
|
//! use kernel::prelude::*;
|
|
|
|
//! ```
|
|
|
|
|
|
|
|
pub use core::pin::Pin;
|
2022-11-11 00:41:13 +08:00
|
|
|
|
|
|
|
pub use alloc::{boxed::Box, vec::Vec};
|
|
|
|
|
2022-11-11 00:41:18 +08:00
|
|
|
pub use macros::{module, vtable};
|
2022-11-11 00:41:13 +08:00
|
|
|
|
2022-11-11 00:41:35 +08:00
|
|
|
pub use super::{dbg, pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn};
|
2022-11-11 00:41:13 +08:00
|
|
|
|
2022-11-11 00:41:23 +08:00
|
|
|
pub use super::error::{code::*, Error, Result};
|
2022-11-11 00:41:13 +08:00
|
|
|
|
2022-11-11 00:41:28 +08:00
|
|
|
pub use super::{str::CStr, ThisModule};
|