#[non_exhaustive]pub struct TypeGenerationConfig {
pub nominal_resources: bool,
pub async_imports_may_return_sync: bool,
pub typed_error_classes: bool,
pub separate_interface_types: bool,
}Expand description
Controls declaration contracts that embedding tools may need to stabilize independently. All fields default to true; the Jco frontend selects its compatibility defaults explicitly.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.nominal_resources: boolRequire nominal identities for resources supplied by the bindings.
async_imports_may_return_sync: boolAllow host async imports to return a value without a Promise.
typed_error_classes: boolExport named error classes for named result error payloads.
separate_interface_types: boolGenerate separate import-side and export-side interface declarations. Any of the other enabled contracts also requires separate declarations.
Implementations§
Source§impl TypeGenerationConfig
impl TypeGenerationConfig
Sourcepub fn builder() -> TypeGenerationConfigBuilder
pub fn builder() -> TypeGenerationConfigBuilder
Create an instance of TypeGenerationConfig using the builder syntax
Trait Implementations§
Source§impl Clone for TypeGenerationConfig
impl Clone for TypeGenerationConfig
impl Copy for TypeGenerationConfig
Source§impl Debug for TypeGenerationConfig
impl Debug for TypeGenerationConfig
Auto Trait Implementations§
impl Forget for TypeGenerationConfig
impl Freeze for TypeGenerationConfig
impl Move for TypeGenerationConfig
impl RefUnwindSafe for TypeGenerationConfig
impl Send for TypeGenerationConfig
impl Sync for TypeGenerationConfig
impl Unpin for TypeGenerationConfig
impl UnsafeUnpin for TypeGenerationConfig
impl UnwindSafe for TypeGenerationConfig
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> 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> ⓘ
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