#[repr(C)]pub struct PamojaI2cAddress {
pub value: u16,
pub ten_bit: u8,
}Expand description
A validated I2C device address.
Build one with pamoja_i2c_address_seven_bit or
pamoja_i2c_address_ten_bit, which reject a value outside the width’s
range. Both fields are scalars, so this crosses the boundary by value.
Fields§
§value: u16The address itself, without the read/write bit.
ten_bit: u81 for a 10-bit address, 0 for a 7-bit one.
Trait Implementations§
Source§impl Clone for PamojaI2cAddress
impl Clone for PamojaI2cAddress
Source§fn clone(&self) -> PamojaI2cAddress
fn clone(&self) -> PamojaI2cAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PamojaI2cAddress
Source§impl Debug for PamojaI2cAddress
impl Debug for PamojaI2cAddress
impl Eq for PamojaI2cAddress
Source§impl PartialEq for PamojaI2cAddress
impl PartialEq for PamojaI2cAddress
Source§fn eq(&self, other: &PamojaI2cAddress) -> bool
fn eq(&self, other: &PamojaI2cAddress) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PamojaI2cAddress
Auto Trait Implementations§
impl Freeze for PamojaI2cAddress
impl RefUnwindSafe for PamojaI2cAddress
impl Send for PamojaI2cAddress
impl Sync for PamojaI2cAddress
impl Unpin for PamojaI2cAddress
impl UnsafeUnpin for PamojaI2cAddress
impl UnwindSafe for PamojaI2cAddress
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more