Struct arrow2::bitmap::Bitmap[][src]

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

An immutable container whose API is optimized to handle bitmaps. All quantities on this container’s API are measured in bits.

Implementation

  • memory on this container is sharable across thread boundaries
  • Cloning Bitmap is O(1)
  • Slicing Bitmap is O(1)

Implementations

Initializes an empty Bitmap.

Initializes an new Bitmap filled with unset values.

Returns the length of the Bitmap.

Returns whether Bitmap is empty

Creates a new Bitmap from MutableBuffer and a length.

Panic

Panics iff length <= buffer.len() * 8

Creates a new Bitmap from [Bytes] and a length.

Panic

Panics iff length <= bytes.len() * 8

Counts the nulls (unset bits) starting from offset bits and for length bits.

Returns the number of unset bits on this Bitmap.

Slices self, offseting by offset and truncating up to length bits.

Panic

Panics iff self.offset + offset + length <= self.bytes.len() * 8, i.e. if the offset and length exceeds the allocated capacity of self.

Returns whether the bit at position i is set.

Panics

Panics iff i >= self.len().

Returns whether the bit at position i is set.

Unsafely returns whether the bit at position i is set.

Safety

Unsound iff i >= self.len().

Returns an iterator over bits in chunks of T, which is useful for bit operations.

Creates a new Bitmap from an iterator of booleans.

Safety

The iterator must report an accurate length.

Creates a new Bitmap from an iterator of booleans.

Creates a new Bitmap from a fallible iterator of booleans.

Creates a new Bitmap from a fallible iterator of booleans.

Safety

The iterator must report an accurate length.

constructs a new iterator

Trait Implementations

The resulting type after applying the & operator.

Performs the & operation. Read more

The resulting type after applying the | operator.

Performs the | operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Performs the conversion.

Performs the conversion.

Creates a value from an iterator. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

The resulting type after applying the ! operator.

Performs the unary ! operation. 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.