[−][src]Trait drone_core::bitfield::Bitfield
An integer value treated as a sequence of bits, which can be toggled individually.
See the module level documentation for more.
Associated Types
Loading content...Required methods
pub fn bits(&self) -> Self::Bits
[src]
Returns a copy of the underlying integer.
pub fn bits_mut(&mut self) -> &mut Self::Bits
[src]
Returns a mutable reference to the underlying integer.
Provided methods
pub unsafe fn read_bit(&self, offset: Self::Bits) -> bool
[src]
pub unsafe fn set_bit(&mut self, offset: Self::Bits)
[src]
pub unsafe fn clear_bit(&mut self, offset: Self::Bits)
[src]
pub unsafe fn toggle_bit(&mut self, offset: Self::Bits)
[src]
pub unsafe fn read_bits(
&self,
offset: Self::Bits,
width: Self::Bits
) -> Self::Bits
[src]
&self,
offset: Self::Bits,
width: Self::Bits
) -> Self::Bits
Returns width
number of bits at offset
position.
Safety
offset + width
must not exceed the integer size.
pub unsafe fn write_bits(
&mut self,
offset: Self::Bits,
width: Self::Bits,
bits: Self::Bits
)
[src]
&mut self,
offset: Self::Bits,
width: Self::Bits,
bits: Self::Bits
)
Writes width
number of bits at offset
position from bits
.
Safety
offset + width
must not exceed the integer size.