prelude.rs (50501936288d6a29d7ef78f25d00e33240fad45f) prelude.rs (071cedc84e907f6984b3de3285ec2b077d3c3cdb)
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

--- 4 unchanged lines hidden (view full) ---

13
14#[doc(no_inline)]
15pub use core::pin::Pin;
16
17#[doc(no_inline)]
18pub use alloc::{boxed::Box, vec::Vec};
19
20#[doc(no_inline)]
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

--- 4 unchanged lines hidden (view full) ---

13
14#[doc(no_inline)]
15pub use core::pin::Pin;
16
17#[doc(no_inline)]
18pub use alloc::{boxed::Box, vec::Vec};
19
20#[doc(no_inline)]
21pub use macros::{module, pin_data, pinned_drop, vtable};
21pub use macros::{module, pin_data, pinned_drop, vtable, Zeroable};
22
23pub use super::build_assert;
24
25// `super::std_vendor` is hidden, which makes the macro inline for some reason.
26#[doc(no_inline)]
27pub use super::dbg;
28pub use super::{pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn};
29
30pub use super::{init, pin_init, try_init, try_pin_init};
31
32pub use super::static_assert;
33
34pub use super::error::{code::*, Error, Result};
35
36pub use super::{str::CStr, ThisModule};
37
38pub use super::init::{InPlaceInit, Init, PinInit};
39
40pub use super::current;
22
23pub use super::build_assert;
24
25// `super::std_vendor` is hidden, which makes the macro inline for some reason.
26#[doc(no_inline)]
27pub use super::dbg;
28pub use super::{pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn};
29
30pub use super::{init, pin_init, try_init, try_pin_init};
31
32pub use super::static_assert;
33
34pub use super::error::{code::*, Error, Result};
35
36pub use super::{str::CStr, ThisModule};
37
38pub use super::init::{InPlaceInit, Init, PinInit};
39
40pub use super::current;