Struct novatel_oem6_api::Connection [−][src]
Wrapper for UART stream
Fields
stream: Box<Stream + 'static>
Any boxed stream that allows for communication over serial ports
Methods
impl Connection
[src]
impl Connection
pub fn new(stream: Box<Stream + 'static>) -> Connection
[src]
pub fn new(stream: Box<Stream + 'static>) -> Connection
Constructor to creation connection with provided stream
pub fn from_path(
bus: &str,
settings: PortSettings,
timeout: Duration
) -> Result<Connection, UartError>
[src]
pub fn from_path(
bus: &str,
settings: PortSettings,
timeout: Duration
) -> Result<Connection, UartError>
Convenience constructor to create connection from bus path
pub fn write(&self, data: &[u8]) -> Result<(), UartError>
[src]
pub fn write(&self, data: &[u8]) -> Result<(), UartError>
Writes out raw bytes to the stream
pub fn read(&self, len: usize, timeout: Duration) -> Result<Vec<u8>, UartError>
[src]
pub fn read(&self, len: usize, timeout: Duration) -> Result<Vec<u8>, UartError>
Reads messages upto specified length recieved on the bus
Auto Trait Implementations
impl Send for Connection
impl Send for Connection
impl !Sync for Connection
impl !Sync for Connection