veecle_osal_std/lib.rs
1//! Std basic operating system abstraction layer for Veecle OS.
2//!
3//! This provides the primitives that we need to use in Veecle OS, using the std library.
4
5#![forbid(unsafe_code)]
6
7pub mod log;
8pub mod net;
9pub mod time;
10
11pub use veecle_osal_api::{Error, Result};
12pub use veecle_osal_std_macros::main;
13
14/// Do not use!
15///
16/// Reexported to enable the `veecle-osal-std` `main` macro.
17///
18/// This is exempted from SemVer versioning and may be changed or removed at any time without prior notice.
19#[doc(hidden)]
20pub mod reexports {
21 pub use rand;
22 pub use tokio;
23}
24
25/// Helper trait to convert errors into osal errors.
26///
27/// We cannot implement `From` as that would be part of the public API.
28pub(crate) trait IntoOsalError<E>
29where
30 E: core::error::Error,
31{
32 /// Converts the error into an OSAL error.
33 fn into_osal_error(self) -> E;
34}