Function bitvec::slice::from_raw_parts_mut[][src]

pub unsafe fn from_raw_parts_mut<'a, O, T>(
    data: BitPtr<Mut, O, T>,
    len: usize
) -> Result<&'a mut BitSlice<O, T>, BitSpanError<T>> where
    O: BitOrder,
    T: BitStore

Performs the same functionality as from_raw_parts, except that a mutable slice is returned.

Original

slice::from_raw_parts_mut

API Differences

This takes a BitPtr as its base address, rather than a raw *Bit pointer, as bitvec does not provide raw pointers to individual bits.

It returns a Result, because the len argument may be invalid to encode into a &BitSlice reference.

Safety

Behavior is undefined if any of the following conditions are violated: