[][src]Struct bitvec::prelude::BitMut

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

Heavy-weight 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<'_, C, T> Deref for BitMut<'_, C, T> where
    C: Cursor,
    T: BitStore
[src]

type Target = bool

The resulting type after dereferencing.

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

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

Auto Trait Implementations

impl<'a, C, T> RefUnwindSafe for BitMut<'a, C, T> where
    C: RefUnwindSafe,
    T: RefUnwindSafe

impl<'a, C, T> Send for BitMut<'a, C, T>

impl<'a, C, T> Sync for BitMut<'a, C, T>

impl<'a, C, T> Unpin for BitMut<'a, C, T>

impl<'a, C, T> !UnwindSafe for BitMut<'a, C, 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.