Function bitvec::slice::from_raw_parts_unchecked_mut[][src]

pub unsafe fn from_raw_parts_unchecked_mut<'a, O, T>(
    data: BitPtr<Mut, O, T>,
    len: usize
) -> &'a mut BitSlice<O, T>

Notable traits for &'a BitSlice<O, T>

impl<'a, O, T> Read for &'a BitSlice<O, T> where
    O: BitOrder,
    T: BitStore,
    BitSlice<O, T>: BitField
impl<'a, O, T> Write for &'a mut BitSlice<O, T> where
    O: BitOrder,
    T: BitStore,
    BitSlice<O, T>: BitField
where
    O: BitOrder,
    T: BitStore

Performs the same functionality as from_raw_parts_mut, without checking the len argument.

Parameters

  • data: A BitPtr to a dereferencable region of memory.
  • len: The length, in bits, of the region beginning at *data. This is not checked against the maximum value, and is encoded directly into the bit-slice reference. If it exceeds BitSlice::MAX_BITS, it will be modulated to fit (the high bits will be discarded).

Returns

A &mut BitSlice reference starting at data and running for len & MAX_BITS bits.

Safety

See from_raw_parts_mut.