pub struct Cache(/* private fields */);Expand description
Cached system api end-point.
Stores one reference, so size on stack is eq usize.
All calls approximately costs ~1 deref.
Implementations§
Trait Implementations§
Source§impl Api for Cache
impl Api for Cache
Source§fn get_language(&self) -> unsafe extern "C" fn() -> PDLanguage
fn get_language(&self) -> unsafe extern "C" fn() -> PDLanguage
Equivalent to sys::ffi::playdate_sys::getLanguage
Source§fn get_current_time_milliseconds(&self) -> unsafe extern "C" fn() -> c_uint
fn get_current_time_milliseconds(&self) -> unsafe extern "C" fn() -> c_uint
Equivalent to sys::ffi::playdate_sys::getCurrentTimeMilliseconds
Source§fn get_seconds_since_epoch(
&self,
) -> unsafe extern "C" fn(milliseconds: *mut c_uint) -> c_uint
fn get_seconds_since_epoch( &self, ) -> unsafe extern "C" fn(milliseconds: *mut c_uint) -> c_uint
Equivalent to sys::ffi::playdate_sys::getSecondsSinceEpoch
Source§fn draw_fps(&self) -> unsafe extern "C" fn(x: c_int, y: c_int)
fn draw_fps(&self) -> unsafe extern "C" fn(x: c_int, y: c_int)
Equivalent to sys::ffi::playdate_sys::drawFPS
Source§fn set_update_callback(
&self,
) -> unsafe extern "C" fn(update: PDCallbackFunction, userdata: *mut c_void)
fn set_update_callback( &self, ) -> unsafe extern "C" fn(update: PDCallbackFunction, userdata: *mut c_void)
Equivalent to sys::ffi::playdate_sys::setUpdateCallback
Source§fn get_flipped(&self) -> unsafe extern "C" fn() -> c_int
fn get_flipped(&self) -> unsafe extern "C" fn() -> c_int
Equivalent to sys::ffi::playdate_sys::getFlipped
Source§fn set_auto_lock_disabled(&self) -> unsafe extern "C" fn(disable: c_int)
fn set_auto_lock_disabled(&self) -> unsafe extern "C" fn(disable: c_int)
Equivalent to sys::ffi::playdate_sys::setAutoLockDisabled
Source§fn get_reduce_flashing(&self) -> unsafe extern "C" fn() -> c_int
fn get_reduce_flashing(&self) -> unsafe extern "C" fn() -> c_int
Equivalent to sys::ffi::playdate_sys::getReduceFlashing
Source§fn get_elapsed_time(&self) -> unsafe extern "C" fn() -> c_float
fn get_elapsed_time(&self) -> unsafe extern "C" fn() -> c_float
Equivalent to sys::ffi::playdate_sys::getElapsedTime
Source§fn reset_elapsed_time(&self) -> unsafe extern "C" fn()
fn reset_elapsed_time(&self) -> unsafe extern "C" fn()
Equivalent to sys::ffi::playdate_sys::resetElapsedTime
Source§fn get_battery_percentage(&self) -> unsafe extern "C" fn() -> c_float
fn get_battery_percentage(&self) -> unsafe extern "C" fn() -> c_float
Equivalent to sys::ffi::playdate_sys::getBatteryPercentage
Source§fn get_battery_voltage(&self) -> unsafe extern "C" fn() -> c_float
fn get_battery_voltage(&self) -> unsafe extern "C" fn() -> c_float
Equivalent to sys::ffi::playdate_sys::getBatteryVoltage
Source§fn get_timezone_offset(&self) -> unsafe extern "C" fn() -> i32
fn get_timezone_offset(&self) -> unsafe extern "C" fn() -> i32
Equivalent to sys::ffi::playdate_sys::getTimezoneOffset
Source§fn should_display_24_hour_time(&self) -> unsafe extern "C" fn() -> c_int
fn should_display_24_hour_time(&self) -> unsafe extern "C" fn() -> c_int
Equivalent to sys::ffi::playdate_sys::shouldDisplay24HourTime
Source§fn convert_epoch_to_date_time(
&self,
) -> unsafe extern "C" fn(epoch: u32, datetime: *mut PDDateTime)
fn convert_epoch_to_date_time( &self, ) -> unsafe extern "C" fn(epoch: u32, datetime: *mut PDDateTime)
Equivalent to sys::ffi::playdate_sys::convertEpochToDateTime
Source§fn convert_date_time_to_epoch(
&self,
) -> unsafe extern "C" fn(datetime: *mut PDDateTime) -> u32
fn convert_date_time_to_epoch( &self, ) -> unsafe extern "C" fn(datetime: *mut PDDateTime) -> u32
Equivalent to sys::ffi::playdate_sys::convertDateTimeToEpoch
Source§fn set_serial_message_callback(
&self,
) -> unsafe extern "C" fn(callback: FnSerialMessageCallback)
fn set_serial_message_callback( &self, ) -> unsafe extern "C" fn(callback: FnSerialMessageCallback)
Equivalent to sys::ffi::playdate_sys::setSerialMessageCallback
Source§impl From<&NonNull<playdate_sys>> for Cache
impl From<&NonNull<playdate_sys>> for Cache
Source§fn from(ptr: &NonNull<playdate_sys>) -> Self
fn from(ptr: &NonNull<playdate_sys>) -> Self
Source§impl From<&'static playdate_sys> for Cache
impl From<&'static playdate_sys> for Cache
Source§fn from(r: &'static playdate_sys) -> Self
fn from(r: &'static playdate_sys) -> Self
Source§impl From<*const playdate_sys> for Cache
impl From<*const playdate_sys> for Cache
Source§fn from(ptr: *const playdate_sys) -> Self
fn from(ptr: *const playdate_sys) -> Self
Source§impl From<NonNull<playdate_sys>> for Cache
impl From<NonNull<playdate_sys>> for Cache
Source§fn from(ptr: NonNull<playdate_sys>) -> Self
fn from(ptr: NonNull<playdate_sys>) -> Self
impl Copy for Cache
Auto Trait Implementations§
impl Freeze for Cache
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
§impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes