#![feature(get_disjoint_mut_helpers)]
#![cfg_attr(feature = "std", feature(mapped_lock_guards))]
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(not(feature = "std"))]
extern crate alloc;
#[cfg(not(feature = "std"))]
use alloc::collections::TryReserveError;
#[cfg(feature = "std")]
use std::collections::TryReserveError;
#[allow(unused)]
use core::hash::BuildHasher;
use core::slice::GetDisjointMutIndex;
use core::{borrow::Borrow, hash::Hash, ops::Index, slice::SliceIndex};
#[cfg(feature = "std")]
use std::{
ffi::{OsStr, OsString},
path::{Path, PathBuf},
};
#[allow(unused_imports)]
#[cfg(feature = "serde")]
use serde::{Deserialize, Deserializer, Serialize, Serializer, de::Visitor, ser::SerializeStruct};
macro_rules! re_export_item_from_std_or_alloc {
($($segments:ident)::+) => {
#[cfg(feature = "std")]
pub use std::$($segments)::+;
#[cfg(not(feature = "std"))]
pub use ::alloc::$($segments)::+;
};
}
macro_rules! re_export_items_from_std_or_alloc {
($($name:ident),+ $(,)?) => {
$(
#[allow(ambiguous_glob_reexports)]
#[cfg(feature = "std")]
pub use std::$name::*;
#[allow(ambiguous_glob_reexports)]
#[cfg(not(feature = "std"))]
pub use ::alloc::$name::*;
)+
};
}
macro_rules! re_export_mod_from_std_or_alloc {
($name:ident $(, $rest:tt)*) => {
pub mod $name {
re_export_items_from_std_or_alloc!($name);
}
re_export_mod_from_std_or_alloc!($($rest),*);
};
() => {};
}
macro_rules! re_export_item_from_std_or_core {
($($segments:ident)::+) => {
#[cfg(feature = "std")]
pub use std::$($segments)::+;
#[cfg(not(feature = "std"))]
pub use ::core::$($segments)::+;
};
}
#[allow(unused)]
macro_rules! re_export_items_from_std_or_core {
($($name:ident),+ $(,)?) => {
$(
#[allow(ambiguous_glob_reexports)]
#[cfg(feature = "std")]
pub use std::$name::*;
#[allow(ambiguous_glob_reexports)]
#[cfg(not(feature = "std"))]
pub use ::core::$name::*;
)+
};
}
#[allow(unused)]
macro_rules! re_export_mod_from_std_or_core {
($name:ident $(, $rest:tt)*) => {
pub mod $name {
re_export_items_from_std_or_core!($name);
}
re_export_mod_from_std_or_core!($($rest),*);
};
() => {};
}
pub mod accessor;
pub mod allocation;
pub mod asynchrone;
pub mod boxed;
pub mod builder;
pub mod cell;
pub mod cfg;
pub mod collections;
pub mod default;
pub mod format;
pub mod guard;
pub mod handle;
pub mod identity;
pub mod iter;
pub mod option;
pub mod range;
pub mod rc;
pub mod shared;
pub mod sync;
#[macro_use]
pub mod macros;
pub mod convert;
pub mod marker;
pub mod primitive;
pub mod ptr;
pub mod result;
#[cfg(feature = "std")]
pub mod singleton;
pub mod utils;
pub mod wrapper;
pub use hexga_bit as bit;
pub use hexga_map_on as map_on;
re_export_mod_from_std_or_core!(
any, array, ascii, clone, cmp, error, fmt, future, hash, hint, mem, net, num, panic, pin, ops, task, str, slice, borrow
);
#[cfg(feature = "std")]
pub mod io
{
pub use std::io::{
BufReader, BufWriter, Bytes, Chain, Cursor, Empty, Error, IntoInnerError, IoSlice, IoSliceMut, LineWriter, Lines, PipeReader, PipeWriter, Repeat, Sink,
Split, Stderr, StderrLock, Stdin, StdinLock, Stdout, StdoutLock, Take, WriterPanicked, prelude,
};
pub use std::io::{ErrorKind, SeekFrom};
pub use std::io::{BufRead, IsTerminal, Read, Seek, Write};
pub use std::io::{copy, empty, pipe, read_to_string, repeat, sink, stderr, stdin, stdout};
pub type IoResult<T = ()> = Result<T, Error>;
}
re_export_mod_from_std_or_alloc!(vec, string);
#[cfg(feature = "std")]
re_export_mod_from_std_or_alloc!(thread, fs, path);
use prelude::*;
pub mod prelude
{
pub use super::{hexga_prelude::*, std_prelude::*};
}
#[doc(hidden)]
pub mod modules
{
pub use super::{
accessor,
allocation,
asynchrone,
bit,
boxed,
builder,
cell,
cfg,
collections,
convert,
default,
format,
guard,
handle,
iter,
marker,
ops,
option,
primitive,
ptr,
rc,
result,
shared,
sync,
utils,
wrapper,
};
pub use super::{any, array, ascii, borrow, clone, cmp, error, fmt, future, hash, hint, mem, net, num, panic, pin, slice, str, task};
pub use crate::map_on;
pub use super::{string, vec};
#[cfg(feature = "std")]
pub use super::{fs, io, path, thread};
#[cfg(feature = "std")]
pub use super::singleton;
}
#[doc(hidden)]
pub mod hexga_prelude
{
#[rustfmt::skip]
#[allow(unused_imports)]
pub use super::{
allocation::prelude::*,
accessor::*,
asynchrone::*,
boxed::prelude::*,
builder::*,
collections::prelude::*,
default::prelude::*,
format::prelude::*,
guard::prelude::*,
handle::*,
option::prelude::*,
iter::prelude::*,
macros::prelude::*,
marker::prelude::*,
primitive::prelude::*,
utils::prelude::*,
wrapper::prelude::*,
result::prelude::*,
shared::prelude::*,
convert::prelude::*,
bit::prelude::*,
map_on::prelude::*,
};
pub(crate) use super::{primitive::*, ptr::*};
#[cfg(feature = "std")]
pub use super::singleton::prelude::*;
}
#[doc(hidden)]
pub mod hexga_traits
{
#[rustfmt::skip]
#[allow(unused_imports)]
pub use super::{
allocation::traits::*,
accessor::*,
asynchrone::*,
boxed::traits::*,
builder::*,
collections::traits::*,
collections::traits::*,
default::traits::*,
format::traits::*,
guard::traits::*,
handle::Handle,
utils::traits::*,
wrapper::traits::*,
result::traits::*,
shared::traits::*,
convert::traits::*,
bit::traits::*,
collections::traits,
};
}
#[doc(hidden)]
pub mod std_prelude
{
pub use core::{
cmp::Ordering,
convert::{AsMut, AsRef},
hash::{Hash, Hasher},
ops::{Deref, DerefMut},
};
re_export_items_from_std_or_core!(prelude);
}