[−][src]Struct ch8alib::codegen::AddrTable
Manages label-to-address relationships
Methods
impl AddrTable
[src]
pub fn new() -> Self
[src]
pub fn get_size(&self) -> u32
[src]
pub fn add_entry(&mut self, label: &str, addr: u16)
[src]
Adds an entry to the table
Arguments
label
- The label to add to the tableaddr
- The address corresponding to the label
pub fn has_entry(&self, label: &str) -> bool
[src]
Determines whether a given label exists in the table
Argument
label
- The label to check
Returns
Whether the given label exists in the table
pub fn get_entry(&self, label: &str) -> Result<u16, AddrError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for AddrTable
impl Send for AddrTable
impl Sync for AddrTable
impl Unpin for AddrTable
impl UnwindSafe for AddrTable
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, 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>,