[][src]Enum z80emu::z80::any::Z80Any

pub enum Z80Any {
    NMOS(Z80<NMOS>),
    CMOS(Z80<CMOS>),
    BM1(Z80<BM1>),
}

Z80 with any Flavour.

This enum can be used in place of Z80 when changing of Flavour is required in run time.

Variants

NMOS(Z80<NMOS>)
CMOS(Z80<CMOS>)
BM1(Z80<BM1>)

Implementations

impl Z80Any[src]

pub fn tag(&self) -> &'static str[src]

Returns the tag of the current Z80 variant as string.

pub fn with_tag(tag: &str) -> Option<Self>[src]

Creates a new instance of Z80Any with the given tag on success with the state just after RESET.

Returns None if the provided tag is unknown.

pub fn new_nmos() -> Z80Any[src]

Creates a new instance of Z80Any::NMOS variant with the state just after RESET.

pub fn new_cmos() -> Z80Any[src]

Creates a new instance of Z80Any::CMOS variant with the state just after RESET.

pub fn new_bm1() -> Z80Any[src]

Creates a new instance of Z80Any::BM1 variant with the state just after RESET.

pub fn is_nmos(&self) -> bool[src]

Returns true if the variant of self is Z80Any::NMOS.

pub fn is_cmos(&self) -> bool[src]

Returns true if the variant of self is Z80Any::CMOS.

pub fn is_bm1(&self) -> bool[src]

Returns true if the variant of self is Z80Any::BM1.

pub fn into_nmos(self) -> Z80Any[src]

Converts an instance of any variant of Z80Any to a Z80Any::NMOS variant.

pub fn into_cmos(self) -> Z80Any[src]

Converts an instance of any variant of Z80Any to a Z80Any::CMOS variant.

pub fn into_bm1(self) -> Z80Any[src]

Converts an instance of any variant of Z80Any to a Z80Any::BM1 variant.

pub fn unwrap_nmos(self) -> Z80<NMOS>[src]

Returns the contained Z80<NMOS> value, consuming the self value.

Panics

Panics if the self value is not a Z80Any::NMOS variant.

pub fn unwrap_cmos(self) -> Z80<CMOS>[src]

Returns the contained Z80<CMOS> value, consuming the self value.

Panics

Panics if the self value is not a Z80Any::CMOS variant.

pub fn unwrap_bm1(self) -> Z80<BM1>[src]

Returns the contained Z80<BM1> value, consuming the self value.

Panics

Panics if the self value is not a Z80Any::BM1 variant.

pub fn get_memptr(&self) -> u16[src]

Retrieves the internal state of the MEMPTR register.

pub fn set_memptr(&mut self, memptr: u16)[src]

Changes the internal state of the MEMPTR register.

pub fn normalize_r(&mut self)[src]

The content of the R register is lazy evaluated when its value is being set or retrieved. This method normalizes the internal state of the R register, so e.g. two instances of Z80 can be compared if they represent the same CPU state.

Trait Implementations

impl Clone for Z80Any[src]

impl Cpu for Z80Any[src]

impl Debug for Z80Any[src]

impl Default for Z80Any[src]

impl<'de> Deserialize<'de> for Z80Any[src]

impl Display for Z80Any[src]

Displays the tag of the current Z80 variant.

impl Eq for Z80Any[src]

impl<Q: Flavour> From<Z80<Q>> for Z80Any[src]

impl<Q> From<Z80Any> for Z80<Q> where
    Q: Flavour + From<NMOS> + From<CMOS> + From<BM1>, 
[src]

impl PartialEq<Z80Any> for Z80Any[src]

impl Serialize for Z80Any[src]

impl StructuralEq for Z80Any[src]

impl StructuralPartialEq for Z80Any[src]

Auto Trait Implementations

impl RefUnwindSafe for Z80Any

impl Send for Z80Any

impl Sync for Z80Any

impl Unpin for Z80Any

impl UnwindSafe for Z80Any

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.