[][src]Enum pir_8_emu::binutils::pir_8_as::AssemblerDirectiveObeyError

pub enum AssemblerDirectiveObeyError<'s> {
    LabelNameTaken(&'s str),
    OutputAddressAlreadySet(u16u16),
}

An error that could've occurred when obeying an asembly directive.

Examples

let mut next_output_address = Some(0x0110);
let mut labels = vec![("uwu".to_string(), 0x0069)].into_iter().collect();
assert_eq!(AssemblerDirective::SetOrigin(0x0420).obey(&mut next_output_address, &mut labels),
           Err(AssemblerDirectiveObeyError::OutputAddressAlreadySet(0x0110, 0x0420)));

assert_eq!(AssemblerDirective::SaveLabel("uwu").obey(&mut next_output_address, &mut labels),
           Err(AssemblerDirectiveObeyError::LabelNameTaken("uwu")));

Variants

LabelNameTaken(&'s str)

The label wit hthe specified name already exists

OutputAddressAlreadySet(u16u16)

An origin was attempted to be specified with the output address already existing

First argument is the current output address, the second – the requested

Trait Implementations

impl<'s> Clone for AssemblerDirectiveObeyError<'s>[src]

impl<'s> Copy for AssemblerDirectiveObeyError<'s>[src]

impl<'s> Debug for AssemblerDirectiveObeyError<'s>[src]

impl<'_> Display for AssemblerDirectiveObeyError<'_>[src]

impl<'s> Eq for AssemblerDirectiveObeyError<'s>[src]

impl<'_> Error for AssemblerDirectiveObeyError<'_>[src]

impl<'s> Hash for AssemblerDirectiveObeyError<'s>[src]

impl<'s> Ord for AssemblerDirectiveObeyError<'s>[src]

impl<'s> PartialEq<AssemblerDirectiveObeyError<'s>> for AssemblerDirectiveObeyError<'s>[src]

impl<'s> PartialOrd<AssemblerDirectiveObeyError<'s>> for AssemblerDirectiveObeyError<'s>[src]

impl<'s> StructuralEq for AssemblerDirectiveObeyError<'s>[src]

impl<'s> StructuralPartialEq for AssemblerDirectiveObeyError<'s>[src]

Auto Trait Implementations

impl<'s> RefUnwindSafe for AssemblerDirectiveObeyError<'s>

impl<'s> Send for AssemblerDirectiveObeyError<'s>

impl<'s> Sync for AssemblerDirectiveObeyError<'s>

impl<'s> Unpin for AssemblerDirectiveObeyError<'s>

impl<'s> UnwindSafe for AssemblerDirectiveObeyError<'s>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.