Struct succinct::BitVector [] [src]

pub struct BitVector<Block: BlockType = usize>(_);

Uncompressed vector of bits.

Methods

impl<Block: BlockType> BitVector<Block>
[src]

[src]

Creates a new, empty bit vector.

[src]

Creates a new, empty bit vector with space allocated for capacity bits.

Panics

Panics if capacity is too large. In particular the number of blocks required by the capacity (capacity / Block::nbits()) must fit in a usize.

[src]

Creates a new, empty bit vector with space allocated for capacity blocks.

[src]

Creates a new bit vector of len bits initialized to value.

Panics

Panics if len is too large. In particular the number of blocks required by the capacity (len / Block::nbits()) must fit in a usize.

[src]

Creates a new bit vector of block_len blocks initialized to value.

[src]

How many bits the bit vector can hold without reallocating.

[src]

How many blocks the bit vector can hold without reallocating.

[src]

Resizes the bit vector to the given number of elements, filling if necessary.

Panics

Panics if new_len is too large. In particular the number of blocks required by the capacity (new_len / Block::nbits()) must fit in a usize.

[src]

Resizes the bit vector to the given number of blocks, filling if necessary.

[src]

Reserves capacity for at least additional more bits to be inserted.

The collection may reserve more space to avoid frequent reallocations.

Panics

Panics if the number of blocks overflows a usize.

[src]

Reserves capacity for at least additional blocks of bits to be inserted.

The collection may reserve more space to avoid frequent reallocations.

Panics

Panics if the number of blocks overflows a usize.

[src]

Reserves capacity for at least additional more bits to be inserted.

Unlike reserve, does nothing if the capacity is already sufficient.

Panics

Panics if the number of blocks overflows a usize.

[src]

Reserves capacity for at least additional more blocks of bits to be inserted.

Unlike reserve_block, does nothing if the capacity is already sufficient.

Panics

Panics if the number of blocks overflows a usize.

[src]

Shrinks the capacity to just fit the number of elements.

[src]

Shrinks to the given size.

Does nothing if len is greater than the current size.

[src]

Shrinks to the given size in blocks.

Does nothing if block_len is greater than the current size in blocks.

[src]

Sets the size to 0 while retaining the allocated storage.

Important traits for Iter<'a, Block>
[src]

Returns an iterator over the bits of the bit vector

Trait Implementations

impl<Block: Clone + BlockType> Clone for BitVector<Block>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<Block: Debug + BlockType> Debug for BitVector<Block>
[src]

[src]

Formats the value using the given formatter. Read more

impl<Block: Eq + BlockType> Eq for BitVector<Block>
[src]

impl<Block: PartialEq + BlockType> PartialEq for BitVector<Block>
[src]

[src]

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

[src]

This method tests for !=.

impl<Block: Ord + BlockType> Ord for BitVector<Block>
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<Block: PartialOrd + BlockType> PartialOrd for BitVector<Block>
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<Block: Hash + BlockType> Hash for BitVector<Block>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<Block: BlockType> BitVec for BitVector<Block>
[src]

The underlying block type used to store the bits of the vector.

[src]

The length of the slice in bits.

[src]

Gets the bit at position Read more

[src]

Gets the block at position Read more

[src]

The length of the slice in blocks.

[src]

Gets count bits starting at bit index start, interpreted as a little-endian integer. Read more

impl<Block: BlockType> BitVecMut for BitVector<Block>
[src]

[src]

Sets the bit at position to value. Read more

[src]

Sets the block at position to value. Read more

[src]

Sets count bits starting at bit index start, interpreted as a little-endian integer. Read more

impl<Block: BlockType> BitVecPush for BitVector<Block>
[src]

[src]

Adds the given bit to the end of the bit vector.

[src]

Removes and returns the last bit, if any.

[src]

Pushes the given block onto the end of the bit vector. Read more

[src]

Pushes value 0 or more times until the size of the bit vector is block-aligned. Read more

impl<Block: BlockType> Binary for BitVector<Block>
[src]

[src]

Formats the value using the given formatter.

impl<Block: BlockType> SpaceUsage for BitVector<Block>
[src]

[src]

Is the size of this type known statically? Read more

[src]

Calculates the heap portion of the size of an object. Read more

[src]

Computes the size of the receiver in bytes. Read more

[src]

Calculates the stack portion of the size of this type. Read more

impl<Block: BlockType> Default for BitVector<Block>
[src]

[src]

Returns the "default value" for a type. Read more

impl<'a, Block: BlockType + 'a> IntoIterator for &'a BitVector<Block>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

Auto Trait Implementations

impl<Block> Send for BitVector<Block> where
    Block: Send

impl<Block> Sync for BitVector<Block> where
    Block: Sync