pub struct LibraryRegistry { /* private fields */ }Expand description
Registry for all Lua standard libraries
Implementations§
Source§impl LibraryRegistry
impl LibraryRegistry
Sourcepub fn register(&mut self, module: LibraryModule)
pub fn register(&mut self, module: LibraryModule)
Register a library module
Sourcepub fn load_all(&self, vm: &mut LuaVM) -> LuaResult<()>
pub fn load_all(&self, vm: &mut LuaVM) -> LuaResult<()>
Load all registered libraries into a VM
Sourcepub fn load_module(
&self,
vm: &mut LuaVM,
module: &LibraryModule,
) -> LuaResult<()>
pub fn load_module( &self, vm: &mut LuaVM, module: &LibraryModule, ) -> LuaResult<()>
Load a specific module into the VM
Sourcepub fn get_module(&self, name: &str) -> Option<&LibraryModule>
pub fn get_module(&self, name: &str) -> Option<&LibraryModule>
Get a module by name
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LibraryRegistry
impl RefUnwindSafe for LibraryRegistry
impl Send for LibraryRegistry
impl Sync for LibraryRegistry
impl Unpin for LibraryRegistry
impl UnsafeUnpin for LibraryRegistry
impl UnwindSafe for LibraryRegistry
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