Struct BitVec

Source
pub struct BitVec {
    pub spans: Vec<BitVecSpan>,
    /* private fields */
}

Fields§

§spans: Vec<BitVecSpan>

Implementations§

Source§

impl BitVec

Source

pub fn new() -> BitVec

Source

pub fn write_bit(&mut self, index: usize, value: bool)

Source

pub fn read_bit(&self, index: usize) -> bool

Source

pub fn len(&self) -> usize

Source

pub fn write_bigint(&mut self, index: usize, bigint: &BigInt)

Source

pub fn write_bigint_with_span( &mut self, span: Span, offset: usize, addr: BigInt, bigint: &BigInt, )

Source

pub fn mark_span( &mut self, offset: Option<usize>, size: usize, addr: BigInt, span: Span, )

Source

pub fn to_bigint(&self) -> BigInt

Source

pub fn get_blocks(&self) -> Vec<BitVecBlock>

Source§

impl BitVec

Source

pub fn format_binary(&self) -> Vec<u8>

Source

pub fn format_binstr(&self) -> String

Source

pub fn format_hexstr(&self) -> String

Source

pub fn format_str(&self, bits_per_digit: usize) -> String

Source

pub fn format_bindump(&self) -> String

Source

pub fn format_hexdump(&self) -> String

Source

pub fn format_dump( &self, digit_bits: usize, byte_bits: usize, bytes_per_line: usize, ) -> String

Source

pub fn format_mif(&self) -> String

Source

pub fn format_intelhex(&self, address_unit: usize) -> String

Source

pub fn format_separator(&self, radix: usize, separator: &str) -> String

Source

pub fn format_c_array(&self, radix: usize) -> String

Source

pub fn format_logisim(&self, bits_per_chunk: usize) -> String

Source

pub fn format_annotated( &self, fileserver: &dyn FileServer, base: usize, digits_per_group: usize, ) -> String

Source

pub fn format_tcgame( &self, fileserver: &dyn FileServer, base: usize, digits_per_group: usize, ) -> String

Source

pub fn format_addrspan(&self, fileserver: &dyn FileServer) -> String

Trait Implementations§

Source§

impl Debug for BitVec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl LowerHex for BitVec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for BitVec

§

impl RefUnwindSafe for BitVec

§

impl Send for BitVec

§

impl Sync for BitVec

§

impl Unpin for BitVec

§

impl UnwindSafe for BitVec

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.