pub struct DiCodes { /* private fields */ }Expand description
Decoder identification and Dynamic PTY indicator / DI codes See the RDS Standard section 3.2.1.5.
Implementations§
Source§impl DiCodes
impl DiCodes
Sourcepub const fn into_bytes(self) -> [u8; 1]
pub const fn into_bytes(self) -> [u8; 1]
Sourcepub const fn from_bytes(bytes: [u8; 1]) -> Self
pub const fn from_bytes(bytes: [u8; 1]) -> Self
Converts the given bytes directly into the bitfield struct.
Source§impl DiCodes
impl DiCodes
Sourcepub fn dynamic_pty(&self) -> <bool as Specifier>::InOut
pub fn dynamic_pty(&self) -> <bool as Specifier>::InOut
Returns the value of dynamic_pty.
Sourcepub fn dynamic_pty_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn dynamic_pty_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of dynamic_pty.
#Errors
If the returned value contains an invalid bit pattern for dynamic_pty.
Sourcepub fn with_dynamic_pty(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_dynamic_pty(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of dynamic_pty set to the given value.
#Panics
If the given value is out of bounds for dynamic_pty.
Sourcepub fn with_dynamic_pty_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_dynamic_pty_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of dynamic_pty set to the given value.
#Errors
If the given value is out of bounds for dynamic_pty.
Sourcepub fn set_dynamic_pty(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_dynamic_pty(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of dynamic_pty to the given value.
#Panics
If the given value is out of bounds for dynamic_pty.
Sourcepub fn set_dynamic_pty_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_dynamic_pty_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of dynamic_pty to the given value.
#Errors
If the given value is out of bounds for dynamic_pty.
Sourcepub fn compressed(&self) -> <bool as Specifier>::InOut
pub fn compressed(&self) -> <bool as Specifier>::InOut
Returns the value of compressed.
Sourcepub fn compressed_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn compressed_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of compressed.
#Errors
If the returned value contains an invalid bit pattern for compressed.
Sourcepub fn with_compressed(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_compressed(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of compressed set to the given value.
#Panics
If the given value is out of bounds for compressed.
Sourcepub fn with_compressed_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_compressed_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of compressed set to the given value.
#Errors
If the given value is out of bounds for compressed.
Sourcepub fn set_compressed(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_compressed(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of compressed to the given value.
#Panics
If the given value is out of bounds for compressed.
Sourcepub fn set_compressed_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_compressed_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of compressed to the given value.
#Errors
If the given value is out of bounds for compressed.
Sourcepub fn artificial_head(&self) -> <bool as Specifier>::InOut
pub fn artificial_head(&self) -> <bool as Specifier>::InOut
Returns the value of artificial_head.
Sourcepub fn artificial_head_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn artificial_head_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of artificial_head.
#Errors
If the returned value contains an invalid bit pattern for artificial_head.
Sourcepub fn with_artificial_head(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_artificial_head(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of artificial_head set to the given value.
#Panics
If the given value is out of bounds for artificial_head.
Sourcepub fn with_artificial_head_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_artificial_head_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of artificial_head set to the given value.
#Errors
If the given value is out of bounds for artificial_head.
Sourcepub fn set_artificial_head(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_artificial_head(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of artificial_head to the given value.
#Panics
If the given value is out of bounds for artificial_head.
Sourcepub fn set_artificial_head_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_artificial_head_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of artificial_head to the given value.
#Errors
If the given value is out of bounds for artificial_head.
Sourcepub fn stereo_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn stereo_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of stereo.
#Errors
If the returned value contains an invalid bit pattern for stereo.
Sourcepub fn with_stereo(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_stereo(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of stereo set to the given value.
#Panics
If the given value is out of bounds for stereo.
Sourcepub fn with_stereo_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_stereo_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of stereo set to the given value.
#Errors
If the given value is out of bounds for stereo.
Sourcepub fn set_stereo(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_stereo(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of stereo to the given value.
#Panics
If the given value is out of bounds for stereo.
Sourcepub fn set_stereo_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_stereo_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of stereo to the given value.
#Errors
If the given value is out of bounds for stereo.