pub struct ProtoMask { /* private fields */ }Implementations§
Source§impl ProtoMask
impl ProtoMask
Sourcepub const fn into_bytes(self) -> [u8; 2]
pub const fn into_bytes(self) -> [u8; 2]
Sourcepub const fn from_bytes(bytes: [u8; 2]) -> Self
pub const fn from_bytes(bytes: [u8; 2]) -> Self
Converts the given bytes directly into the bitfield struct.
Source§impl ProtoMask
impl ProtoMask
Sourcepub fn ubx_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
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.
Sourcepub fn with_ubx(self, new_val: <bool as Specifier>::InOut) -> Self
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.
Sourcepub fn with_ubx_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
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.
Sourcepub fn set_ubx(&mut self, new_val: <bool as Specifier>::InOut)
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.
Sourcepub fn set_ubx_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
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.
Sourcepub fn nmea_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
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.
Sourcepub fn with_nmea(self, new_val: <bool as Specifier>::InOut) -> Self
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.
Sourcepub fn with_nmea_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
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.
Sourcepub fn set_nmea(&mut self, new_val: <bool as Specifier>::InOut)
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.
Sourcepub fn set_nmea_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
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.
Sourcepub fn rtcm_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
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.
Sourcepub fn with_rtcm(self, new_val: <bool as Specifier>::InOut) -> Self
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.
Sourcepub fn with_rtcm_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
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.
Sourcepub fn set_rtcm(&mut self, new_val: <bool as Specifier>::InOut)
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.
Sourcepub fn set_rtcm_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
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.
Sourcepub fn rtcm3_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
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.
Sourcepub fn with_rtcm3(self, new_val: <bool as Specifier>::InOut) -> Self
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.
Sourcepub fn with_rtcm3_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
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.
Sourcepub fn set_rtcm3(&mut self, new_val: <bool as Specifier>::InOut)
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.
Sourcepub fn set_rtcm3_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
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.