fixed_hash/
lib.rs

1// Copyright 2020 Parity Technologies
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9#![cfg_attr(not(feature = "std"), no_std)]
10
11// Re-export liballoc using an alias so that the macros can work without
12// requiring `extern crate alloc` downstream.
13#[doc(hidden)]
14pub extern crate alloc as alloc_;
15
16// Re-export libcore using an alias so that the macros can work without
17// requiring `use core` downstream.
18#[doc(hidden)]
19pub use core as core_;
20
21// This disables a warning for unused #[macro_use(..)]
22// which is incorrect since the compiler does not check
23// for all available configurations.
24#[allow(unused_imports)]
25#[doc(hidden)]
26pub use static_assertions;
27
28// Export `const_assert` macro so that users of this crate do not
29// have to import the `static_assertions` crate themselves.
30#[doc(hidden)]
31pub use static_assertions::const_assert;
32
33#[cfg(feature = "byteorder")]
34#[doc(hidden)]
35pub use byteorder;
36
37#[cfg(feature = "rustc-hex")]
38#[doc(hidden)]
39pub use rustc_hex;
40
41#[cfg(feature = "rand")]
42#[doc(hidden)]
43pub use rand;
44
45#[cfg(feature = "quickcheck")]
46#[doc(hidden)]
47pub use quickcheck;
48
49#[cfg(feature = "arbitrary")]
50#[doc(hidden)]
51pub use arbitrary;
52
53#[macro_use]
54mod hash;
55
56#[cfg(test)]
57mod tests;
58
59#[cfg(feature = "api-dummy")]
60construct_fixed_hash! {
61	/// Go here for an overview of the hash type API.
62	pub struct ApiDummy(32);
63}