Struct arrow2::bitmap::MutableBitmap[][src]

pub struct MutableBitmap { /* fields omitted */ }
Expand description

A container to store booleans. MutableBitmap is semantically equivalent to Vec<bool>, but each value is stored as a single bit, thereby achieving a compression of 8x. This container is the counterpart of MutableBuffer for boolean values. MutableBitmap can be converted to a Bitmap at O(1). The main difference against Vec<bool> is that a bitmap cannot be represented as &[bool].

Implementation

This container is backed by MutableBuffer<u8>.

Implementations

Initializes an empty MutableBitmap.

Initializes a zeroed MutableBitmap.

Initializes an a pre-allocated MutableBitmap with capacity for capacity bits.

Initializes an a pre-allocated MutableBitmap with capacity for capacity bits.

Pushes a new bit to the MutableBitmap, re-sizing it if necessary.

Pushes a new bit to the MutableBitmap

Safety

The caller must ensure that the MutableBitmap has sufficient capacity.

Returns the number of unset bits on this MutableBitmap.

Returns the length of the MutableBitmap.

Returns whether MutableBitmap is empty.

Extends MutableBitmap by additional values of constant value.

Returns whether the position index is set.

Panics

Panics iff index >= self.len().

Sets the position index to value

Panics

Panics iff index >= self.len().

Initializes a MutableBitmap from a MutableBuffer<u8> and a length.

Panic

Panics iff the length is larger than the length of the buffer times 8.

Extends self from a TrustedLen iterator.

Extends self from an iterator of trusted len.

Safety

The caller must guarantee that the iterator has a trusted len.

Creates a new MutableBitmap from an iterator of booleans.

Safety

The iterator must report an accurate length.

Creates a new MutableBitmap from an iterator of booleans.

Creates a new MutableBitmap from an iterator of booleans.

Creates a new MutableBitmap from an falible iterator of booleans.

Safety

The caller must guarantee that the iterator is TrustedLen.

Extends the MutableBitmap from a slice of bytes with optional offset. This is the fastest way to extend a MutableBitmap.

Implementation

When both MutableBitmap’s length and offset are both multiples of 8, this function performs a memcopy. Else, it extends MutableBitmap bit by bit.

Extends the MutableBitmap from a Bitmap.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Creates a value from an iterator. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.