pub struct ControllerId { /* private fields */ }Implementations§
Source§impl ControllerId
impl ControllerId
Source§impl ControllerId
impl ControllerId
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.
Trait Implementations§
Source§impl CheckFillsUnalignedBits for ControllerId
impl CheckFillsUnalignedBits for ControllerId
Source§impl CheckSpecifierHasAtMost128Bits for ControllerId
impl CheckSpecifierHasAtMost128Bits for ControllerId
Source§impl From<ControllerId> for [u8; 2]
impl From<ControllerId> for [u8; 2]
Source§fn from(bytes: ControllerId) -> Self
fn from(bytes: ControllerId) -> Self
Converts to this type from the input type.
Source§impl From<ControllerId> for u16
impl From<ControllerId> for u16
Source§fn from(c: ControllerId) -> Self
fn from(c: ControllerId) -> Self
Converts to this type from the input type.
Source§impl From<u16> for ControllerId
impl From<u16> for ControllerId
Source§impl Specifier for ControllerId
impl Specifier for ControllerId
Source§type Bytes = <BitCount<#[derive(Specifier)]
#[repr(transparent)]
pub struct ControllerId(u16);> as SpecifierBytes>::Bytes
type Bytes = <BitCount<#[derive(Specifier)] #[repr(transparent)] pub struct ControllerId(u16);> as SpecifierBytes>::Bytes
The storage type. This is typically the smallest integer primitive that
can store all possible values of the
InOut type.Source§type InOut = ControllerId
type InOut = ControllerId
The interface type. This type is used by getters and setters. For
integers, this is the same as the
Bytes type; for other
types with more logical representations, like an enum or struct, this is
the enum or struct.Source§fn into_bytes(value: Self::InOut) -> Result<Self::Bytes, OutOfBounds>
fn into_bytes(value: Self::InOut) -> Result<Self::Bytes, OutOfBounds>
Converts an interface type into its storage 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 a storage type into its interface type. Read more
Auto Trait Implementations§
impl Freeze for ControllerId
impl RefUnwindSafe for ControllerId
impl Send for ControllerId
impl Sync for ControllerId
impl Unpin for ControllerId
impl UnwindSafe for ControllerId
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