pub struct CompiledScript {
pub engine: String,
pub module: String,
pub source: String,
pub bytecode: Option<Vec<u8>>,
pub source_map: SourceMap,
}Expand description
One language’s whole program, as baked at build time.
A script file belongs to the language its extension names, so an app that mixes languages compiles to one entry per language. The language is stored by name, the one its host module registers.
Fields§
§engine: StringThe language’s name.
module: StringThe runtime module that runs the program: the host a shipped app loads for it. Empty when the build knew of none.
source: StringEvery source file the language owns, concatenated in source order.
Empty for a program compiled to Self::bytecode, which a shipped app
runs without its source.
bytecode: Option<Vec<u8>>The program compiled ahead of time, for a language that has a bytecode
form; None for one that runs from Self::source.
source_map: SourceMapWhere each piece of Self::source was read from. Empty for a program
compiled to bytecode.
Trait Implementations§
Source§impl Clone for CompiledScript
impl Clone for CompiledScript
Source§fn clone(&self) -> CompiledScript
fn clone(&self) -> CompiledScript
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompiledScript
impl Debug for CompiledScript
Source§impl<'de> Deserialize<'de> for CompiledScript
impl<'de> Deserialize<'de> for CompiledScript
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompiledScript
impl RefUnwindSafe for CompiledScript
impl Send for CompiledScript
impl Sync for CompiledScript
impl Unpin for CompiledScript
impl UnsafeUnpin for CompiledScript
impl UnwindSafe for CompiledScript
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.