Struct serialport::SerialPortBuilder
source · pub struct SerialPortBuilder { /* private fields */ }
Expand description
A struct containing all serial port settings
Implementations§
source§impl SerialPortBuilder
impl SerialPortBuilder
sourcepub fn data_bits(self, data_bits: DataBits) -> Self
pub fn data_bits(self, data_bits: DataBits) -> Self
Set the number of bits used to represent a character sent on the line
sourcepub fn flow_control(self, flow_control: FlowControl) -> Self
pub fn flow_control(self, flow_control: FlowControl) -> Self
Set the type of signalling to use for controlling data transfer
sourcepub fn stop_bits(self, stop_bits: StopBits) -> Self
pub fn stop_bits(self, stop_bits: StopBits) -> Self
Set the number of bits to use to signal the end of a character
sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Set the amount of time to wait to receive data before timing out
sourcepub fn open(self) -> Result<Box<dyn SerialPort>>
pub fn open(self) -> Result<Box<dyn SerialPort>>
Open a cross-platform interface to the port with the specified settings
sourcepub fn open_native(self) -> Result<TTYPort>
pub fn open_native(self) -> Result<TTYPort>
Open a platform-specific interface to the port with the specified settings
Trait Implementations§
source§impl Clone for SerialPortBuilder
impl Clone for SerialPortBuilder
source§fn clone(&self) -> SerialPortBuilder
fn clone(&self) -> SerialPortBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SerialPortBuilder
impl Debug for SerialPortBuilder
source§impl PartialEq for SerialPortBuilder
impl PartialEq for SerialPortBuilder
source§fn eq(&self, other: &SerialPortBuilder) -> bool
fn eq(&self, other: &SerialPortBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SerialPortBuilder
impl StructuralPartialEq for SerialPortBuilder
Auto Trait Implementations§
impl Freeze for SerialPortBuilder
impl RefUnwindSafe for SerialPortBuilder
impl Send for SerialPortBuilder
impl Sync for SerialPortBuilder
impl Unpin for SerialPortBuilder
impl UnwindSafe for SerialPortBuilder
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