pub struct B63(/* private fields */);Expand description
a type used to represent a field with a specific amount of bits.
Implementations§
Source§impl B63
impl B63
pub const fn from_fields(fields: B63) -> B63
pub const fn to_fields(x: B63) -> B63
pub const fn try_from_bits( bits: <BitLength<63> as AssociatedStorage>::Storage, ) -> Option<B63>
pub const fn from_bits( bits: <BitLength<63> as AssociatedStorage>::Storage, ) -> B63
pub const fn to_bits(x: B63) -> <BitLength<63> as AssociatedStorage>::Storage
pub const fn const_eq(a: Self, b: Self) -> bool
Source§impl B63
impl B63
Sourcepub const fn new(value: <BitLength<63> as AssociatedStorage>::Storage) -> Self
pub const fn new(value: <BitLength<63> as AssociatedStorage>::Storage) -> Self
creates a new instance of this bitfield type with the given value.
this function panics if the value does not fit within the bit length of this type.
Sourcepub const fn try_new(
value: <BitLength<63> as AssociatedStorage>::Storage,
) -> Option<Self>
pub const fn try_new( value: <BitLength<63> as AssociatedStorage>::Storage, ) -> Option<Self>
creates a new instance of this bitfield type with the given value.
if the value does not fit within the bit length of this type, returns None.
Sourcepub const unsafe fn new_unchecked(
value: <BitLength<63> as AssociatedStorage>::Storage,
) -> Self
pub const unsafe fn new_unchecked( value: <BitLength<63> as AssociatedStorage>::Storage, ) -> Self
creates a new instance of this bitfield type with the given value, without checking that the value fits within the bit length of this type.
§safety
the provided value must fit within the bit length of this type.
Sourcepub const fn get(&self) -> <BitLength<63> as AssociatedStorage>::Storage
pub const fn get(&self) -> <BitLength<63> as AssociatedStorage>::Storage
returns the inner value.
Trait Implementations§
Source§impl BitPiece for B63
impl BitPiece for B63
Source§type Bits = <BitLength<63> as AssociatedStorage>::Storage
type Bits = <BitLength<63> as AssociatedStorage>::Storage
the storage type used internally to store the bits of this bitpiece.
Source§type Converter = B63
type Converter = B63
a converter types which implements all const conversion functions (e.g
from_bits). Read morefn try_from_bits(bits: Self::Bits) -> Option<Self>
fn from_bits(bits: Self::Bits) -> Self
fn to_bits(self) -> Self::Bits
Source§impl BitPieceHasFields for B63
impl BitPieceHasFields for B63
Source§impl BitPieceHasMutRef for B63
impl BitPieceHasMutRef for B63
Source§impl Ord for B63
impl Ord for B63
Source§impl PartialOrd for B63
impl PartialOrd for B63
impl Copy for B63
impl Eq for B63
impl StructuralPartialEq for B63
Auto Trait Implementations§
impl Freeze for B63
impl RefUnwindSafe for B63
impl Send for B63
impl Sync for B63
impl Unpin for B63
impl UnwindSafe for B63
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