[−][src]Struct adapton::catalog::bitstring::BS
Bit Strings are length/value pairs, so that bit strings with leading zeros aren't conflated.
Fields
length: i64
value: 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 i
th bit of b
.
fn is_set(i: i64, b: i64) -> bool
[src]
is_set(i, b)
returns true if the i
th 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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<BS> for BS
[src]
impl StructuralEq for BS
[src]
impl StructuralPartialEq for BS
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,