A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.rs/hashbrown/0.15.4/x86_64-unknown-linux-gnu/src/hashbrown/lib.rs.html below:

lib.rs - source

1#![no_std]
13#![cfg_attr(
14    feature = "nightly",
15    feature(
16        test,
17        core_intrinsics,
18        dropck_eyepatch,
19        min_specialization,
20        extend_one,
21        allocator_api,
22        slice_ptr_get,
23        maybe_uninit_array_assume_init,
24        strict_provenance_lints
25    )
26)]
27#![cfg_attr(feature = "rustc-dep-of-std", feature(rustc_attrs))]
28#![allow(
29    clippy::doc_markdown,
30    clippy::module_name_repetitions,
31    clippy::must_use_candidate,
32    clippy::option_if_let_else,
33    clippy::redundant_else,
34    clippy::manual_map,
35    clippy::missing_safety_doc,
36    clippy::missing_errors_doc
37)]
38#![warn(missing_docs)]
39#![warn(rust_2018_idioms)]
40#![cfg_attr(feature = "nightly", warn(fuzzy_provenance_casts))]
41#![cfg_attr(
42    feature = "nightly",
43    allow(clippy::incompatible_msrv, internal_features)
44)]
45#![cfg_attr(
46    all(feature = "nightly", target_arch = "loongarch64"),
47    feature(stdarch_loongarch)
48)]
49
50#[cfg(feature = "default-hasher")]
52pub type DefaultHashBuilder = foldhash::fast::RandomState;
53
54#[cfg(not(feature = "default-hasher"))]
56pub enum DefaultHashBuilder {}
57
58#[cfg(test)]
59#[macro_use]
60extern crate std;
61
62#[cfg_attr(test, macro_use)]
63#[cfg_attr(feature = "rustc-dep-of-std", allow(unused_extern_crates))]
64extern crate alloc;
65
66#[cfg(feature = "nightly")]
67#[cfg(doctest)]
68doc_comment::doctest!("../README.md");
69
70#[macro_use]
71mod macros;
72
73mod control;
74mod raw;
75mod util;
76
77mod external_trait_impls;
78mod map;
79#[cfg(feature = "raw-entry")]
80mod raw_entry;
81#[cfg(feature = "rustc-internal-api")]
82mod rustc_entry;
83mod scopeguard;
84mod set;
85mod table;
86
87pub mod hash_map {
88    pub use crate::map::*;
90
91    #[cfg(feature = "rustc-internal-api")]
92    pub use crate::rustc_entry::*;
93
94    #[cfg(feature = "rayon")]
95    pub mod rayon {
101        pub use crate::external_trait_impls::rayon::map::*;
102    }
103}
104pub mod hash_set {
105    pub use crate::set::*;
107
108    #[cfg(feature = "rayon")]
109    pub mod rayon {
115        pub use crate::external_trait_impls::rayon::set::*;
116    }
117}
118pub mod hash_table {
119    pub use crate::table::*;
121
122    #[cfg(feature = "rayon")]
123    pub mod rayon {
129        pub use crate::external_trait_impls::rayon::table::*;
130    }
131}
132
133pub use crate::map::HashMap;
134pub use crate::set::HashSet;
135pub use crate::table::HashTable;
136
137#[cfg(feature = "equivalent")]
138pub use equivalent::Equivalent;
139
140#[cfg(not(feature = "equivalent"))]
142pub trait Equivalent<K: ?Sized> {
154    fn equivalent(&self, key: &K) -> bool;
163}
164
165#[cfg(not(feature = "equivalent"))]
166impl<Q: ?Sized, K: ?Sized> Equivalent<K> for Q
167where
168    Q: Eq,
169    K: core::borrow::Borrow<Q>,
170{
171    fn equivalent(&self, key: &K) -> bool {
172        self == key.borrow()
173    }
174}
175
176#[derive(Clone, PartialEq, Eq, Debug)]
178pub enum TryReserveError {
179    CapacityOverflow,
182
183    AllocError {
185        layout: alloc::alloc::Layout,
187    },
188}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4