pub struct Device {
desc: Device,
}Fields§
§desc: DeviceImplementations§
Source§impl Device
impl Device
pub fn open(compatible: &str, ordinal: usize) -> Result<Self, Error>
pub fn write(&self, tx: &[u8], timeout: u16) -> Result<(), Error>
pub fn read(&self, rx: &mut [u8], timeout: u16) -> Result<(), Error>
pub fn write_read( &self, tx: &[u8], rx: &mut [u8], timeout: u16, ) -> Result<(), Error>
pub fn check_and_recover_bus(&self) -> Result<bool, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Device
impl !RefUnwindSafe for Device
impl !Send for Device
impl !Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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