TxReady

Struct TxReady 

Source
pub struct TxReady { /* private fields */ }

Implementations§

Source§

impl TxReady

Source

pub const fn new() -> Self

Returns an instance with zero initialized data.

Source§

impl TxReady

Source

pub const fn into_bytes(self) -> [u8; 2]

Returns the underlying bits.

§Layout

The returned byte array is layed out in the same way as described here.

Source

pub const fn from_bytes(bytes: [u8; 2]) -> Self

Converts the given bytes directly into the bitfield struct.

Source§

impl TxReady

Source

pub fn en(&self) -> <bool as Specifier>::InOut

Returns the value of en.

Source

pub fn en_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>

Returns the value of en.

#Errors

If the returned value contains an invalid bit pattern for en.

Source

pub fn with_en(self, new_val: <bool as Specifier>::InOut) -> Self

Returns a copy of the bitfield with the value of en set to the given value.

#Panics

If the given value is out of bounds for en.

Source

pub fn with_en_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of en set to the given value.

#Errors

If the given value is out of bounds for en.

Source

pub fn set_en(&mut self, new_val: <bool as Specifier>::InOut)

Sets the value of en to the given value.

#Panics

If the given value is out of bounds for en.

Source

pub fn set_en_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of en to the given value.

#Errors

If the given value is out of bounds for en.

Source

pub fn pol(&self) -> <Polarity as Specifier>::InOut

Returns the value of pol.

Source

pub fn pol_or_err( &self, ) -> Result<<Polarity as Specifier>::InOut, InvalidBitPattern<<Polarity as Specifier>::Bytes>>

Returns the value of pol.

#Errors

If the returned value contains an invalid bit pattern for pol.

Source

pub fn with_pol(self, new_val: <Polarity as Specifier>::InOut) -> Self

Returns a copy of the bitfield with the value of pol set to the given value.

#Panics

If the given value is out of bounds for pol.

Source

pub fn with_pol_checked( self, new_val: <Polarity as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of pol set to the given value.

#Errors

If the given value is out of bounds for pol.

Source

pub fn set_pol(&mut self, new_val: <Polarity as Specifier>::InOut)

Sets the value of pol to the given value.

#Panics

If the given value is out of bounds for pol.

Source

pub fn set_pol_checked( &mut self, new_val: <Polarity as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of pol to the given value.

#Errors

If the given value is out of bounds for pol.

Source

pub fn pin(&self) -> <B5 as Specifier>::InOut

Returns the value of pin.

Source

pub fn pin_or_err( &self, ) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>

Returns the value of pin.

#Errors

If the returned value contains an invalid bit pattern for pin.

Source

pub fn with_pin(self, new_val: <B5 as Specifier>::InOut) -> Self

Returns a copy of the bitfield with the value of pin set to the given value.

#Panics

If the given value is out of bounds for pin.

Source

pub fn with_pin_checked( self, new_val: <B5 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of pin set to the given value.

#Errors

If the given value is out of bounds for pin.

Source

pub fn set_pin(&mut self, new_val: <B5 as Specifier>::InOut)

Sets the value of pin to the given value.

#Panics

If the given value is out of bounds for pin.

Source

pub fn set_pin_checked( &mut self, new_val: <B5 as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of pin to the given value.

#Errors

If the given value is out of bounds for pin.

Source

pub fn thres(&self) -> <B9 as Specifier>::InOut

Returns the value of thres.

Source

pub fn thres_or_err( &self, ) -> Result<<B9 as Specifier>::InOut, InvalidBitPattern<<B9 as Specifier>::Bytes>>

Returns the value of thres.

#Errors

If the returned value contains an invalid bit pattern for thres.

Source

pub fn with_thres(self, new_val: <B9 as Specifier>::InOut) -> Self

Returns a copy of the bitfield with the value of thres set to the given value.

#Panics

If the given value is out of bounds for thres.

Source

pub fn with_thres_checked( self, new_val: <B9 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of thres set to the given value.

#Errors

If the given value is out of bounds for thres.

Source

pub fn set_thres(&mut self, new_val: <B9 as Specifier>::InOut)

Sets the value of thres to the given value.

#Panics

If the given value is out of bounds for thres.

Source

pub fn set_thres_checked( &mut self, new_val: <B9 as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of thres to the given value.

#Errors

If the given value is out of bounds for thres.

Trait Implementations§

Source§

impl CheckTotalSizeMultipleOf8 for TxReady

Source§

type Size = TotalSize<[(); 0]>

Source§

impl From<TxReady> for u16
where [(); 16]: IsU16Compatible,

Source§

fn from(__bf_bitfield: TxReady) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for TxReady
where [(); 16]: IsU16Compatible,

Source§

fn from(__bf_prim: u16) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.