#![allow(missing_docs)]
#![allow(missing_debug_implementations)]
#[cfg(test)]
mod tests;
pub mod backtrace;
pub mod fs;
pub mod io;
pub mod lazy_box;
pub mod memchr;
pub mod once;
pub mod process;
pub mod thread;
pub mod thread_info;
pub mod thread_local_dtor;
pub mod thread_parking;
pub mod wstr;
pub mod wtf8;
cfg_if::cfg_if! {
if #[cfg(target_os = "windows")] {
pub use crate::sys::thread_local_key;
} else {
pub mod thread_local_key;
}
}
cfg_if::cfg_if! {
if #[cfg(any(target_os = "l4re",
feature = "restricted-std",
all(target_family = "wasm", not(target_os = "emscripten")),
all(target_vendor = "fortanix", target_env = "sgx")))] {
pub use crate::sys::net;
} else {
pub mod net;
}
}
#[doc(hidden)]
pub trait AsInner<Inner: ?Sized> {
fn as_inner(&self) -> &Inner;
}
#[doc(hidden)]
pub trait AsInnerMut<Inner: ?Sized> {
fn as_inner_mut(&mut self) -> &mut Inner;
}
#[doc(hidden)]
pub trait IntoInner<Inner> {
fn into_inner(self) -> Inner;
}
#[doc(hidden)]
pub trait FromInner<Inner> {
fn from_inner(inner: Inner) -> Self;
}
#[allow(dead_code)] pub fn mul_div_u64(value: u64, numer: u64, denom: u64) -> u64 {
let q = value / denom;
let r = value % denom;
q * numer + r * numer / denom
}