Debian Codegraph @

third_party/rust/fallible_collections/src/try_reserve_error.rs

raw
1 #[cfg(all(feature = "unstable", not(feature = "rust_1_57")))]
2 pub use alloc::collections::TryReserveError;
3 #[cfg(all(feature = "hashmap", not(all(feature = "unstable", not(feature = "rust_1_57")))))]
4 pub use hashbrown::TryReserveError;
5
6 /// The error type for `try_reserve` methods.
7 #[cfg(all(not(feature = "hashmap"), not(all(feature = "unstable", not(feature = "rust_1_57")))))]
8 #[derive(Clone, PartialEq, Eq, Debug)]
9 pub enum TryReserveError {
10 /// Error due to the computed capacity exceeding the collection's maximum
11 /// (usually `isize::MAX` bytes).
12 CapacityOverflow,
13
14 /// The memory allocator returned an error
15 AllocError {
16 /// The layout of the allocation request that failed.
17 layout: alloc::alloc::Layout,
18 },
19 }