pub fn read_msgs<'b>(&self, msgs: &'b mut [PassThruMsg], timeout: u32) -> Result<&'b [PassThruMsg]> {
        for msg in msgs.iter_mut() {
            msg.protocol_id = self.protocol_id;
        }
        let mut num_msgs: u32 = msgs.len() as u32;
        let res = unsafe { j2534_PassThruReadMsgs(self.device.interface.handle, self.id, msgs.as_mut_ptr(), &mut num_msgs as *mut libc::uint32_t, timeout) };
        if res != 0 {
            return Err(Error::from_code(res));
        }
        Ok(&msgs[..(num_msgs as usize)])
    }
/// Fills `msgs` with messages until timing out or until `msgs` is filled. Returns the slice of messages read.
/// 
/// # Arguments
/// 
/// * msgs - The array of messages to fill.
/// * timeout - The amount of time in milliseconds to wait. If set to zero, reads buffered messages and returns immediately
Fills `msgs` with messages until timing out or until `msgs` is filled. Returns the slice of messages read.
Fills ` msgs ` with messages until timing out or until ` msgs ` is filled . Returns the slice of messages read .
pub fn read_msgs<'b>(&self, msgs: &'b mut [PassThruMsg], timeout: u32) -> Result<&'b [PassThruMsg]> {
        for msg in msgs.iter_mut() {
            msg.protocol_id = self.protocol_id;
        }
        let mut num_msgs: u32 = msgs.len() as u32;
        let res = unsafe { j2534_PassThruReadMsgs(self.device.interface.handle, self.id, msgs.as_mut_ptr(), &mut num_msgs as *mut libc::uint32_t, timeout) };
        if res != 0 {
            return Err(Error::from_code(res));
        }
        Ok(&msgs[..(num_msgs as usize)])
    }
pub fn read_msgs < ' b > ( & self , msgs : & ' b mut [ PassThruMsg ] , timeout : u32 ) -> Result < & ' b [ PassThruMsg ] > { for msg in msgs . iter_mut ( ) { msg . protocol_id = self . protocol_id ; } let mut num_msgs : u32 = msgs . len ( ) as u32 ; let res = unsafe { j2534_PassThruReadMsgs ( self . device . interface . handle , self . id , msgs . as_mut_ptr ( ) , & mut num_msgs as * mut libc :: uint32_t , timeout ) } ; if res != 0 { return Err ( Error :: from_code ( res ) ) ; } Ok ( & msgs [ .. ( num_msgs as usize ) ] ) }
Fills `msgs` with messages until timing out or until `msgs` is filled.
Fills ` msgs ` with messages until timing out or until ` msgs ` is filled .
&self
msgs
&'b mut [PassThruMsg]
timeout
u32
&self
msgs
&'b mut [PassThruMsg]
timeout
u32