pub struct ScriptLanguage {
pub name: &'static str,
pub install: InstallFn,
pub reload: Option<ReloadFn>,
pub access: fn() -> ScriptHostAccess,
pub check: Option<CheckFn>,
pub compile: Option<CompileFn>,
pub image_exports: Option<ImageExportsFn>,
pub markup_blocks: Option<MarkupBlocksFn>,
}Expand description
One script language, as a host module registers it.
Only Self::install and Self::access are required: a host that runs
precompiled bytecode alone has no compiler to check, compile, or reload
with, and leaves those entries empty.
Fields§
§name: &'static strThe language’s name, the one [script] engine and the module’s
descriptor use.
install: InstallFnInstall the host over a program.
reload: Option<ReloadFn>Swap the program for a hot reload.
access: fn() -> ScriptHostAccessReach the installed host.
check: Option<CheckFn>Compile-check a program.
compile: Option<CompileFn>Compile a program to bytecode.
image_exports: Option<ImageExportsFn>Read a bytecode image’s exports.
markup_blocks: Option<MarkupBlocksFn>Read the markup blocks a script writes.
Implementations§
Trait Implementations§
Source§impl Clone for ScriptLanguage
impl Clone for ScriptLanguage
Source§fn clone(&self) -> ScriptLanguage
fn clone(&self) -> ScriptLanguage
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 ScriptLanguage
impl Debug for ScriptLanguage
impl Copy for ScriptLanguage
Auto Trait Implementations§
impl Freeze for ScriptLanguage
impl RefUnwindSafe for ScriptLanguage
impl Send for ScriptLanguage
impl Sync for ScriptLanguage
impl Unpin for ScriptLanguage
impl UnsafeUnpin for ScriptLanguage
impl UnwindSafe for ScriptLanguage
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.