#![cfg_attr(feature = "better-docs",
feature(doc_cfg, decl_macro, rustc_attrs),
cfg_attr(all(), doc = include_str!("../README.md")),
)]
#![cfg_attr(feature = "specialization",
feature(specialization),
)]
#![allow(unused_attributes)]
#![deny(
elided_lifetimes_in_paths,
missing_docs,
missing_copy_implementations,
missing_debug_implementations,
unused_must_use,
)]
#![no_std]
#[doc(hidden)]
pub use ::core;
#[cfg(feature = "alloc")]
#[doc(hidden)] pub extern crate alloc;
#[cfg(feature = "std")]
#[doc(hidden)] pub extern crate std;
#[macro_use]
mod utils;
pub mod prelude {
#[doc(no_inline)]
pub use crate::{
extension_traits::{
AsOut,
ManuallyDropMut,
},
out_ref::{
Out,
},
uninit_array,
};
cfg_alloc! {
#[doc(no_inline)]
pub use crate::extension_traits::{
BoxAssumeInit,
BoxNewUninitSlice,
BoxUninit,
VecCapacity,
};
}
pub use ::core::mem::MaybeUninit;
}
use_prelude!();
pub
mod extension_traits;
#[cfg(feature = "std")]
#[cfg_attr(feature = "nightly",
doc(cfg(feature = "std")),
)]
pub
mod read;
pub
mod out_ref;
#[macro_export]
macro_rules! uninit_array {(
$T:ty ; $count:expr
) => ({
use $crate::core::mem::MaybeUninit;
const __UNINIT_ARRAY_COUNT__: usize = $count;
unsafe {
MaybeUninit::<[MaybeUninit<$T>; __UNINIT_ARRAY_COUNT__]>::uninit()
.assume_init()
}
})}