wg/lib.rs
1/*
2 * Copyright 2021 Al Liu (https://github.com/al8n). Licensed under MIT OR Apache-2.0.
3 *
4 *
5 *
6 * Copyright 2021 AwaitGroup authors (https://github.com/ibraheemdev/awaitgroup). Licensed under MIT.
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20#![doc = include_str!("../README.md")]
21#![cfg_attr(not(all(feature = "std", test)), no_std)]
22#![deny(missing_docs, warnings)]
23#![cfg_attr(docsrs, feature(doc_cfg))]
24#![cfg_attr(docsrs, allow(unused_attributes))]
25
26#[cfg(not(any(feature = "alloc", feature = "std")))]
27compile_error!("This crate can only be used when feature `alloc` or `std` is enabled");
28
29#[cfg(not(feature = "std"))]
30extern crate alloc;
31
32#[cfg(feature = "std")]
33extern crate std;
34
35#[cfg(feature = "future")]
36mod future;
37
38#[cfg(feature = "future")]
39#[cfg_attr(docsrs, doc(cfg(feature = "future")))]
40pub use future::*;
41
42#[cfg(feature = "std")]
43mod sync;
44#[cfg(feature = "std")]
45pub use sync::*;
46
47#[cfg(not(feature = "std"))]
48mod no_std;
49#[cfg(not(feature = "std"))]
50pub use no_std::*;