[−][src]Struct j2534::Interface
A J2534 library
Implementations
impl Interface
[src]
pub fn new<S: AsRef<OsStr>>(path: S) -> Result<Interface, Error>
[src]
Returns a J2534 library given the path
Arguments
path
- The absolute path to the J2534 shared library
Example
use j2534::Interface; let interface = Interface::new("C:\\j2534_driver.dll").unwrap();
pub fn get_last_error(&self) -> Result<String, Error>
[src]
Returns a text description of the most recent error
pub fn open<S: Into<Vec<u8>>>(&self, port: S) -> Result<Device<'_>, Error>
[src]
Creates a Device
from the PassThru interface connected to the given port
Arguments
port
- The port to search for a J2534 device
Example
use j2534::Interface; let interface = Interface::new("C:\\j2534_driver.dll").unwrap(); let device = interface.open("COM2").unwrap();
pub fn open_any(&self) -> Result<Device<'_>, Error>
[src]
Creates a Device
from any connected PassThru devices
Example
use j2534::Interface; let interface = Interface::new("C:\\j2534_driver.dll").unwrap(); let device = interface.open_any().unwrap();
pub unsafe fn ioctl(
&self,
handle: u32,
id: IoctlId,
input: *mut c_void,
output: *mut c_void
) -> Result<i32, Error>
[src]
&self,
handle: u32,
id: IoctlId,
input: *mut c_void,
output: *mut c_void
) -> Result<i32, Error>
General purpose I/O control for modifying device or channel characteristics.
Auto Trait Implementations
impl RefUnwindSafe for Interface
[src]
impl !Send for Interface
[src]
impl !Sync for Interface
[src]
impl Unpin for Interface
[src]
impl UnwindSafe for Interface
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,