#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
#[repr(u32)]
pub enum InternetProtocolVersion6AcceptDuplicateAddressDetection
{
#[allow(missing_docs)]
Disable = 0,
#[allow(missing_docs)]
Enable = 1,
#[allow(missing_docs)]
EnableAndDisableInternetProtocolVersion5IfAMediaAccessControlDuplicateLinkLocalAddressHasBeenFound = 2,
}
impl Default for InternetProtocolVersion6AcceptDuplicateAddressDetection
{
#[inline(always)]
fn default() -> Self
{
InternetProtocolVersion6AcceptDuplicateAddressDetection::Enable
}
}
impl InternetProtocolVersion6AcceptDuplicateAddressDetection
{
#[inline(always)]
pub(crate) fn parse(value: u32) -> Result<Self, String>
{
use self::InternetProtocolVersion6AcceptDuplicateAddressDetection::*;
match value
{
0 => Ok(Disable),
1 => Ok(Enable),
2 => Ok(EnableAndDisableInternetProtocolVersion5IfAMediaAccessControlDuplicateLinkLocalAddressHasBeenFound),
_ => Err(format!("Unexpected value for accept_dad of {}", value))
}
}
}