Struct tetanes_web::Nes
source · pub struct Nes { /* private fields */ }
Implementations§
source§impl Nes
impl Nes
pub fn init()
pub fn new(output_sample_rate: f32, max_delta: f32) -> Self
pub fn pause(&mut self, val: bool)
pub fn set_sound(&mut self, enabled: bool)
pub fn frame(&mut self) -> *const u8
pub fn audio_callback(&mut self, out: &mut [f32])
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn sample_rate(&self) -> f32
pub fn clock_frame(&mut self)
pub fn load_rom(&mut self, bytes: &[u8])
pub fn handle_event(&mut self, key: &str, pressed: bool, repeat: bool) -> bool
Trait Implementations§
source§impl FromWasmAbi for Nes
impl FromWasmAbi for Nes
source§impl IntoWasmAbi for Nes
impl IntoWasmAbi for Nes
source§impl LongRefFromWasmAbi for Nes
impl LongRefFromWasmAbi for Nes
source§impl OptionFromWasmAbi for Nes
impl OptionFromWasmAbi for Nes
source§impl OptionIntoWasmAbi for Nes
impl OptionIntoWasmAbi for Nes
source§impl RefFromWasmAbi for Nes
impl RefFromWasmAbi for Nes
source§impl RefMutFromWasmAbi for Nes
impl RefMutFromWasmAbi for Nes
source§impl TryFromJsValue for Nes
impl TryFromJsValue for Nes
source§impl VectorFromWasmAbi for Nes
impl VectorFromWasmAbi for Nes
source§impl VectorIntoWasmAbi for Nes
impl VectorIntoWasmAbi for Nes
Auto Trait Implementations§
impl RefUnwindSafe for Nes
impl !Send for Nes
impl !Sync for Nes
impl Unpin for Nes
impl UnwindSafe for Nes
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
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.