pub struct Lua<Api = Default>(/* private fields */);
Implementations§
Source§impl Lua<Default>
impl Lua<Default>
Sourcepub fn Default() -> Self
pub fn Default() -> Self
Creates default Lua
without type parameter requirement.
Uses ZST api::Default
.
Source§impl Lua<Cache>
impl Lua<Cache>
Sourcepub fn Cached() -> Self
pub fn Cached() -> Self
Creates Lua
without type parameter requirement.
Uses api::Cache
.
Source§impl<Api: Api> Lua<Api>
impl<Api: Api> Lua<Api>
Sourcepub fn add_function<S: AsRef<str>>(
&self,
f: lua_CFunction,
name: S,
) -> Result<(), ApiError>
pub fn add_function<S: AsRef<str>>( &self, f: lua_CFunction, name: S, ) -> Result<(), ApiError>
Adds the Lua function f to the Lua runtime, with name name. (name can be a table path using dots, e.g. if name = “mycode.myDrawingFunction” adds the function “myDrawingFunction” to the global table “myCode”.)
Equivalent to sys::ffi::playdate_lua::addFunction
Sourcepub fn get_arg_string(&self, pos: i32) -> Option<CString>
pub fn get_arg_string(&self, pos: i32) -> Option<CString>
Returns the argument at position pos as a string.
Equivalent to sys::ffi::playdate_lua::getArgString
Trait Implementations§
impl<Api: Copy> Copy for Lua<Api>
Auto Trait Implementations§
impl<Api> Freeze for Lua<Api>where
Api: Freeze,
impl<Api> RefUnwindSafe for Lua<Api>where
Api: RefUnwindSafe,
impl<Api> Send for Lua<Api>where
Api: Send,
impl<Api> Sync for Lua<Api>where
Api: Sync,
impl<Api> Unpin for Lua<Api>where
Api: Unpin,
impl<Api> UnwindSafe for Lua<Api>where
Api: UnwindSafe,
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
Mutably borrows from an owned value. Read more
§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)
🔬This is a nightly-only experimental API. (
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: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.