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#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
7
8pub mod log;
9pub mod net;
10pub mod thread;
11pub mod time;
12
13pub use veecle_osal_api::{Error, Result};
14pub use veecle_osal_std_macros::main;
15
16/// Do not use!
17///
18/// Reexported to enable the `veecle-osal-std` `main` macro.
19///
20/// This is exempted from SemVer versioning and may be changed or removed at any time without prior notice.
21#[doc(hidden)]
22pub mod reexports {
23    pub use rand;
24    pub use tokio;
25}
26
27/// Helper trait to convert errors into osal errors.
28///
29/// We cannot implement `From` as that would be part of the public API.
30pub(crate) trait IntoOsalError<E>
31where
32    E: core::error::Error,
33{
34    /// Converts the error into an OSAL error.
35    fn into_osal_error(self) -> E;
36}