#[derive(Default, Debug, Clone, PartialEq, Eq)]
#[derive(Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct EnergyEfficientEthernetInformation
{
pub speeds_we_could_advertise: HashSet<LegacySpeed>,
pub speeds_advertising_to_our_link_partner: HashSet<LegacySpeed>,
pub speeds_link_partner_advertising_to_us: HashSet<LegacySpeed>,
pub is_active: bool,
pub is_enabled: bool,
pub transmit_low_power_idle_microseconds: Option<u32>,
}
impl EnergyEfficientEthernetInformation
{
#[inline(always)]
pub(crate) fn is_this_a_speed_we_could_advertise(&self, speed: LegacySpeed) -> bool
{
self.speeds_we_could_advertise.contains(&speed)
}
}