pub enum EmbeddingMode {
EmbedFile(Utf8PathBuf),
Composition,
BinarySlot,
}Expand description
Specifies how a given user-defined JS module gets embedded into the generated Rust crate.
Variants§
EmbedFile(Utf8PathBuf)
Points to a JS module file that is going to be embedded into the generated Rust crate
Composition
The JS module is going to be fetched run-time through an imported WIT interface
BinarySlot
Embeds a small marker in the compiled WASM component.
After compilation, JS source can be injected into the marker via inject_js_into_component
without recompiling the Rust crate. The injected JS can be any size — the WASM component
is structurally rewritten to accommodate the new data.
Implementations§
Source§impl EmbeddingMode
impl EmbeddingMode
pub fn is_binary_slot(&self) -> bool
Trait Implementations§
Source§impl Clone for EmbeddingMode
impl Clone for EmbeddingMode
Source§fn clone(&self) -> EmbeddingMode
fn clone(&self) -> EmbeddingMode
Returns a duplicate of the value. Read more
1.0.0 · 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 EmbeddingMode
impl RefUnwindSafe for EmbeddingMode
impl Send for EmbeddingMode
impl Sync for EmbeddingMode
impl Unpin for EmbeddingMode
impl UnsafeUnpin for EmbeddingMode
impl UnwindSafe for EmbeddingMode
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