use xso::{AsXml, FromXml};
use crate::ns;
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
#[xml(namespace = ns::TLS, name = "starttls")]
pub struct Request;
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
#[xml(namespace = ns::TLS, name = "proceed")]
pub struct Proceed;
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
#[xml(namespace = ns::TLS, name = "starttls")]
pub struct StartTls {
#[xml(child(default))]
pub required: Option<RequiredStartTls>,
}
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
#[xml(namespace = ns::TLS, name = "required")]
pub struct RequiredStartTls;
#[derive(FromXml, AsXml, Debug, Clone)]
#[xml()]
pub enum Nonza {
#[xml(transparent)]
Request(Request),
#[xml(transparent)]
Proceed(Proceed),
}
#[cfg(test)]
mod tests {
use super::*;
#[cfg(target_pointer_width = "32")]
#[test]
fn test_size() {
assert_size!(RequiredStartTls, 0);
assert_size!(StartTls, 1);
}
#[cfg(target_pointer_width = "64")]
#[test]
fn test_size() {
assert_size!(RequiredStartTls, 0);
assert_size!(StartTls, 1);
}
}