pub enum Parity {
Even = 0,
Odd = 1,
}
Expand description
Represents the parity passed between FFI function calls.
Variants§
Implementations§
Source§impl Parity
impl Parity
Sourcepub fn to_u8(self) -> u8
pub fn to_u8(self) -> u8
Converts parity into an integer (byte) value.
This returns 0
for even parity and 1
for odd parity.
Sourcepub fn to_i32(self) -> i32
pub fn to_i32(self) -> i32
Converts parity into an integer value.
This returns 0
for even parity and 1
for odd parity.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Parity
Available on crate feature serde
only.The parity is deserialized as u8
- 0
for even, 1
for odd.
impl<'de> Deserialize<'de> for Parity
Available on crate feature
serde
only.The parity is deserialized as u8
- 0
for even, 1
for odd.
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Parity
impl Ord for Parity
Source§impl PartialOrd for Parity
impl PartialOrd for Parity
Source§impl Serialize for Parity
Available on crate feature serde
only.The parity is serialized as u8
- 0
for even, 1
for odd.
impl Serialize for Parity
Available on crate feature
serde
only.The parity is serialized as u8
- 0
for even, 1
for odd.
impl Copy for Parity
impl Eq for Parity
impl StructuralPartialEq for Parity
Auto Trait Implementations§
impl Freeze for Parity
impl RefUnwindSafe for Parity
impl Send for Parity
impl Sync for Parity
impl Unpin 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