Struct serial_embedded_hal::PortSettings [−]
pub struct PortSettings { pub baud_rate: BaudRate, pub char_size: CharSize, pub parity: Parity, pub stop_bits: StopBits, pub flow_control: FlowControl, }
A device-indepenent implementation of serial port settings.
Fields
baud_rate: BaudRate
Baud rate.
char_size: CharSize
Character size.
parity: Parity
Parity checking mode.
stop_bits: StopBits
Number of stop bits.
flow_control: FlowControl
Flow control mode.
Trait Implementations
impl SerialPortSettings for PortSettings
impl SerialPortSettings for PortSettings
fn baud_rate(&self) -> Option<BaudRate>
fn baud_rate(&self) -> Option<BaudRate>
Returns the current baud rate. Read more
fn char_size(&self) -> Option<CharSize>
fn char_size(&self) -> Option<CharSize>
Returns the character size. Read more
fn parity(&self) -> Option<Parity>
fn parity(&self) -> Option<Parity>
Returns the parity-checking mode. Read more
fn stop_bits(&self) -> Option<StopBits>
fn stop_bits(&self) -> Option<StopBits>
Returns the number of stop bits. Read more
fn flow_control(&self) -> Option<FlowControl>
fn flow_control(&self) -> Option<FlowControl>
Returns the flow control mode. Read more
fn set_baud_rate(&mut self, baud_rate: BaudRate) -> Result<(), Error>
fn set_baud_rate(&mut self, baud_rate: BaudRate) -> Result<(), Error>
Sets the baud rate. Read more
fn set_char_size(&mut self, char_size: CharSize)
fn set_char_size(&mut self, char_size: CharSize)
Sets the character size.
fn set_parity(&mut self, parity: Parity)
fn set_parity(&mut self, parity: Parity)
Sets the parity-checking mode.
fn set_stop_bits(&mut self, stop_bits: StopBits)
fn set_stop_bits(&mut self, stop_bits: StopBits)
Sets the number of stop bits.
fn set_flow_control(&mut self, flow_control: FlowControl)
fn set_flow_control(&mut self, flow_control: FlowControl)
Sets the flow control mode.
impl Clone for PortSettings
impl Clone for PortSettings
fn clone(&self) -> PortSettings
fn clone(&self) -> PortSettings
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for PortSettings
impl Debug for PortSettings
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Copy for PortSettings
impl Copy for PortSettings
impl Eq for PortSettings
impl Eq for PortSettings
impl PartialEq<PortSettings> for PortSettings
impl PartialEq<PortSettings> for PortSettings
fn eq(&self, other: &PortSettings) -> bool
fn eq(&self, other: &PortSettings) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &PortSettings) -> bool
fn ne(&self, other: &PortSettings) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for PortSettings
impl Send for PortSettings
impl Sync for PortSettings
impl Sync for PortSettings