pub struct FunctionModule {
pub name: String,
pub source_hash: String,
pub bytecode: Bytes,
pub runtime: RuntimeType,
}Expand description
A compiled function module ready for execution.
Fields§
§name: StringUnique name for this function.
source_hash: StringHash of the module source (for caching).
bytecode: BytesCompiled bytecode or source text.
runtime: RuntimeTypeWhich runtime executes this module.
Implementations§
Source§impl FunctionModule
impl FunctionModule
Sourcepub fn from_bytecode(name: String, bytecode: Bytes) -> Self
pub fn from_bytecode(name: String, bytecode: Bytes) -> Self
Create a new WASM module from compiled bytecode.
Sourcepub fn from_source(name: String, source: String, runtime: RuntimeType) -> Self
pub fn from_source(name: String, source: String, runtime: RuntimeType) -> Self
Create a new source-based module (JavaScript/TypeScript).
Trait Implementations§
Source§impl Clone for FunctionModule
impl Clone for FunctionModule
Source§fn clone(&self) -> FunctionModule
fn clone(&self) -> FunctionModule
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 moreAuto Trait Implementations§
impl !Freeze for FunctionModule
impl RefUnwindSafe for FunctionModule
impl Send for FunctionModule
impl Sync for FunctionModule
impl Unpin for FunctionModule
impl UnsafeUnpin for FunctionModule
impl UnwindSafe for FunctionModule
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