pub struct UnloadedProgram { /* private fields */ }
Expand description
A program whose strings have not been yet been loaded into the thread-local string table
This means that an UnloadedProgram
cannot be executed. However, it also means that an
UnloadedProgram
is also self-contained, which is useful for exporting to a file or
between threads.
Implementations§
Source§impl UnloadedProgram
impl UnloadedProgram
pub fn main(&self) -> &[u8] ⓘ
pub fn get_chunk(&self, fun_id: FunctionID) -> &[u8] ⓘ
pub fn chunk_info(&self, fun_id: FunctionID) -> &ChunkInfo
pub fn iter_chunks(&self) -> impl Iterator<Item = (Chunk, &[u8])>
pub fn get_string(&self, string_id: StringID) -> &str
pub fn iter_strings(&self) -> impl Iterator<Item = (StringID, &str)>
pub fn get_const(&self, index: ConstID) -> &Constant
pub fn get_function(&self, index: FunctionID) -> &UnloadedFunction
Trait Implementations§
Source§impl Clone for UnloadedProgram
impl Clone for UnloadedProgram
Source§fn clone(&self) -> UnloadedProgram
fn clone(&self) -> UnloadedProgram
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for UnloadedProgram
impl RefUnwindSafe for UnloadedProgram
impl Send for UnloadedProgram
impl Sync for UnloadedProgram
impl Unpin for UnloadedProgram
impl UnwindSafe for UnloadedProgram
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