pub enum ParityAndStopBit {
NoParityOneStopBit,
EvenParityOneStopBit,
OddParityOneStopBit,
NoParityTwoStopBits,
}Expand description
Parity and stop bits of the Modbus RTU protocol for the RS485 serial port.
Note: To set the value you need ‘KPPA’.
Variants§
NoParityOneStopBit
no parity, one stop bit
EvenParityOneStopBit
even parity, one stop bit
OddParityOneStopBit
odd parity, one stop bit
NoParityTwoStopBits
no parity, two stop bits
Implementations§
Source§impl ParityAndStopBit
impl ParityAndStopBit
pub fn decode_from_holding_registers(words: &[Word]) -> Result<Self, Error>
pub fn encode_for_write_registers(&self) -> Vec<Word> ⓘ
Trait Implementations§
Source§impl Clone for ParityAndStopBit
impl Clone for ParityAndStopBit
Source§fn clone(&self) -> ParityAndStopBit
fn clone(&self) -> ParityAndStopBit
Returns a duplicate 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 ParityAndStopBit
impl Debug for ParityAndStopBit
Source§impl Default for ParityAndStopBit
impl Default for ParityAndStopBit
Source§fn default() -> ParityAndStopBit
fn default() -> ParityAndStopBit
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ParityAndStopBit
impl<'de> Deserialize<'de> for ParityAndStopBit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ParityAndStopBit
impl Display for ParityAndStopBit
Source§impl ModbusParam for ParityAndStopBit
impl ModbusParam for ParityAndStopBit
Source§impl PartialEq for ParityAndStopBit
impl PartialEq for ParityAndStopBit
Source§impl Serialize for ParityAndStopBit
impl Serialize for ParityAndStopBit
impl Copy for ParityAndStopBit
impl StructuralPartialEq for ParityAndStopBit
Auto Trait Implementations§
impl Freeze for ParityAndStopBit
impl RefUnwindSafe for ParityAndStopBit
impl Send for ParityAndStopBit
impl Sync for ParityAndStopBit
impl Unpin for ParityAndStopBit
impl UnwindSafe for ParityAndStopBit
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