/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! Specified frequency values.
usecrate::derives::*; use cssparser::match_ignore_ascii_case;
/// The unit of a `<frequency>` value. #[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd, ToShmem)] #[repr(u8)] pubenum FrequencyUnit { /// `Hz`
Hz, /// `kHz`
Khz,
}
impl FrequencyUnit { /// Returns the frequency unit for the given string. #[inline] pubfn from_str(unit: &str) -> Result<Self, ()> {
Ok(match_ignore_ascii_case! { unit, "hz" => Self::Hz, "khz" => Self::Khz,
_ => return Err(())
})
}
/// Returns this unit as a string. #[inline] pubfn as_str(self) -> &'static str { matchself { Self::Hz => "hz", Self::Khz => "khz",
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.