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
sourceimpl UnloadedProgram
 
impl UnloadedProgram
pub fn main(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn get_chunk(&self, fun_id: FunctionID) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [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
sourceimpl Clone for UnloadedProgram
 
impl Clone for UnloadedProgram
sourcefn clone(&self) -> UnloadedProgram
 
fn clone(&self) -> UnloadedProgram
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for UnloadedProgram
impl Send for UnloadedProgram
impl Sync for UnloadedProgram
impl Unpin for UnloadedProgram
impl UnwindSafe for UnloadedProgram
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
    T: Clone, 
 
impl<T> ToOwned for T where
    T: Clone, 
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
 
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more