pub struct ScriptCompile<'a> {
pub uri: &'a str,
pub source_map: &'a SourceMap,
pub lib_dir: Option<&'a Path>,
pub import_roots: &'a [(String, PathBuf)],
pub cfg_flags: &'a [&'a str],
pub fns: &'a [ScriptFn],
pub preludes: &'a [ScriptPrelude],
}Expand description
What an ahead-of-time check or compile is done against: the same things a run hands the host, plus the functions and sources the app’s modules register, declared but never called.
Fields§
§uri: &'a strWhere the program came from, named in a compile error.
source_map: &'a SourceMapWhere each piece of the source was read from; see
ScriptError::relocate.
lib_dir: Option<&'a Path>The app’s lib/ directory.
import_roots: &'a [(String, PathBuf)]Script libraries the app depends on.
cfg_flags: &'a [&'a str]The names a script’s compile-time conditions are true for.
fns: &'a [ScriptFn]Functions the program may call, declared to the compiler.
preludes: &'a [ScriptPrelude]Sources the modules register, compiled ahead of the program. A host takes the ones written in its own language.
Trait Implementations§
Source§impl<'a> Clone for ScriptCompile<'a>
impl<'a> Clone for ScriptCompile<'a>
Source§fn clone(&self) -> ScriptCompile<'a>
fn clone(&self) -> ScriptCompile<'a>
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<'a> Debug for ScriptCompile<'a>
impl<'a> Debug for ScriptCompile<'a>
impl<'a> Copy for ScriptCompile<'a>
Auto Trait Implementations§
impl<'a> Freeze for ScriptCompile<'a>
impl<'a> !RefUnwindSafe for ScriptCompile<'a>
impl<'a> Send for ScriptCompile<'a>
impl<'a> Sync for ScriptCompile<'a>
impl<'a> Unpin for ScriptCompile<'a>
impl<'a> UnsafeUnpin for ScriptCompile<'a>
impl<'a> !UnwindSafe for ScriptCompile<'a>
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.