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

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.


length: i64value: i64

Trait Implementations

impl BitString for BS[src]

fn pow(b: i64, n: i64) -> i64[src]

pow(b, n) yields b^n

fn flip(i: i64, b: i64) -> i64[src]

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

fn is_set(i: i64, b: i64) -> bool[src]

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

fn prepend(b: i64, bs: BS) -> BS[src]

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

fn length(bs: BS) -> i64[src]

Returns the length of the bitstring bs.

fn shift_left(bs: BS, i: i64) -> BS[src]

Performs a logical shift left on the bitstring bs.

const MAX_LEN: i64[src]

The maximum supported length of a bitstring is 30 bits.

impl Clone for BS[src]

impl Copy for BS[src]

impl Debug for BS[src]

impl Eq for BS[src]

impl Hash for BS[src]

impl PartialEq<BS> for BS[src]

impl StructuralEq for BS[src]

impl StructuralPartialEq for BS[src]

Auto Trait Implementations

impl RefUnwindSafe for BS

impl Send for BS

impl Sync for BS

impl Unpin for BS

impl UnwindSafe for BS

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.