Struct proc_bitfield::example::support::U8WithParity
source · pub struct U8WithParity {
pub raw: u8,
pub has_even_set_bits: bool,
}
Expand description
Wrapper around u8
with infallible conversions both ways.
Fields§
§raw: u8
§has_even_set_bits: bool
Trait Implementations§
source§impl Clone for U8WithParity
impl Clone for U8WithParity
source§fn clone(&self) -> U8WithParity
fn clone(&self) -> U8WithParity
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 U8WithParity
impl Debug for U8WithParity
source§impl From<U8WithParity> for u8
impl From<U8WithParity> for u8
source§fn from(other: U8WithParity) -> Self
fn from(other: U8WithParity) -> Self
Converts to this type from the input type.
source§impl From<u8> for U8WithParity
impl From<u8> for U8WithParity
impl Copy for U8WithParity
Auto Trait Implementations§
impl Freeze for U8WithParity
impl RefUnwindSafe for U8WithParity
impl Send for U8WithParity
impl Sync for U8WithParity
impl Unpin for U8WithParity
impl UnwindSafe for U8WithParity
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
source§impl<T, U> UnsafeFrom<U> for Twhere
U: Into<T>,
impl<T, U> UnsafeFrom<U> for Twhere
U: Into<T>,
source§unsafe fn unsafe_from(other: U) -> T
unsafe fn unsafe_from(other: U) -> T
Calls U::into(other)
.
That is, this conversion is whatever the implementation of Into
<T> for U
chooses to
do.
source§impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
source§unsafe fn unsafe_into(self) -> U
unsafe fn unsafe_into(self) -> U
Calls U::unsafe_from(self)
.
That is, this conversion is whatever the implementation of UnsafeFrom
<T> for U
chooses to do.