Skip to main content

Module prelude

Module prelude 

Source
Expand description

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::*;

Re-exports§

pub use core::mem::align_of;
pub use core::mem::align_of_val;
pub use core::mem::size_of;
pub use core::mem::size_of_val;
pub use core::pin::Pin;
pub use ::ffi::c_char;
pub use ::ffi::c_int;
pub use ::ffi::c_long;
pub use ::ffi::c_longlong;
pub use ::ffi::c_schar;
pub use ::ffi::c_short;
pub use ::ffi::c_uchar;
pub use ::ffi::c_uint;
pub use ::ffi::c_ulong;
pub use ::ffi::c_ulonglong;
pub use ::ffi::c_ushort;
pub use ::ffi::c_void;
pub use ::ffi::CStr;
pub use macros::export;
pub use macros::fmt;
pub use macros::kunit_tests;
pub use macros::module;
pub use macros::vtable;
pub use pin_init::init;
pub use pin_init::pin_data;
pub use pin_init::pin_init;
pub use pin_init::pinned_drop;
pub use pin_init::InPlaceWrite;
pub use pin_init::Init;
pub use pin_init::PinInit;
pub use pin_init::Zeroable;
pub use pin_init::Zeroable;
pub use zerocopy::FromBytes;
pub use zerocopy_derive::FromBytes;
pub use super::alloc::Box;
pub use super::alloc::KBox;
pub use super::alloc::KVBox;
pub use super::alloc::KVVec;
pub use super::alloc::KVec;
pub use super::alloc::VBox;
pub use super::alloc::VVec;
pub use super::alloc::Vec;
pub use super::build_assert;
pub use super::build_assert;
pub use super::build_error;
pub use super::const_assert;
pub use super::current;
pub use super::dev_alert;
pub use super::dev_crit;
pub use super::dev_dbg;
pub use super::dev_emerg;
pub use super::dev_err;
pub use super::dev_info;
pub use super::dev_notice;
pub use super::dev_warn;
pub use super::error::Error;
pub use super::error::Result;
pub use super::init::InPlaceInit;
pub use super::pr_alert;
pub use super::pr_crit;
pub use super::pr_debug;
pub use super::pr_emerg;
pub use super::pr_err;
pub use super::pr_info;
pub use super::pr_notice;
pub use super::pr_warn;
pub use super::static_assert;
pub use super::str::CStrExt as _;
pub use super::try_init;
pub use super::try_pin_init;
pub use super::uaccess::UserPtr;
pub use super::ThisModule;
pub use super::dbg;
pub use super::alloc::flags::*;
pub use super::error::code::*;