Struct rustzx_core::Emulator[][src]

pub struct Emulator<H: Host> { /* fields omitted */ }
Expand description

Represents main Emulator structure

Implementations

impl<H: Host> Emulator<H>[src]

pub fn new(settings: RustzxSettings, context: H::Context) -> Result<Self>[src]

Constructs new emulator

Arguments

settings - emulator settings

pub fn set_speed(&mut self, new_speed: EmulationSpeed)[src]

changes emulation speed

pub fn set_fast_load(&mut self, value: bool)[src]

changes fast loading flag

pub fn load_snapshot(
    &mut self,
    snapshot: Snapshot<H::SnapshotAsset>
) -> Result<()>
[src]

pub fn load_tape(&mut self, tape: Tape<H::TapeAsset>) -> Result<()>[src]

pub fn load_rom(&mut self, rom: H::RomSet) -> Result<()>[src]

pub fn play_tape(&mut self)[src]

pub fn stop_tape(&mut self)[src]

pub fn screen_buffer(&self) -> &H::FrameBuffer[src]

pub fn border_color(&self) -> ZXColor[src]

pub fn send_key(&mut self, key: ZXKey, pressed: bool)[src]

pub fn send_kempston_key(&mut self, key: KempstonKey, state: bool)[src]

pub fn emulate_frames<S>(
    &mut self,
    max_time: Duration,
    stopwatch: &mut S
) -> Result<Duration> where
    S: Stopwatch
[src]

Emulate frames, maximum in max_time time, returns emulation time in nanoseconds in most cases time is max 1/50 of second, even when using loader acceleration

Auto Trait Implementations

impl<H> RefUnwindSafe for Emulator<H> where
    <H as Host>::FrameBuffer: RefUnwindSafe,
    <H as Host>::TapeAsset: RefUnwindSafe

impl<H> Send for Emulator<H> where
    <H as Host>::FrameBuffer: Send,
    <H as Host>::TapeAsset: Send

impl<H> Sync for Emulator<H> where
    <H as Host>::FrameBuffer: Sync,
    <H as Host>::TapeAsset: Sync

impl<H> Unpin for Emulator<H> where
    <H as Host>::FrameBuffer: Unpin,
    <H as Host>::TapeAsset: Unpin

impl<H> UnwindSafe for Emulator<H> where
    <H as Host>::FrameBuffer: UnwindSafe,
    <H as Host>::TapeAsset: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.