pub struct Raw<T: OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields>(T);
impl<T: OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields> Clone for Raw<T> {
fn clone(&self) -> Self {
*self
}
}
impl<T: OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields> Copy for Raw<T> {}
impl<T: OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields> Raw<T> {
#[doc(hidden)]
pub const unsafe fn new(v: T) -> Self {
Self(v)
}
pub fn raw(self) -> T {
self.0
}
#[doc(hidden)]
pub unsafe fn get_mut(&mut self) -> &mut T {
&mut self.0
}
}
pub trait OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields: Copy {}
impl OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields for u8 {}
impl OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields for u16 {}
impl OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields for u32 {}
impl OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields for u64 {}
impl OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields for u128 {}
impl OnlyPrimitiveUnsignedIntegersAreAllowedAsBaseTypesForSuperbittyBitfields for usize {}