[][src]Struct bitvec::slice::BitMut

pub struct BitMut<'a, O, T> where
    O: BitOrder,
    T: 'a + BitStore
{ /* fields omitted */ }

Proxy referential type, equivalent to &mut bool.

This structure is three words wide, and cannot ever fit into the existing Rust language and library infrastructure in the way &BitSlice does. While &mut write references are themselves an affine type, with a guaranteed single point of destruction and no duplication, the language forbids writing finalization logic for them.

This means that a custom reference type which implements Deref and DerefMut to a location within the canonical handle, and on Drop writes the Deref location into referent memory, is impossible. Short of that, a C++-style thick reference-like type is as close as Rust will allow.

Trait Implementations

impl<'_, O, T> Deref for BitMut<'_, O, T> where
    O: BitOrder,
    T: BitStore
[src]

type Target = bool

The resulting type after dereferencing.

impl<'_, O, T> DerefMut for BitMut<'_, O, T> where
    O: BitOrder,
    T: BitStore
[src]

impl<'_, O, T> Drop for BitMut<'_, O, T> where
    O: BitOrder,
    T: BitStore
[src]

Auto Trait Implementations

impl<'a, O, T> RefUnwindSafe for BitMut<'a, O, T> where
    O: RefUnwindSafe,
    T: RefUnwindSafe,
    <T as BitStore>::Access: RefUnwindSafe

impl<'a, O, T> !Send for BitMut<'a, O, T>

impl<'a, O, T> !Sync for BitMut<'a, O, T>

impl<'a, O, T> Unpin for BitMut<'a, O, T> where
    T: Unpin

impl<'a, O, T> !UnwindSafe for BitMut<'a, O, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.