pub struct GroupType { /* private fields */ }Expand description
Group type code and version. See the RDS Standard section 3.1.3 - Table 3.
Implementations§
Source§impl GroupType
impl GroupType
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 GroupType
impl GroupType
Sourcepub fn code_or_err(
&self,
) -> Result<<B4 as Specifier>::InOut, InvalidBitPattern<<B4 as Specifier>::Bytes>>
pub fn code_or_err( &self, ) -> Result<<B4 as Specifier>::InOut, InvalidBitPattern<<B4 as Specifier>::Bytes>>
Returns the value of code.
#Errors
If the returned value contains an invalid bit pattern for code.
Sourcepub fn version_or_err(
&self,
) -> Result<<GroupVersion as Specifier>::InOut, InvalidBitPattern<<GroupVersion as Specifier>::Bytes>>
pub fn version_or_err( &self, ) -> Result<<GroupVersion as Specifier>::InOut, InvalidBitPattern<<GroupVersion as Specifier>::Bytes>>
Returns the value of version.
#Errors
If the returned value contains an invalid bit pattern for version.
Trait Implementations§
Source§impl Specifier for GroupType
impl Specifier for GroupType
const STRUCT: bool = /// Group type code and version. /// See the RDS Standard section 3.1.3 - Table 3. #[bitfield(bits = 5)] #[derive(BitfieldSpecifier, Default, Copy, Clone, PartialEq, Eq)] pub struct GroupType { #[skip(setters)] pub code: B4, // Group type code. #[skip(setters)] pub version: GroupVersion, // Group version (A/B). }
Source§fn into_bytes(value: Self::InOut) -> Result<Self::Bytes, OutOfBounds>
fn into_bytes(value: Self::InOut) -> Result<Self::Bytes, OutOfBounds>
Converts some bytes into the in-out type. Read more
Source§fn from_bytes(
bytes: Self::Bytes,
) -> Result<Self::InOut, InvalidBitPattern<Self::Bytes>>
fn from_bytes( bytes: Self::Bytes, ) -> Result<Self::InOut, InvalidBitPattern<Self::Bytes>>
Converts the given bytes into the in-out type. Read more
impl Copy for GroupType
impl Eq for GroupType
impl StructuralPartialEq for GroupType
Auto Trait Implementations§
impl Freeze for GroupType
impl RefUnwindSafe for GroupType
impl Send for GroupType
impl Sync for GroupType
impl Unpin for GroupType
impl UnsafeUnpin for GroupType
impl UnwindSafe for GroupType
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