Struct i2c_linux_sys::i2c_smbus_data
source · [−]Expand description
Data for SMBus Messages
Fields
block: [u8; 34]
block[0]
is used for length and one more for user-space compatibility
Implementations
sourceimpl i2c_smbus_data
impl i2c_smbus_data
pub fn from_byte(v: u8) -> Self
pub fn from_word(v: u16) -> Self
pub fn from_block(v: &[u8]) -> Self
pub fn byte(&self) -> u8
pub fn set_byte(&mut self, v: u8)
pub fn word(&self) -> u16
pub fn set_word(&mut self, v: u16)
pub fn block(&self) -> Option<&[u8]>
pub fn block_mut(&mut self) -> Option<&mut [u8]>
pub fn set_block(&mut self, v: &[u8])
Trait Implementations
sourceimpl Clone for i2c_smbus_data
impl Clone for i2c_smbus_data
sourcefn clone(&self) -> i2c_smbus_data
fn clone(&self) -> i2c_smbus_data
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for i2c_smbus_data
impl Debug for i2c_smbus_data
sourceimpl Default for i2c_smbus_data
impl Default for i2c_smbus_data
impl Copy for i2c_smbus_data
Auto Trait Implementations
impl RefUnwindSafe for i2c_smbus_data
impl Send for i2c_smbus_data
impl Sync for i2c_smbus_data
impl Unpin for i2c_smbus_data
impl UnwindSafe for i2c_smbus_data
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more