arc_slice/error.rs
1use core::fmt;
2
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub enum TryReserveError {
5 NotUnique,
6 Unsupported,
7}
8
9impl fmt::Display for TryReserveError {
10 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
11 match self {
12 Self::NotUnique => write!(f, "not unique"),
13 Self::Unsupported => write!(f, "unsupported"),
14 }
15 }
16}
17
18#[cfg(feature = "std")]
19const _: () = {
20 extern crate std;
21 impl std::error::Error for TryReserveError {}
22};