Enum imap_types::extensions::quota::Resource
source · pub enum Resource<'a> {
Storage,
Message,
Mailbox,
AnnotationStorage,
Other(ResourceOther<'a>),
}
Expand description
A resource type for use in IMAP’s QUOTA extension.
Supported resource names MUST be advertised as a capability by prepending the resource name with “QUOTA=RES-”.
Variants§
Storage
The physical space estimate, in units of 1024 octets, of the mailboxes governed by the quota root.
This MAY not be the same as the sum of the RFC822.SIZE of the messages. Some implementations MAY include metadata sizes for the messages and mailboxes, and other implementations MAY store messages in such a way that the physical space used is smaller, for example, due to use of compression. Additional messages might not increase the usage. Clients MUST NOT use the usage figure for anything other than informational purposes; for example, they MUST NOT refuse to APPEND a message if the limit less the usage is smaller than the RFC822.SIZE divided by 1024 octets of the message, but it MAY warn about such condition. The usage figure may change as a result of performing actions not associated with adding new messages to the mailbox, such as SEARCH, since this may increase the amount of metadata included in the calculations.
When the server supports this resource type, it MUST also support the DELETED-STORAGE status data item.
Support for this resource MUST be indicated by the server by advertising the “QUOTA=RES-STORAGE” capability.
Message
The number of messages stored within the mailboxes governed by the quota root.
This MUST be an exact number; however, clients MUST NOT assume that a change in the usage indicates a change in the number of messages available, since the quota root may include mailboxes the client has no access to.
When the server supports this resource type, it MUST also support the DELETED status data item.
Support for this resource MUST be indicated by the server by advertising the “QUOTA=RES-MESSAGE” capability.
Mailbox
The number of mailboxes governed by the quota root.
This MUST be an exact number; however, clients MUST NOT assume that a change in the usage indicates a change in the number of mailboxes, since the quota root may include mailboxes the client has no access to.
Support for this resource MUST be indicated by the server by advertising the “QUOTA=RES-MAILBOX” capability.
AnnotationStorage
The maximum size of all annotations [RFC5257], in units of 1024 octets, associated with all messages in the mailboxes governed by the quota root.
Support for this resource MUST be indicated by the server by advertising the “QUOTA=RES-ANNOTATION-STORAGE” capability.
Other(ResourceOther<'a>)
An (unknown) resource.
Trait Implementations§
source§impl<'a> Arbitrary<'a> for Resource<'a>
impl<'a> Arbitrary<'a> for Resource<'a>
source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read more