Skip to main content

DeviceImpl

Struct DeviceImpl 

Source
pub struct DeviceImpl<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> DeviceImpl<'a>

Source

pub fn new(config: DeviceConfig) -> Self

Source

pub fn update_input(&mut self, input: InputState)

Called by the GUI to set input from UI and keyboard.

Source

pub fn alloc_psram(&self, size: usize) -> Vec<u8>

Trait Implementations§

Source§

impl<'a> Device for DeviceImpl<'a>

Source§

type Network = NetworkImpl<'a>

Source§

type Serial = SerialImpl

Source§

type Dir = DirImpl

Source§

fn now(&self) -> Instant

The current time. Read more
Source§

fn delay(&self, d: Duration)

Suspends the current thread for the given duration. Read more
Source§

fn read_input(&mut self) -> Option<InputState>

Read gamepad input.
Source§

fn log_debug<D: Display>(&self, src: &str, msg: D)

Log a debug message into console. Read more
Source§

fn log_error<D: Display>(&self, src: &str, msg: D)

Log an error into console. Read more
Source§

fn random(&mut self) -> u32

Get a random number.
Source§

fn open_dir(&mut self, path: &[&str]) -> Result<Self::Dir, FSError>

Source§

fn has_headphones(&mut self) -> bool

Returns true if headphones are connected.
Source§

fn get_audio_buffer(&mut self) -> &mut [i16]

Get a writable slice of free audio buffer region.
Source§

fn get_battery_status(&mut self) -> Option<BatteryStatus>

Source§

fn network(&mut self) -> Self::Network

Source§

fn serial(&self) -> Self::Serial

Access the USB serial port. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DeviceImpl<'a>

§

impl<'a> !RefUnwindSafe for DeviceImpl<'a>

§

impl<'a> Send for DeviceImpl<'a>

§

impl<'a> !Sync for DeviceImpl<'a>

§

impl<'a> Unpin for DeviceImpl<'a>

§

impl<'a> UnsafeUnpin for DeviceImpl<'a>

§

impl<'a> !UnwindSafe for DeviceImpl<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,