Struct adapton::catalog::bitstring::BS [] [src]

pub struct BS {
    pub length: i64,
    pub value: i64,
}

Bit Strings are length/value pairs, so that bit strings with leading zeros aren't conflated.

Fields

Trait Implementations

impl Eq for BS
[src]

impl PartialEq for BS
[src]

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

This method tests for !=.

impl Hash for BS
[src]

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

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

impl Debug for BS
[src]

Formats the value using the given formatter.

impl Clone for BS
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for BS
[src]

impl BitString for BS
[src]

pow(b, n) yields bn

flip(i, b) toggles the ith bit of b.

is_set(i, b) returns true if the ith bit of b is set

prepend(b, bs) prepends the bit b onto the bitstring bs. b must be either 0 or 1.

Returns the length of the bitstring bs.

Performs a logical shift left on the bitstring bs.

MAX_LEN: i64 = 30

The maximum supported length of a bitstring is 30 bits.