pub fn open_any(interface: Rc<Interface>) -> Result<Device> {
        let raw = 0 as *const libc::c_void;
        let mut id = 0;
        let res = unsafe { j2534_PassThruOpen(interface.handle, raw as *const libc::c_char, &mut id as *mut libc::uint32_t) };
        if res != 0 {
            return Err(Error::from_code(res));
        }

        Ok(Device {interface, id})
    }
/// 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();
/// ```
Creates a `Device` from any connected PassThru devices
Creates a ` Device ` from any connected PassThru devices
pub fn open_any(interface: Rc<Interface>) -> Result<Device> {
        let raw = 0 as *const libc::c_void;
        let mut id = 0;
        let res = unsafe { j2534_PassThruOpen(interface.handle, raw as *const libc::c_char, &mut id as *mut libc::uint32_t) };
        if res != 0 {
            return Err(Error::from_code(res));
        }
        Ok(Device {interface, id})
    }
pub fn open_any ( interface : Rc < Interface > ) -> Result < Device > { let raw = 0 as * const libc :: c_void ; let mut id = 0 ; let res = unsafe { j2534_PassThruOpen ( interface . handle , raw as * const libc :: c_char , & mut id as * mut libc :: uint32_t ) } ; if res != 0 { return Err ( Error :: from_code ( res ) ) ; } Ok ( Device { interface , id } ) }
Creates a `Device` from any connected PassThru devices
Creates a ` Device ` from any connected PassThru devices
interface
Rc<Interface>
interface
Rc<Interface>
example
```
use j2534::Interface;
let interface = Interface::new("C:\\j2534_driver.dll").unwrap();
let device = interface.open_any().unwrap();
```
` ` ` use j2534 :: Interface ; let interface = Interface :: new ( " C : \\ j2534_driver . dll " ) . unwrap () ; let device = interface . open_any () . unwrap () ; ` ` `