[−][src]Struct mif::Mif
Native MIF representation.
Implementations
impl<T> Mif<T> where
T: UpperHex + Unsigned + PrimInt + FromPrimitive + CheckedShl + WrappingSub,
[src]
T: UpperHex + Unsigned + PrimInt + FromPrimitive + CheckedShl + WrappingSub,
pub fn new(width: usize) -> Result<Mif<T>, Error>
[src]
Creates new MIF with word width
.
pub fn max_width() -> usize
[src]
Maximum word width in bits depending on T
.
pub fn max_align() -> usize
[src]
Maximum word width in bytes depending on T
.
pub fn max_value(&self) -> T
[src]
Maximum word value depending on width()
.
pub fn width(&self) -> usize
[src]
Word width in bits.
pub fn align(&self) -> usize
[src]
Word width in bytes.
pub fn depth(&self) -> usize
[src]
MIF depth in words.
pub fn words(&self) -> &Vec<(T, usize)>
[src]
Reference to words and their bulk in given order.
pub fn areas(&self) -> &Vec<(usize, PathBuf)>
[src]
Reference to addresses and paths of memory areas in given order.
pub fn area(&mut self, area: PathBuf)
[src]
Addresses memory area
at current depth()
.
pub fn push(&mut self, word: T, bulk: usize) -> Result<(), Error>
[src]
Pushes word
or add up its bulk
.
pub fn join(&mut self, other: &Self) -> Result<(), Error>
[src]
Joins in other
MIF.
pub fn read(
&mut self,
bytes: &mut dyn Read,
depth: usize,
first: First
) -> Result<(), Error>
[src]
&mut self,
bytes: &mut dyn Read,
depth: usize,
first: First
) -> Result<(), Error>
Reads depth
LSB/MSB-first
words from bytes
reader.
pub fn write(&self, lines: &mut dyn Write, areas: bool) -> Result<(), Error>
[src]
Writes MIF to writer.
lines
: Writer, MIF is written to.areas
: Whether to comment memory areas as in-- 0000: name.bin
.
Trait Implementations
impl<T: Clone + UpperHex + Unsigned + PrimInt + FromPrimitive> Clone for Mif<T>
[src]
impl<T: Debug + UpperHex + Unsigned + PrimInt + FromPrimitive> Debug for Mif<T>
[src]
impl<T: Eq + UpperHex + Unsigned + PrimInt + FromPrimitive> Eq for Mif<T>
[src]
impl<T: PartialEq + UpperHex + Unsigned + PrimInt + FromPrimitive> PartialEq<Mif<T>> for Mif<T>
[src]
impl<T: UpperHex + Unsigned + PrimInt + FromPrimitive> StructuralEq for Mif<T>
[src]
impl<T: UpperHex + Unsigned + PrimInt + FromPrimitive> StructuralPartialEq for Mif<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Mif<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Mif<T> where
T: Send,
T: Send,
impl<T> Sync for Mif<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Mif<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Mif<T> where
T: UnwindSafe,
T: UnwindSafe,
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<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[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>,