Lines Matching defs:c_ulong
9 use crate::ffi::c_ulong;
13 /// Represents a frequency in hertz, wrapping a [`c_ulong`] value.
30 pub struct Hertz(pub c_ulong);
33 const KHZ_TO_HZ: c_ulong = 1_000;
34 const MHZ_TO_HZ: c_ulong = 1_000_000;
35 const GHZ_TO_HZ: c_ulong = 1_000_000_000;
38 pub const fn from_khz(khz: c_ulong) -> Self {
43 pub const fn from_mhz(mhz: c_ulong) -> Self {
48 pub const fn from_ghz(ghz: c_ulong) -> Self {
53 pub const fn as_hz(&self) -> c_ulong {
58 pub const fn as_khz(&self) -> c_ulong {
63 pub const fn as_mhz(&self) -> c_ulong {
68 pub const fn as_ghz(&self) -> c_ulong {
73 impl From<Hertz> for c_ulong {