1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
use std::num::NonZeroU32;
#[cfg(feature = "arbitrary")]
use arbitrary::Arbitrary;
use bounded_static_derive::ToStatic;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
/// Status data item name used to request a status data item.
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, Clone, PartialEq, Eq, Hash, ToStatic)]
#[doc(alias = "StatusAttribute")]
pub enum StatusDataItemName {
/// The number of messages in the mailbox.
Messages,
/// The number of messages with the \Recent flag set.
Recent,
/// The next unique identifier value of the mailbox.
UidNext,
/// The unique identifier validity value of the mailbox.
UidValidity,
/// The number of messages which do not have the \Seen flag set.
Unseen,
/// The number of messages with the \Deleted flag set.
Deleted,
/// The amount of storage space that can be reclaimed by performing EXPUNGE on the mailbox.
DeletedStorage,
#[cfg(feature = "ext_condstore_qresync")]
#[cfg_attr(docsrs, doc(cfg(feature = "ext_condstore_qresync")))]
HighestModSeq,
}
/// Status data item.
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", serde(tag = "type", content = "content"))]
#[derive(Debug, Clone, PartialEq, Eq, Hash, ToStatic)]
#[doc(alias = "StatusAttributeValue")]
pub enum StatusDataItem {
/// The number of messages in the mailbox.
Messages(u32),
/// The number of messages with the \Recent flag set.
Recent(u32),
/// The next unique identifier value of the mailbox. Refer to
/// section 2.3.1.1 for more information.
UidNext(NonZeroU32),
/// The unique identifier validity value of the mailbox. Refer to
/// section 2.3.1.1 for more information.
UidValidity(NonZeroU32),
/// The number of messages which do not have the \Seen flag set.
Unseen(u32),
/// The number of messages with the \Deleted flag set.
Deleted(u32),
/// The amount of storage space that can be reclaimed by performing EXPUNGE on the mailbox.
DeletedStorage(u64),
#[cfg(feature = "ext_condstore_qresync")]
#[cfg_attr(docsrs, doc(cfg(feature = "ext_condstore_qresync")))]
/// The highest mod-sequence value of all messages in the mailbox.
/// This is the same value that is returned by the server in the HIGHESTMODSEQ response code in
/// an OK untagged response (see Section 3.1.2.1).
///
/// If the server doesn't support the persistent storage of mod-sequences for the mailbox (see
/// Section 3.1.2.2), the server MUST return 0 as the value of the HIGHESTMODSEQ status data item.
HighestModSeq(u64),
}