ProtoMask

Struct ProtoMask 

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

Implementations§

Source§

impl ProtoMask

Source

pub const fn new() -> Self

Returns an instance with zero initialized data.

Source§

impl ProtoMask

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 ProtoMask

Source

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

Returns the value of ubx.

Source

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

Returns the value of ubx.

#Errors

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

Source

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

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

#Panics

If the given value is out of bounds for ubx.

Source

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

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

#Errors

If the given value is out of bounds for ubx.

Source

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

Sets the value of ubx to the given value.

#Panics

If the given value is out of bounds for ubx.

Source

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

Sets the value of ubx to the given value.

#Errors

If the given value is out of bounds for ubx.

Source

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

Returns the value of nmea.

Source

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

Returns the value of nmea.

#Errors

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

Source

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

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

#Panics

If the given value is out of bounds for nmea.

Source

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

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

#Errors

If the given value is out of bounds for nmea.

Source

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

Sets the value of nmea to the given value.

#Panics

If the given value is out of bounds for nmea.

Source

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

Sets the value of nmea to the given value.

#Errors

If the given value is out of bounds for nmea.

Source

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

Returns the value of rtcm.

Source

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

Returns the value of rtcm.

#Errors

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

Source

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

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

#Panics

If the given value is out of bounds for rtcm.

Source

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

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

#Errors

If the given value is out of bounds for rtcm.

Source

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

Sets the value of rtcm to the given value.

#Panics

If the given value is out of bounds for rtcm.

Source

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

Sets the value of rtcm to the given value.

#Errors

If the given value is out of bounds for rtcm.

Source

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

Returns the value of rtcm3.

Source

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

Returns the value of rtcm3.

#Errors

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

Source

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

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

#Panics

If the given value is out of bounds for rtcm3.

Source

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

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

#Errors

If the given value is out of bounds for rtcm3.

Source

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

Sets the value of rtcm3 to the given value.

#Panics

If the given value is out of bounds for rtcm3.

Source

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

Sets the value of rtcm3 to the given value.

#Errors

If the given value is out of bounds for rtcm3.

Trait Implementations§

Source§

impl CheckTotalSizeMultipleOf8 for ProtoMask

Source§

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

Source§

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

Source§

fn from(__bf_bitfield: ProtoMask) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for ProtoMask
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.