#[non_exhaustive]pub struct TranspileConfig {
pub opts: TranspileOpts,
pub call_tracking: bool,
pub optional_result_payloads: bool,
pub type_generation: TypeGenerationConfig,
pub cm_runtime_es_module: Option<String>,
}Expand description
Extensible configuration for transpile_with_config.
TranspileOpts keeps its published fields so existing struct literals remain
valid. New options belong here, where fields can be added compatibly.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.opts: TranspileOptsOptions shared with transpile and generate_types.
call_tracking: boolEmit optional host invocation tracking, independent of the runtime provider.
optional_result_payloads: boolDeclare the val of a WIT result arm that has no payload as optional
in the generated TypeScript, so that { tag: 'ok' } is a complete
result<_, E> value.
type_generation: TypeGenerationConfigControls declaration contracts independently of the embedding tool defaults.
cm_runtime_es_module: Option<String>Package or directory base for the experimental Component Model runtime.
Generated bindings import named exports from runtime and intrinsics/* subpaths.
Intrinsics are generated inline when this is None (the default),
unless the embedded-cm-runtime Cargo feature is enabled: the runtime
shipped with this crate is then bundled into the generated bindings.
Requires the external-runtime Cargo feature.
Implementations§
Source§impl TranspileConfig
impl TranspileConfig
Sourcepub fn builder() -> TranspileConfigBuilder
pub fn builder() -> TranspileConfigBuilder
Create an instance of TranspileConfig using the builder syntax
Trait Implementations§
Source§impl Clone for TranspileConfig
impl Clone for TranspileConfig
Source§impl Debug for TranspileConfig
impl Debug for TranspileConfig
Auto Trait Implementations§
impl Forget for TranspileConfig
impl Freeze for TranspileConfig
impl Move for TranspileConfig
impl RefUnwindSafe for TranspileConfig
impl Send for TranspileConfig
impl Sync for TranspileConfig
impl Unpin for TranspileConfig
impl UnsafeUnpin for TranspileConfig
impl UnwindSafe for TranspileConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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