pub enum Target {
Bundler,
Web,
Nodejs,
NoModules,
Deno,
}Expand description
What sort of output we’re going to be generating and flags we’re invoking
wasm-bindgen with.
Variants§
Bundler
Default output mode or --target bundler, indicates output will be
used with a bundle in a later step.
Web
Correspond to --target web where the output is natively usable as an
ES module in a browser and the wasm is manually instantiated.
Nodejs
Correspond to --target nodejs where the output is natively usable as
a Node.js module loaded with require.
NoModules
Correspond to --target no-modules where the output is natively usable
in a browser but pollutes the global namespace and must be manually
instantiated.
Deno
Correspond to --target deno where the output is natively usable as
a Deno module loaded with import.
Trait Implementations§
impl Copy for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more