imap_types/extensions/idle.rs
1//! IMAP4 IDLE command
2//!
3//! This extension adds a new method ...
4//!
5//! * [`CommandBody::idle()`](crate::command::CommandBody#method.idle)
6//!
7//! ... adds a new type ...
8//!
9//! * [`IdleDone`](crate::extensions::idle::IdleDone)
10//!
11//! ... and extends ...
12//!
13//! * [`CommandBody`](crate::command::CommandBody) enum with a new variant [`CommandBody::Idle`](crate::command::CommandBody#variant.Idle), and
14//! * [`Capability`](crate::response::Capability) enum with a new variant [`Capability::Idle`](crate::response::Capability#variant.Idle).
15
16#[cfg(feature = "arbitrary")]
17use arbitrary::Arbitrary;
18#[cfg(feature = "bounded-static")]
19use bounded_static::ToStatic;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22
23/// Denotes the continuation data message "DONE\r\n" to end the IDLE command.
24#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25#[cfg_attr(feature = "bounded-static", derive(ToStatic))]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[derive(Debug, Clone, PartialEq, Eq, Hash)]
28pub struct IdleDone;