Enum z80emu::InterruptMode
source · #[repr(u8)]pub enum InterruptMode {
Mode0 = 0,
Mode1 = 1,
Mode2 = 2,
}
Expand description
An enum of the maskable interrupt modes.
Variants§
Mode0 = 0
The data bus instruction mode: IM 0
.
Mode1 = 1
The RST 38
mode: IM 1
.
Mode2 = 2
The vector jump table mode: IM 2
.
Implementations§
source§impl InterruptMode
impl InterruptMode
sourcepub const fn to_mode_number(self) -> u8
pub const fn to_mode_number(self) -> u8
Return the interrupt mode number.
Trait Implementations§
source§impl Clone for InterruptMode
impl Clone for InterruptMode
source§fn clone(&self) -> InterruptMode
fn clone(&self) -> InterruptMode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InterruptMode
impl Debug for InterruptMode
source§impl Default for InterruptMode
impl Default for InterruptMode
source§fn default() -> InterruptMode
fn default() -> InterruptMode
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for InterruptMode
impl<'de> Deserialize<'de> for InterruptMode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<InterruptMode> for u8
impl From<InterruptMode> for u8
source§fn from(im: InterruptMode) -> u8
fn from(im: InterruptMode) -> u8
Convert interrupt mode to the IM mode number.
source§impl Hash for InterruptMode
impl Hash for InterruptMode
source§impl PartialEq for InterruptMode
impl PartialEq for InterruptMode
source§fn eq(&self, other: &InterruptMode) -> bool
fn eq(&self, other: &InterruptMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for InterruptMode
impl Serialize for InterruptMode
source§impl TryFrom<u8> for InterruptMode
impl TryFrom<u8> for InterruptMode
impl Copy for InterruptMode
impl Eq for InterruptMode
impl StructuralPartialEq for InterruptMode
Auto Trait Implementations§
impl RefUnwindSafe for InterruptMode
impl Send for InterruptMode
impl Sync for InterruptMode
impl Unpin for InterruptMode
impl UnwindSafe for InterruptMode
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