pub enum Parity {
None,
Odd,
Even,
}Expand description
Parity checking modes for serial communication
Parity is an error detection method that adds an extra bit to each character to ensure the total number of 1 bits is either odd or even.
§Example
use serialplugin_core::state::Parity;
let parity = Parity::None; // No parity checking (most common)Variants§
None
No parity bit (most common for modern applications)
Odd
Parity bit ensures odd number of 1 bits
Even
Parity bit ensures even number of 1 bits
Implementations§
Trait Implementations§
impl Copy for Parity
Source§impl<'de> Deserialize<'de> for Parity
impl<'de> Deserialize<'de> for Parity
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
impl Eq for Parity
impl StructuralPartialEq for Parity
Auto Trait Implementations§
impl Forget for Parity
impl Freeze for Parity
impl Move for Parity
impl RefUnwindSafe for Parity
impl Send for Parity
impl Sync for Parity
impl Unpin for Parity
impl UnsafeUnpin for Parity
impl UnwindSafe for Parity
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