pub struct Format {
pub commands: BTreeMap<u16, String>,
pub local_types: Vec<BaseVarType>,
pub switches: bool,
/* private fields */
}Fields§
§commands: BTreeMap<u16, String>§local_types: Vec<BaseVarType>§switches: boolImplementations§
Source§impl Format
impl Format
pub fn load(path: &Path) -> Result<Self>
pub fn parse(text: &str) -> Result<Self>
pub fn has(&self, opcode: Opcode) -> bool
pub fn instruction(&self, opcode: Opcode) -> Result<(u16, Width)>
pub fn width(&self, code: u16) -> Width
Sourcepub fn define(
&mut self,
operation: Opcode,
code: u16,
width: Width,
) -> Result<()>
pub fn define( &mut self, operation: Opcode, code: u16, width: Width, ) -> Result<()>
Define a wire operation explicitly, including nonstandard operand widths.
pub fn define_command( &mut self, name: String, code: u16, width: Width, ) -> Result<()>
pub fn decode(&self, code: u16) -> Result<(Opcode, Width)>
Trait Implementations§
Auto Trait Implementations§
impl Forget for Format
impl Freeze for Format
impl Move for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more