pub struct ModuleSource {
pub code: Arc<[u8]>,
pub origin: String,
}Expand description
A module’s source for require (Libs::REQUIRE), from the host: Lua source text,
compiled as load compiles it (text only, charged the same) as chunk @origin.
require gives origin as its second result, as C Lua gives a module’s file name.
Fields§
§code: Arc<[u8]>The source text.
origin: StringWhere it came from, for messages and tracebacks (origin:3: ...).
Implementations§
Source§impl ModuleSource
impl ModuleSource
Trait Implementations§
Source§impl Clone for ModuleSource
impl Clone for ModuleSource
Auto Trait Implementations§
impl Forget for ModuleSource
impl Freeze for ModuleSource
impl Move for ModuleSource
impl RefUnwindSafe for ModuleSource
impl Send for ModuleSource
impl Sync for ModuleSource
impl Unpin for ModuleSource
impl UnsafeUnpin for ModuleSource
impl UnwindSafe for ModuleSource
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