parcoll/
lock_free_errors.rs1pub enum LockFreePopErr {
3 Empty,
5 ShouldWait,
7}
8
9impl std::fmt::Debug for LockFreePopErr {
10 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11 match self {
12 Self::Empty => write!(f, "empty"),
13 Self::ShouldWait => write!(f, "should wait"),
14 }
15 }
16}
17
18pub enum LockFreePushErr<T> {
20 Full(T),
22 ShouldWait(T),
24}
25
26impl<T> std::fmt::Debug for LockFreePushErr<T> {
27 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28 match self {
29 Self::Full(_) => write!(f, "full"),
30 Self::ShouldWait(_) => write!(f, "should wait"),
31 }
32 }
33}
34
35pub enum LockFreePushManyErr {
37 NotEnoughSpace,
39 ShouldWait,
41}
42
43impl std::fmt::Debug for LockFreePushManyErr {
44 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
45 match self {
46 Self::NotEnoughSpace => write!(f, "not enough space"),
47 Self::ShouldWait => write!(f, "should wait"),
48 }
49 }
50}