Declare open-ended enum types as non-exhaustive
So that future variant additions don't require API break.
This commit is contained in:
parent
6c6fa0f2ff
commit
78785279c6
|
@ -289,6 +289,7 @@ impl AtomOrQuoted {
|
||||||
|
|
||||||
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum Response {
|
pub enum Response {
|
||||||
Greeting {
|
Greeting {
|
||||||
domain: String,
|
domain: String,
|
||||||
|
@ -409,6 +410,7 @@ impl Response {
|
||||||
|
|
||||||
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum Capability {
|
pub enum Capability {
|
||||||
// Send as mail [RFC821]
|
// Send as mail [RFC821]
|
||||||
// The description of SEND was updated by [RFC1123] and then its actual use was deprecated in [RFC2821]
|
// The description of SEND was updated by [RFC1123] and then its actual use was deprecated in [RFC2821]
|
||||||
|
@ -591,6 +593,7 @@ impl Capability {
|
||||||
|
|
||||||
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum AuthMechanism {
|
pub enum AuthMechanism {
|
||||||
Plain,
|
Plain,
|
||||||
Login,
|
Login,
|
||||||
|
|
Loading…
Reference in New Issue