Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/SantaClaas/embedded-fan-control.
Something went wrong. Try again.
616 B · 34 lines
Rust
1234567891011121314151617181920212223242526272829303132333435mod address { use core::ops::Deref;
#[derive(Debug, Clone, Copy)] pub(crate) struct Address(u8);
impl Address { pub(crate) const fn new(value: u8) -> Self { Self(value) } }
impl From<Address> for u8 { fn from(value: Address) -> Self { value.0 } }
impl From<u8> for Address { fn from(value: u8) -> Self { Self(value) } }
impl Deref for Address { type Target = u8;
fn deref(&self) -> &Self::Target { &self.0 } }}
pub(crate) use address::Address;