Skip to main content

ostd/
prelude.rs

1// SPDX-License-Identifier: MPL-2.0
2
3//! The prelude.
4
5/// A specialized [`Result`] type for this crate.
6///
7/// [`Result`]: core::result::Result
8#[expect(
9    unused_qualifications,
10    reason = "`error` below is intended to re-export the macro but brings the module into scope"
11)]
12pub type Result<T, E = crate::error::Error> = core::result::Result<T, E>;
13
14pub(crate) use alloc::{boxed::Box, sync::Arc, vec::Vec};
15
16#[cfg(ktest)]
17pub use ostd_macros::ktest;
18
19pub use crate::{
20    alert, crit, debug, early_print as print, early_println as println, emerg, error, info,
21    mm::{HasPaddr, HasSize, Paddr, Vaddr},
22    notice,
23    panic::abort,
24    warn,
25};