From bbda7735065bee0d8bb174cd4f3e9366acda42a3 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Wed, 29 Apr 2026 15:07:11 -0700 Subject: [PATCH] Iterable / iterator support and generic type parameter propagation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds first-class handling for the TS iterability protocol and bare generic type parameters in method signatures, so APIs like `SyncKvStorage.put(key: string, value: T)` and `SyncKvStorage.list(): Iterable<[string, T]>` round-trip into typed wasm-bindgen externs without erasing the generics. `Iterator` and `IterableIterator` map directly to `js_sys::Iterator`; `AsyncIterator` and `AsyncIterableIterator` map to `js_sys::AsyncIterator`. These are added as new IR variants (`TypeRef::Iterator` and `TypeRef::AsyncIterator`) and emit through the existing generic container machinery alongside `Promise`. `Iterable` describes the protocol — an object exposing `[Symbol.iterator](): Iterator` — distinct from `Iterator` itself. To preserve that at the binding layer, top-level `Iterable` returns now synthesize a wrapper extern type with a single `[Symbol.iterator]()` method: ```ts interface SyncKvStorage { list(): Iterable<[string, T]>; } ``` becomes: ```rust pub type SyncKvStorageList; pub fn iterator( this: &SyncKvStorageList, ) -> Iterator>; pub fn list(this: &SyncKvStorage) -> SyncKvStorageList; ``` The wrapper's name follows the existing `` convention with dedup, mirroring anonymous-interface parameter synthesis. `AsyncIterable` synthesizes the analogous wrapper keyed on `[Symbol.asyncIterator]`. The bracketed `js_name` matches wasm-bindgen's computed-property syntax for symbol-keyed methods. Nested occurrences inside unions or arrays are not synthesized — they erase to `JsValue`, matching the existing parameter-synthesis limitation. Bare TS generics on methods now survive codegen as `` declarations rather than being erased to `JsValue`. Implementation: * New `TypeRef::TypeParam(String)` IR variant for in-scope generic type parameter references. * `convert_ts_type_scoped` returns `TypeParam(name)` instead of `Any` for names in the method's type-parameter scope. * `convert_formal_params_with_synthesis` now threads scope through to parameter type conversion (previously called `convert_ts_type`, which ignored scope). * Method codegen collects every `TypeParam` reachable from the signature and emits a generic decl bounded by `::wasm_bindgen::JsGeneric`. Synthesized iterable wrappers propagate any `TypeParam` from their item type onto the wrapper type itself, so `SyncKvStorageList` is `SyncKvStorageList`. * `pub type X` declarations carry their generics so type aliases that mention generic parameters compile. `GenericInstantiation` codegen now consults the codegen context's recorded type-parameter arity per local type. References like `ReadableStream` whose target accepts zero generics (non-generic web-sys / external types) drop the args and emit the bare base type, preventing `E0107`. Symbol JS names like `[Symbol.iterator]` previously snake_cased to `symboliterator`. `base_rust_name` now strips the `[Symbol.` prefix and trailing `]` when computing the Rust name, so the synthesized iterator methods read as `iterator` / `async_iterator` while `js_name` keeps the bracketed `[Symbol.iterator]` for wasm-bindgen. Generated files now begin with `// Generated by ts-gen. Do not edit.` (prepended after rustfmt — `quote!` doesn't preserve line comments through token streams). * New `tests/fixtures/iterables.d.ts` exercises every iterability variant plus generic propagation through `put` / `get`. * New `tests/snapshots/iterables.rs` blesses the expected output. * Four unit tests in `parse::members::tests` cover happy path (sync), async, non-iterable rejection, and dedup. * Existing snapshots updated: workers-types now produces typed `Iterator<...>`, `AsyncIterator<...>`, and per-method generics on `put` / `get` style methods that previously aliased `T` to `JsValue`. Two new sections (slotted next to `Promise` since all three share the generic-container shape): * `Iterator` / `IterableIterator` map to `js_sys::Iterator` * `Iterable` returns synthesize a wrapper with `[Symbol.iterator]()` `AGENTS.md` updated to clarify that CONVENTIONS sections are not numbered and are ordered from simplest to most obscure. --- AGENTS.md | 6 +- CONVENTIONS.md | 73 + src/codegen/classes.rs | 79 +- src/codegen/mod.rs | 27 +- src/codegen/signatures.rs | 112 +- src/codegen/typemap.rs | 76 +- src/ir.rs | 21 + src/parse/members.rs | 223 +- src/parse/types.rs | 30 +- tests/fixtures/iterables.d.ts | 27 + tests/snapshots/basic.rs | 4 +- tests/snapshots/cloudflare-worker.rs | 32 +- tests/snapshots/coverage.rs | 2 + tests/snapshots/es-module-lexer.rs | 2 + tests/snapshots/iterables.rs | 123 ++ tests/snapshots/node-console.rs | 2 + tests/snapshots/phase1.rs | 6 +- tests/snapshots/phase2.rs | 2 + tests/snapshots/web-sys-extend.rs | 4 +- tests/snapshots/workers-types.rs | 2902 +++++++++++++++----------- 20 files changed, 2502 insertions(+), 1251 deletions(-) create mode 100644 tests/fixtures/iterables.d.ts create mode 100644 tests/snapshots/iterables.rs diff --git a/AGENTS.md b/AGENTS.md index d61dd00..02cc074 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -58,7 +58,11 @@ complex (subtyping LUB across unions). **When to update `CONVENTIONS.md`:** -* Adding a new TS construct → add a numbered section. +* Adding a new TS construct → add a section. Sections are not + numbered; order them from simplest (primitives) to most obscure + (subtyping LUB across unions). Slot the new heading where it + naturally falls in that progression — usually next to a related + convention of similar complexity. * Changing an existing translation rule → update its section. * Bug fix that changes user-visible output → update if the fix changes the documented behaviour, otherwise just add a snapshot test. diff --git a/CONVENTIONS.md b/CONVENTIONS.md index 074d097..1164955 100644 --- a/CONVENTIONS.md +++ b/CONVENTIONS.md @@ -717,6 +717,79 @@ primitives via `value_of()` (for `Boolean` / `Number`) or Sync returns, arguments, and properties keep the bare-primitive lowering. +## `Iterator` / `IterableIterator` map to `js_sys::Iterator` + +```ts +interface FormData { + entries(): IterableIterator<[string, FormDataEntryValue]>; +} +``` + +emits: + +```rust +#[wasm_bindgen(method)] +pub fn entries(this: &FormData) -> Iterator>; +``` + +`Iterator` and `IterableIterator` describe runtime objects that +*are* iterators (have `.next()`), so they map directly to +`js_sys::Iterator` with the inner type erased the same way +`Promise` is — generic `T` parameters become `JsValue` unless they +resolve to a concrete named type at generation time. + +`AsyncIterator` and `AsyncIterableIterator` map to +`js_sys::AsyncIterator` analogously; wasm-bindgen models the two +iterator families separately. + +## `Iterable` returns synthesize a wrapper with `[Symbol.iterator]()` + +```ts +interface SyncKvStorage { + list(): Iterable<[string, T]>; +} +``` + +emits: + +```rust +#[wasm_bindgen(extends = Object)] +pub type SyncKvStorageList; +#[wasm_bindgen(method, js_name = "[Symbol.iterator]")] +pub fn iterator(this: &SyncKvStorageList) -> Iterator>; + +// And on the original interface: +#[wasm_bindgen(method)] +pub fn list(this: &SyncKvStorage) -> SyncKvStorageList; +``` + +`Iterable` describes the *protocol* — an object that exposes +`[Symbol.iterator](): Iterator` — distinct from `Iterator` (the +iterator object itself). To preserve that distinction at the binding +layer, ts-gen synthesizes a wrapper interface per top-level +`Iterable` return: + +* The wrapper's name is `` PascalCased, deduped + against existing names (same convention as anonymous-interface + parameter synthesis). +* The wrapper has a single method `iterator()` keyed on `Symbol.iterator` + via `js_name = "[Symbol.iterator]"`, returning the inner + `Iterator`. The bracketed form matches wasm-bindgen's + computed-property `js_name` syntax. +* The original method's return type is rewritten to the wrapper's name. + +`AsyncIterable` synthesizes the analogous wrapper using +`[Symbol.asyncIterator]` and `AsyncIterator` for the inner iterator. + +Nested occurrences (inside unions, arrays, etc.) are not synthesized — +they erase to `JsValue` at codegen, matching the existing +parameter-synthesis limitation. Hoist the type manually if a wrapper is +needed in those positions. + +Symbol-keyed methods drop the `[Symbol.` prefix and trailing `]` when +computing the Rust name: `[Symbol.iterator]` becomes `iterator`, not +`symboliterator`. + ## `@throws` JSDoc → typed error ```ts diff --git a/src/codegen/classes.rs b/src/codegen/classes.rs index 4c587f6..26e9f74 100644 --- a/src/codegen/classes.rs +++ b/src/codegen/classes.rs @@ -55,6 +55,10 @@ struct ClassConfig<'a> { is_abstract: bool, /// Members to generate. members: Vec, + /// Type parameters declared on the type itself (rendered as + /// `` on the `pub type` decl and propagated to + /// every `this: &Type` reference inside the extern block). + type_params: Vec, /// Codegen context for type resolution. cgctx: Option<&'a CodegenContext<'a>>, /// Scope for type reference resolution. @@ -85,6 +89,7 @@ impl<'a> ClassConfig<'a> { js_namespace: None, is_abstract: decl.is_abstract, members: decl.members.clone(), + type_params: decl.type_params.clone(), cgctx, scope, } @@ -117,11 +122,41 @@ impl<'a> ClassConfig<'a> { js_namespace: None, is_abstract: false, members: decl.members.clone(), + type_params: decl.type_params.clone(), cgctx, scope, } } + /// Tokens for the type-level generic declaration (``) + /// or empty when the type has no parameters. + fn type_generics_decl(&self) -> TokenStream { + if self.type_params.is_empty() { + return quote! {}; + } + let idents = self + .type_params + .iter() + .map(|tp| super::typemap::make_ident(&tp.name)) + .collect::>(); + quote! { <#(#idents: ::wasm_bindgen::JsGeneric),*> } + } + + /// Tokens for the type's generic-argument list (``) used in + /// `this: &Type` references inside the extern block. Empty + /// when there are no parameters. + fn type_generics_args(&self) -> TokenStream { + if self.type_params.is_empty() { + return quote! {}; + } + let idents = self + .type_params + .iter() + .map(|tp| super::typemap::make_ident(&tp.name)) + .collect::>(); + quote! { <#(#idents),*> } + } + /// Rust name to use everywhere the class identifier appears in generated /// code (`pub type X`, `this: &X`, `static_method_of = X`, …). /// @@ -976,10 +1011,12 @@ fn generate_type_decl(config: &ClassConfig) -> TokenStream { quote! { #[wasm_bindgen(#(#wb_parts),*)] } }; + let generics_decl = config.type_generics_decl(); + quote! { #wb_attr #[derive(Debug, Clone, PartialEq, Eq)] - pub type #rust_ident; + pub type #rust_ident #generics_decl; } } @@ -1071,13 +1108,47 @@ fn generate_expanded_method(config: &ClassConfig, sig: &FunctionSignature) -> To quote! {} }; + // wasm-bindgen requires every type parameter mentioned in a method + // signature to be redeclared on the method, even when the same name + // is already on the parent type — see `js_sys::Array::for_each` for the canonical pattern. + let method_generics = generic_params_for_method(config, sig); + let this_generics = config.type_generics_args(); + quote! { #doc #[wasm_bindgen(#(#wb_parts),*)] - pub #async_kw fn #rust_ident(this: &#this_type, #params) #ret; + pub #async_kw fn #rust_ident #method_generics (this: &#this_type #this_generics, #params) #ret; } } +/// Generic declaration for a method, covering both type-level parameters +/// referenced in `this: &Foo` and any method-only parameters +/// mentioned in arguments or the return type. wasm-bindgen requires the +/// redeclaration even for type-level params. +fn generic_params_for_method(config: &ClassConfig, sig: &FunctionSignature) -> TokenStream { + // Type-level params come first, in declaration order, so that + // `` aligns with the type's parameter + // list when `this: &Foo` is referenced. + let mut names: Vec = config + .type_params + .iter() + .map(|tp| tp.name.clone()) + .collect(); + for p in &sig.params { + super::signatures::collect_type_params(&p.type_ref, &mut names); + } + super::signatures::collect_type_params(&sig.return_type, &mut names); + if names.is_empty() { + return quote! {}; + } + let idents = names + .iter() + .map(|n| super::typemap::make_ident(n)) + .collect::>(); + quote! { <#(#idents: ::wasm_bindgen::JsGeneric),*> } +} + /// Generate a static method binding from an expanded signature. fn generate_expanded_static_method(config: &ClassConfig, sig: &FunctionSignature) -> TokenStream { let rust_ident = super::typemap::make_ident(&sig.rust_name); @@ -1124,10 +1195,12 @@ fn generate_expanded_static_method(config: &ClassConfig, sig: &FunctionSignature quote! {} }; + let generics = generic_params_for_method(config, sig); + quote! { #doc #[wasm_bindgen(#(#wb_parts),*)] - pub #async_kw fn #rust_ident(#params) #ret; + pub #async_kw fn #rust_ident #generics (#params) #ret; } } diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index bbeb529..28a400a 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -71,7 +71,12 @@ pub fn generate_with_options( syn::parse2::(tokens.clone()).map_err(|e| { anyhow::anyhow!("generated tokens are not valid syn:\n{e}\n\nTokens:\n{tokens}") })?; - rustfmt(&tokens.to_string()) + let formatted = rustfmt(&tokens.to_string())?; + // Prepend a header comment. Line comments don't survive `quote!` token + // generation, so they have to be emitted as plain text after formatting. + Ok(format!( + "// Generated by ts-gen. Do not edit.\n\n{formatted}" + )) } /// Format Rust source via `rustfmt`. @@ -120,8 +125,6 @@ fn generate_tokens( let cgctx = CodegenContext::from_module(module, gctx); let preamble = quote! { - // Auto-generated by ts-gen. Do not edit. - #[allow(unused_imports)] use wasm_bindgen::prelude::*; #[allow(unused_imports)] @@ -300,9 +303,25 @@ fn generate_type_alias( return quote! {}; } + // Type-parameter declaration so aliases that mention generics survive + // codegen: `type EmailExportedHandler = …;` rather than the + // bare `EmailExportedHandler =` that would leave `Props` undeclared. + let generics = if alias.type_params.is_empty() { + quote! {} + } else { + let idents = alias + .type_params + .iter() + .map(|tp| typemap::make_ident(&tp.name)) + .collect::>(); + // Type aliases use plain `` without trait bounds; aliases + // are erased during monomorphisation by their use sites. + quote! { <#(#idents),*> } + }; + quote! { #[allow(dead_code)] - pub type #name = #target; + pub type #name #generics = #target; } } diff --git a/src/codegen/signatures.rs b/src/codegen/signatures.rs index 23ed8cb..afa83c0 100644 --- a/src/codegen/signatures.rs +++ b/src/codegen/signatures.rs @@ -87,13 +87,23 @@ impl SignatureKind { /// Compute the default Rust name for a callable's primary variant before /// any `_with_X` suffix is appended. +/// +/// Symbol-keyed methods (`js_name = "[Symbol.iterator]"`) drop the +/// `[Symbol.` prefix and trailing `]` so the Rust name reads naturally +/// — `[Symbol.iterator]` becomes `iterator`, not `symboliterator`. The +/// symbol nature is conveyed by `js_name`; the Rust name doesn't need +/// to repeat it. pub fn base_rust_name(js_name: &str, kind: SignatureKind) -> String { + let raw = js_name + .strip_prefix("[Symbol.") + .and_then(|rest| rest.strip_suffix(']')) + .unwrap_or(js_name); match kind { SignatureKind::Constructor => "new".to_string(), SignatureKind::Setter | SignatureKind::StaticSetter => { - format!("set_{}", to_snake_case(js_name)) + format!("set_{}", to_snake_case(raw)) } - _ => to_snake_case(js_name), + _ => to_snake_case(raw), } } @@ -153,8 +163,11 @@ pub struct FunctionSignature { /// Assign a unique name within the extern block. /// -/// If `candidate` is already taken, appends `_1`, `_2`, etc. until a unique -/// name is found. The chosen name is inserted into `used_names`. +/// If `candidate` is already taken, appends `_2`, `_3`, etc. until a +/// unique name is found — the unsuffixed candidate is the implicit +/// `_1`, so collisions start at `_2` (matching the convention already +/// used by `parse::members::unique_type_name`). The chosen name is +/// inserted into `used_names`. pub fn dedupe_name(candidate: &str, used_names: &mut HashSet) -> String { let mut name = candidate.to_string(); if !used_names.contains(&name) { @@ -162,15 +175,14 @@ pub fn dedupe_name(candidate: &str, used_names: &mut HashSet) -> String return name; } let base = name.clone(); - let mut counter = 1u32; - loop { + for counter in 2.. { name = format!("{base}_{counter}"); if !used_names.contains(&name) { used_names.insert(name.clone()); return name; } - counter += 1; } + unreachable!("HashSet exhaustion is impossible in practice"); } /// Expand all overloads of a single JS callable into concrete Rust parameter @@ -441,6 +453,83 @@ fn expand_single_overload( sigs } +/// Recursively collect every `TypeRef::TypeParam` name reachable from `ty`. +/// +/// Used to determine which generic parameters a method's signature +/// actually mentions, so codegen can emit the right `` +/// declaration. Order is the appearance order, deduped. +pub fn collect_type_params(ty: &TypeRef, out: &mut Vec) { + match ty { + TypeRef::TypeParam(name) => { + if !out.iter().any(|n| n == name) { + out.push(name.clone()); + } + } + TypeRef::Promise(inner) + | TypeRef::Array(inner) + | TypeRef::Set(inner) + | TypeRef::Iterator(inner) + | TypeRef::AsyncIterator(inner) + | TypeRef::Iterable(inner) + | TypeRef::AsyncIterable(inner) + | TypeRef::Nullable(inner) => collect_type_params(inner, out), + TypeRef::Record(k, v) | TypeRef::Map(k, v) => { + collect_type_params(k, out); + collect_type_params(v, out); + } + TypeRef::Union(members) | TypeRef::Intersection(members) | TypeRef::Tuple(members) => { + for m in members { + collect_type_params(m, out); + } + } + TypeRef::GenericInstantiation(_, args) => { + for a in args { + collect_type_params(a, out); + } + } + TypeRef::Function(sig) => { + for p in &sig.params { + collect_type_params(&p.type_ref, out); + } + collect_type_params(&sig.return_type, out); + } + // Leaves with no nested types — no-op. + TypeRef::Any + | TypeRef::Unknown + | TypeRef::Boolean + | TypeRef::BigInt + | TypeRef::Null + | TypeRef::Number + | TypeRef::Object + | TypeRef::String + | TypeRef::Symbol + | TypeRef::Undefined + | TypeRef::Void + | TypeRef::Int8Array + | TypeRef::Uint8Array + | TypeRef::Uint8ClampedArray + | TypeRef::Int16Array + | TypeRef::Uint16Array + | TypeRef::Int32Array + | TypeRef::Uint32Array + | TypeRef::Float32Array + | TypeRef::Float64Array + | TypeRef::BigInt64Array + | TypeRef::BigUint64Array + | TypeRef::ArrayBuffer + | TypeRef::ArrayBufferView + | TypeRef::DataView + | TypeRef::StringLiteral(_) + | TypeRef::NumberLiteral(_) + | TypeRef::BooleanLiteral(_) + | TypeRef::Named(_) + | TypeRef::Date + | TypeRef::RegExp + | TypeRef::Error + | TypeRef::Unresolved(_) => {} + } +} + /// Recursively flatten a type into its concrete alternatives. /// /// - `Union([A, B])` → flatten(A) ++ flatten(B) @@ -479,6 +568,7 @@ fn flatten_type(ty: &TypeRef, cgctx: Option<&CodegenContext<'_>>, scope: ScopeId // Generic containers are not distributive: `Array` and // `Record` are single parameter shapes, not overloads. + // Leaf types: no expansion _ => vec![ty.clone()], } } @@ -650,6 +740,10 @@ fn type_snake_name(ty: &TypeRef) -> String { TypeRef::Float64Array => "float64_array".to_string(), TypeRef::Array(_) => "array".to_string(), TypeRef::Promise(_) => "promise".to_string(), + TypeRef::Iterator(_) => "iterator".to_string(), + TypeRef::AsyncIterator(_) => "async_iterator".to_string(), + TypeRef::Iterable(_) => "iterable".to_string(), + TypeRef::AsyncIterable(_) => "async_iterable".to_string(), TypeRef::Nullable(inner) => type_snake_name(inner), TypeRef::Function(_) => "function".to_string(), @@ -1119,7 +1213,7 @@ mod tests { assert_eq!(sigs.len(), 2); assert_eq!(sigs[0].rust_name, "count"); assert!(!sigs[0].catch); - assert_eq!(sigs[1].rust_name, "try_count_1"); + assert_eq!(sigs[1].rust_name, "try_count_2"); assert!(sigs[1].catch); } @@ -1144,7 +1238,7 @@ mod tests { &mut used, ); assert_eq!(sigs1[0].rust_name, "foo"); - assert_eq!(sigs2[0].rust_name, "foo_1"); + assert_eq!(sigs2[0].rust_name, "foo_2"); } #[test] diff --git a/src/codegen/typemap.rs b/src/codegen/typemap.rs index 2f5dbde..8aaaaca 100644 --- a/src/codegen/typemap.rs +++ b/src/codegen/typemap.rs @@ -147,6 +147,11 @@ pub struct CodegenContext<'a> { /// Local types that collide with js_sys reserved names — maps original name → renamed name. pub renamed_locals: HashMap, + /// How many type parameters each *locally emitted* type accepts. + /// Used by `GenericInstantiation` codegen to decide whether to keep + /// the generic argument list (`Foo`) or strip it (when the target + /// is a non-generic external like `web_sys::ReadableStream`). + pub local_type_param_counts: HashMap, /// Builtin (root) scope id. pub root_scope: ScopeId, /// Per-file scopes (children of root, contain imports + local types). @@ -165,6 +170,7 @@ impl<'a> CodegenContext<'a> { local_types: HashMap::new(), local_type_ids: HashSet::new(), renamed_locals: HashMap::new(), + local_type_param_counts: HashMap::new(), root_scope: module.builtin_scope, file_scopes: module.file_scopes.clone(), external_uses: RefCell::new(HashMap::new()), @@ -185,6 +191,7 @@ impl<'a> CodegenContext<'a> { local_types: HashMap::new(), local_type_ids: HashSet::new(), renamed_locals: HashMap::new(), + local_type_param_counts: HashMap::new(), root_scope, file_scopes: vec![], external_uses: RefCell::new(HashMap::new()), @@ -312,10 +319,14 @@ impl<'a> CodegenContext<'a> { ir::TypeKind::Class(c) => { self.local_types.insert(c.name.clone(), mctx.clone()); self.local_type_ids.insert(type_id); + self.local_type_param_counts + .insert(c.name.clone(), c.type_params.len()); } ir::TypeKind::Interface(i) => { self.local_types.insert(i.name.clone(), mctx.clone()); self.local_type_ids.insert(type_id); + self.local_type_param_counts + .insert(i.name.clone(), i.type_params.len()); } ir::TypeKind::StringEnum(e) => { self.local_types.insert(e.name.clone(), mctx.clone()); @@ -325,9 +336,12 @@ impl<'a> CodegenContext<'a> { self.local_types.insert(e.name.clone(), mctx.clone()); self.local_type_ids.insert(type_id); } - ir::TypeKind::TypeAlias(_) => { - // Type aliases are resolved through the scope during codegen. - // No special collection needed. + ir::TypeKind::TypeAlias(a) => { + // Type aliases are resolved through the scope during codegen, + // but record their arity so `GenericInstantiation` codegen + // can preserve generic args on alias references. + self.local_type_param_counts + .insert(a.name.clone(), a.type_params.len()); } ir::TypeKind::Namespace(ns) => { // Namespaces don't have an Id-of-themselves to chase here — @@ -478,6 +492,27 @@ pub fn to_syn_type( generic_container(quote! { Promise }, inner, pos, ctx, scope, from_module), borrow, ), + TypeRef::Iterator(inner) => maybe_ref( + generic_container(quote! { Iterator }, inner, pos, ctx, scope, from_module), + borrow, + ), + TypeRef::AsyncIterator(inner) => maybe_ref( + generic_container( + quote! { AsyncIterator }, + inner, + pos, + ctx, + scope, + from_module, + ), + borrow, + ), + // Un-hoisted `Iterable` / `AsyncIterable` (e.g. nested inside a + // union) erase to `JsValue` — codegen has no way to express the + // `[Symbol.iterator]` protocol without a synthesized wrapper. + // The `parse::members` synthesis pass rewrites top-level + // occurrences to `Named(...)` before reaching codegen. + TypeRef::Iterable(_) | TypeRef::AsyncIterable(_) => maybe_ref(quote! { JsValue }, borrow), TypeRef::Array(inner) => maybe_ref( generic_container(quote! { Array }, inner, pos, ctx, scope, from_module), borrow, @@ -591,15 +626,34 @@ pub fn to_syn_type( } maybe_ref(named_type_to_rust(name, ctx, from_module), borrow) } - TypeRef::GenericInstantiation(name, _args) => { - // TODO (Phase 3): preserve generic type arguments once wasm_bindgen - // generic support is wired through. For now, emit just the base type. - if let Some(c) = ctx { - c.warn(format!( - "generic type arguments on `{name}<...>` are not yet emitted, using bare `{name}`" - )); + TypeRef::TypeParam(name) => { + // Generic type parameters lower to a bare Rust identifier; the + // surrounding method/type carries the `` bound. + let ident = make_ident(name); + maybe_ref(quote! { #ident }, borrow) + } + TypeRef::GenericInstantiation(name, args) => { + let base = named_type_to_rust(name, ctx, from_module); + // Only preserve generic arguments when the target type + // actually accepts them. External non-generic types (e.g. + // `web_sys::ReadableStream`, the worker crate's `Context`) + // would emit `Type` and fail to compile, so erase the + // arguments to the bare base type when no arity is known + // or when the recorded arity is zero. + let accepts_generics = ctx + .and_then(|c| c.local_type_param_counts.get(name)) + .copied() + .unwrap_or(0) + > 0; + if !accepts_generics { + return maybe_ref(base, borrow); } - maybe_ref(named_type_to_rust(name, ctx, from_module), borrow) + let inner_pos = pos.to_inner(); + let arg_tokens: Vec = args + .iter() + .map(|a| to_syn_type(a, inner_pos, ctx, scope, from_module)) + .collect(); + maybe_ref(quote! { #base<#(#arg_tokens),*> }, borrow) } // === Special === diff --git a/src/ir.rs b/src/ir.rs index e877156..81139e3 100644 --- a/src/ir.rs +++ b/src/ir.rs @@ -69,6 +69,22 @@ pub enum TypeRef { Record(Box, Box), Map(Box, Box), Set(Box), + /// `Iterator` / `IterableIterator` — already-iterator objects. + /// Maps to `js_sys::Iterator` directly; the inner `T` erases the + /// same way `Promise` does. + Iterator(Box), + /// `AsyncIterator` / `AsyncIterableIterator` — already-iterator + /// objects on the async side. Maps to `js_sys::AsyncIterator`. + AsyncIterator(Box), + /// `Iterable` — an object exposing `[Symbol.iterator](): Iterator`. + /// Distinct from `Iterator` (the iterator object itself). + /// Synthesis hooks in `parse::members` may rewrite top-level + /// occurrences to a hoisted `TypeRef::Named()` wrapper before + /// codegen runs; codegen falls back to erasing remaining nested + /// occurrences to `JsValue`. + Iterable(Box), + /// `AsyncIterable` — analogous to `Iterable` for async. + AsyncIterable(Box), // === Structural Types === Nullable(Box), @@ -87,6 +103,11 @@ pub enum TypeRef { Named(String), /// Generic instantiation: `Named` GenericInstantiation(String, Vec), + /// In-scope generic type parameter (e.g. `T` inside `put(value: T)`). + /// Lowered to a bare Rust identifier in codegen; methods that mention + /// a `TypeParam` carry a `` declaration so wasm-bindgen + /// can monomorphise per call site. + TypeParam(String), // === Special === Date, diff --git a/src/parse/members.rs b/src/parse/members.rs index 03eeaeb..b69adca 100644 --- a/src/parse/members.rs +++ b/src/parse/members.rs @@ -41,6 +41,7 @@ pub(crate) fn convert_formal_params_with_synthesis( params: &FormalParameters<'_>, parent_name: &str, member_name: &str, + scope: &HashSet<&str>, used_type_names: &mut HashSet, docs: &DocComments<'_>, diag: &mut DiagnosticCollector, @@ -69,7 +70,7 @@ pub(crate) fn convert_formal_params_with_synthesis( diag, ) { Some(synth) => synth, - None => convert_ts_type(&ann.type_annotation, diag), + None => convert_ts_type_scoped(&ann.type_annotation, scope, diag), }, None => TypeRef::Any, }; @@ -88,7 +89,7 @@ pub(crate) fn convert_formal_params_with_synthesis( let type_ref = rest .type_annotation .as_ref() - .map(|ann| convert_ts_type(&ann.type_annotation, diag)) + .map(|ann| convert_ts_type_scoped(&ann.type_annotation, scope, diag)) .unwrap_or(TypeRef::Array(Box::new(TypeRef::Any))); result_params.push(Param { name, @@ -209,6 +210,108 @@ fn all_type_literals(types: &[TSType<'_>]) -> bool { !types.is_empty() && types.iter().all(|t| matches!(t, TSType::TSTypeLiteral(_))) } +/// Try to synthesize a wrapper interface for an `Iterable` / +/// `AsyncIterable` return type. +/// +/// The TS protocol — `Iterable` exposes `[Symbol.iterator](): Iterator` +/// — has no direct wasm-bindgen representation, but we can model it as an +/// extern type with a single symbol-keyed method: +/// +/// ```ignore +/// pub type SyncKvStorageListIterable; +/// #[wasm_bindgen(method, js_name = "Symbol.iterator")] +/// pub fn iterator(this: &SyncKvStorageListIterable) -> Iterator<...>; +/// ``` +/// +/// Returns `Some(Named())` when `ty` is a top-level +/// `Iterable`/`AsyncIterable`; `None` otherwise so the caller falls +/// through to the regular `convert_ts_type` path. Nested occurrences +/// (inside unions, arrays, etc.) are not hoisted — they erase to +/// `JsValue` at codegen, matching the existing parameter-synthesis +/// limitation. +pub(crate) fn try_synthesize_iterable_return( + ty: &TypeRef, + parent_name: &str, + member_name: &str, + used_type_names: &mut HashSet, + synth: &mut Vec, +) -> Option { + let (is_async, item_type) = match ty { + TypeRef::Iterable(inner) => (false, (**inner).clone()), + TypeRef::AsyncIterable(inner) => (true, (**inner).clone()), + _ => return None, + }; + + // Type parameters mentioned by the item type bubble up onto the + // synthesized wrapper so it can carry them: an `Iterable<[string, T]>` + // return becomes `SyncKvStorageList` rather than erasing `T`. + let mut tp_names = Vec::new(); + crate::codegen::signatures::collect_type_params(&item_type, &mut tp_names); + let synth_type_params: Vec = tp_names + .into_iter() + .map(|name| TypeParam { + name, + constraint: None, + default: None, + }) + .collect(); + + let synth_name = unique_type_name(parent_name, member_name, used_type_names); + used_type_names.insert(synth_name.clone()); + + // wasm-bindgen's `js_name` syntax for symbol-keyed methods is the + // bracketed `[Symbol.foo]` form (matching the JS computed-property + // syntax), not bare `Symbol.foo`. + let (symbol_name, iter_return) = if is_async { + ( + "[Symbol.asyncIterator]", + TypeRef::AsyncIterator(Box::new(item_type)), + ) + } else { + ("[Symbol.iterator]", TypeRef::Iterator(Box::new(item_type))) + }; + + let iter_method = Member::Method(MethodMember { + name: "iterator".to_string(), + js_name: symbol_name.to_string(), + type_params: Vec::new(), + params: Vec::new(), + return_type: iter_return, + optional: false, + doc: Some(format!( + "Conformance to the JS {} protocol — returns the underlying iterator.", + if is_async { + "async iteration" + } else { + "iteration" + } + )), + throws: None, + }); + + synth.push(InterfaceDecl { + name: synth_name.clone(), + js_name: synth_name.clone(), + type_params: synth_type_params.clone(), + extends: Vec::new(), + members: vec![iter_method], + classification: crate::ir::InterfaceClassification::ClassLike, + }); + + // The return type references the synthesized type with the same + // type-param instantiation, so callers see `SyncKvStorageList` + // (where `T` is in the parent method's scope). + if synth_type_params.is_empty() { + Some(TypeRef::Named(synth_name)) + } else { + let args = synth_type_params + .into_iter() + .map(|tp| TypeRef::TypeParam(tp.name)) + .collect(); + Some(TypeRef::GenericInstantiation(synth_name, args)) + } +} + /// Convert a `TSSignature` (interface body member) to our IR `Member`(s). /// /// `parent` is the surrounding type's Rust name when one is available @@ -340,6 +443,7 @@ fn convert_method_signature( &method.params, p, &js_name, + &scope, used_type_names, docs, diag, @@ -349,12 +453,26 @@ fn convert_method_signature( } None => convert_formal_params(&method.params, diag), }; - let return_type = method + let mut return_type = method .return_type .as_ref() .map(|rt| convert_ts_type_scoped(&rt.type_annotation, &scope, diag)) .unwrap_or(TypeRef::Void); + // Hoist top-level `Iterable` / `AsyncIterable` returns into + // synthesized wrapper interfaces with a `[Symbol.iterator]` method. + if let Some(parent_name) = parent { + if let Some(rewritten) = try_synthesize_iterable_return( + &return_type, + parent_name, + &js_name, + used_type_names, + synth, + ) { + return_type = rewritten; + } + } + match method.kind { TSMethodSignatureKind::Get => vec![Member::Getter(GetterMember { js_name, @@ -420,10 +538,14 @@ fn convert_construct_signature( // name segment for the synthesized type. let params = match parent { Some(p) => { + // Constructors don't have their own type parameters in the JS surface; + // empty scope is correct here. + let scope: HashSet<&str> = HashSet::new(); let (params, more_synth) = convert_formal_params_with_synthesis( &ctor.params, p, "Constructor", + &scope, used_type_names, docs, diag, @@ -480,6 +602,7 @@ fn convert_class_method( &func.params, p, &member_name, + &scope, used_type_names, docs, diag, @@ -489,7 +612,7 @@ fn convert_class_method( } None => convert_formal_params(&func.params, diag), }; - let return_type = func + let mut return_type = func .return_type .as_ref() .map(|rt| convert_ts_type_scoped(&rt.type_annotation, &scope, diag)) @@ -497,6 +620,22 @@ fn convert_class_method( let is_static = method.r#static; + // Same iterable hoisting as `convert_method_signature` — see that + // function for the rationale and the synthesized shape. + if !matches!(method.kind, MethodDefinitionKind::Constructor) { + if let Some(parent_name) = parent { + if let Some(rewritten) = try_synthesize_iterable_return( + &return_type, + parent_name, + &js_name, + used_type_names, + synth, + ) { + return_type = rewritten; + } + } + } + match method.kind { MethodDefinitionKind::Constructor => { vec![Member::Constructor(ConstructorMember { @@ -675,3 +814,79 @@ pub fn property_key_name(key: &PropertyKey<'_>) -> Option { _ => None, } } + +#[cfg(test)] +mod tests { + use super::*; + + fn member_method(member: &Member) -> &MethodMember { + match member { + Member::Method(m) => m, + other => panic!("expected method member, got {other:?}"), + } + } + + #[test] + fn synthesize_iterable_hoists_wrapper_with_symbol_iterator() { + let mut used = HashSet::new(); + used.insert("Foo".to_string()); + let mut synth = Vec::new(); + + let item = TypeRef::String; + let ty = TypeRef::Iterable(Box::new(item.clone())); + + let result = try_synthesize_iterable_return(&ty, "Foo", "list", &mut used, &mut synth); + + assert_eq!(result, Some(TypeRef::Named("FooList".to_string()))); + assert_eq!(synth.len(), 1); + let iface = &synth[0]; + assert_eq!(iface.name, "FooList"); + assert_eq!(iface.members.len(), 1); + + let method = member_method(&iface.members[0]); + assert_eq!(method.js_name, "[Symbol.iterator]"); + assert_eq!(method.return_type, TypeRef::Iterator(Box::new(item))); + } + + #[test] + fn synthesize_async_iterable_uses_symbol_async_iterator() { + let mut used = HashSet::new(); + let mut synth = Vec::new(); + let ty = TypeRef::AsyncIterable(Box::new(TypeRef::Number)); + + let result = try_synthesize_iterable_return(&ty, "Stream", "pages", &mut used, &mut synth); + + assert_eq!(result, Some(TypeRef::Named("StreamPages".to_string()))); + let method = member_method(&synth[0].members[0]); + assert_eq!(method.js_name, "[Symbol.asyncIterator]"); + assert_eq!( + method.return_type, + TypeRef::AsyncIterator(Box::new(TypeRef::Number)) + ); + } + + #[test] + fn synthesize_returns_none_for_non_iterable() { + let mut used = HashSet::new(); + let mut synth = Vec::new(); + let ty = TypeRef::Iterator(Box::new(TypeRef::Number)); + + let result = try_synthesize_iterable_return(&ty, "Foo", "iter", &mut used, &mut synth); + + assert!(result.is_none()); + assert!(synth.is_empty()); + } + + #[test] + fn synthesize_dedupes_against_used_names() { + let mut used = HashSet::new(); + used.insert("FooList".to_string()); + let mut synth = Vec::new(); + + let ty = TypeRef::Iterable(Box::new(TypeRef::Any)); + let result = try_synthesize_iterable_return(&ty, "Foo", "list", &mut used, &mut synth); + + assert_eq!(result, Some(TypeRef::Named("FooList2".to_string()))); + assert_eq!(synth[0].name, "FooList2"); + } +} diff --git a/src/parse/types.rs b/src/parse/types.rs index 7127626..046b14b 100644 --- a/src/parse/types.rs +++ b/src/parse/types.rs @@ -176,9 +176,13 @@ fn convert_type_reference_scoped( ) -> TypeRef { let name = type_name_to_string(&type_ref.type_name); - // If the name is an in-scope type parameter, erase to Any + // In-scope generic type parameter — preserve so codegen can emit a + // generic Rust method (`fn put(...)`) per the + // wasm-bindgen `JsGeneric` pattern used by `js_sys::Iterator`, + // `Array`, etc. Erasing to `Any` would lose the relationship + // between the parameter and the return type. if scope.contains(name.as_str()) { - return TypeRef::Any; + return TypeRef::TypeParam(name); } // Collect generic type arguments if present (field is `type_arguments` in oxc 0.118) @@ -199,6 +203,28 @@ fn convert_type_reference_scoped( let inner = type_args.into_iter().next().unwrap_or(TypeRef::Any); TypeRef::Promise(Box::new(inner)) } + // `Iterator` and `IterableIterator` are already iterator + // objects, so they map straight to `js_sys::Iterator`. + "Iterator" | "IterableIterator" => { + let inner = type_args.into_iter().next().unwrap_or(TypeRef::Any); + TypeRef::Iterator(Box::new(inner)) + } + "AsyncIterator" | "AsyncIterableIterator" => { + let inner = type_args.into_iter().next().unwrap_or(TypeRef::Any); + TypeRef::AsyncIterator(Box::new(inner)) + } + // `Iterable` is the protocol — an object exposing + // `[Symbol.iterator]()`. Held as a distinct IR variant so the + // synthesis pass in `parse::members` can hoist a wrapper + // interface for top-level occurrences in return positions. + "Iterable" => { + let inner = type_args.into_iter().next().unwrap_or(TypeRef::Any); + TypeRef::Iterable(Box::new(inner)) + } + "AsyncIterable" => { + let inner = type_args.into_iter().next().unwrap_or(TypeRef::Any); + TypeRef::AsyncIterable(Box::new(inner)) + } "Array" | "ReadonlyArray" => { let inner = type_args.into_iter().next().unwrap_or(TypeRef::Any); TypeRef::Array(Box::new(inner)) diff --git a/tests/fixtures/iterables.d.ts b/tests/fixtures/iterables.d.ts new file mode 100644 index 0000000..685e162 --- /dev/null +++ b/tests/fixtures/iterables.d.ts @@ -0,0 +1,27 @@ +// Iterables / iterators — covers the synthesis path for `Iterable` / +// `AsyncIterable` returns and the type-parameter propagation through +// `` for methods that mention bare TS generics. + +interface KeyValueStore { + // Generic — synthesized wrapper carries `` and the inner iterator + // sees the same `T`. + list(): Iterable<[string, T]>; + // Same for async. + listAsync(): AsyncIterable<[string, T]>; + // Direct iterator returns — no synthesis, map to `js_sys::Iterator`. + // Generic `T` propagates to the iterator's element type. + entries(): IterableIterator<[string, T]>; + keys(): Iterator; + // Direct async iterator return — generic. + pages(): AsyncIterator; + asyncEntries(): AsyncIterableIterator<[string, T]>; + // Bare generic in argument + return — exercises the + // `` declaration on a non-iterable method. + put(key: string, value: T): void; + get(key: string): T | undefined; +} + +declare class Cursor { + // Class-method synthesis path with a generic parameter. + walk(): Iterable; +} diff --git a/tests/snapshots/basic.rs b/tests/snapshots/basic.rs index 8242f8a..59446fd 100644 --- a/tests/snapshots/basic.rs +++ b/tests/snapshots/basic.rs @@ -1,3 +1,5 @@ +// Generated by ts-gen. Do not edit. + #[allow(dead_code)] use ::web_sys::Blob; #[allow(dead_code)] @@ -159,7 +161,7 @@ extern "C" { #[wasm_bindgen(method, catch)] pub async fn text(this: &Body) -> Result; #[wasm_bindgen(method, catch)] - pub async fn json(this: &Body) -> Result; + pub async fn json(this: &Body) -> Result; #[wasm_bindgen(method, catch)] pub async fn blob(this: &Body) -> Result; #[wasm_bindgen(method, catch, js_name = "formData")] diff --git a/tests/snapshots/cloudflare-worker.rs b/tests/snapshots/cloudflare-worker.rs index 4286c87..a1be983 100644 --- a/tests/snapshots/cloudflare-worker.rs +++ b/tests/snapshots/cloudflare-worker.rs @@ -1,3 +1,5 @@ +// Generated by ts-gen. Do not edit. + #[allow(dead_code)] use ::web_sys::AbortSignal; #[allow(dead_code)] @@ -14,8 +16,6 @@ use js_sys::*; use wasm_bindgen::prelude::*; #[allow(dead_code)] use JsValue as E; -#[allow(dead_code)] -use JsValue as IterableIterator; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] @@ -52,17 +52,19 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "set")] pub fn try_set(this: &Headers, name: &str, value: &str) -> Result<(), JsValue>; #[wasm_bindgen(method)] - pub fn entries(this: &Headers) -> IterableIterator; + pub fn entries(this: &Headers) -> Iterator>; #[wasm_bindgen(method, catch, js_name = "entries")] - pub fn try_entries(this: &Headers) -> Result; + pub fn try_entries( + this: &Headers, + ) -> Result>, JsValue>; #[wasm_bindgen(method)] - pub fn keys(this: &Headers) -> IterableIterator; + pub fn keys(this: &Headers) -> Iterator; #[wasm_bindgen(method, catch, js_name = "keys")] - pub fn try_keys(this: &Headers) -> Result; + pub fn try_keys(this: &Headers) -> Result, JsValue>; #[wasm_bindgen(method)] - pub fn values(this: &Headers) -> IterableIterator; + pub fn values(this: &Headers) -> Iterator; #[wasm_bindgen(method, catch, js_name = "values")] - pub fn try_values(this: &Headers) -> Result; + pub fn try_values(this: &Headers) -> Result, JsValue>; } #[allow(dead_code)] pub type HeadersInit = JsValue; @@ -105,7 +107,7 @@ extern "C" { #[wasm_bindgen(method, catch)] pub async fn text(this: &Request) -> Result; #[wasm_bindgen(method, catch)] - pub async fn json(this: &Request) -> Result; + pub async fn json(this: &Request) -> Result; #[wasm_bindgen(method, catch)] pub async fn blob(this: &Request) -> Result; #[wasm_bindgen(method, catch, js_name = "formData")] @@ -316,7 +318,7 @@ extern "C" { #[wasm_bindgen(method, catch)] pub async fn text(this: &Response) -> Result; #[wasm_bindgen(method, catch, js_name = "json")] - pub async fn json_1(this: &Response) -> Result; + pub async fn json_2(this: &Response) -> Result; #[wasm_bindgen(method, catch)] pub async fn blob(this: &Response) -> Result; #[wasm_bindgen(method, catch, js_name = "formData")] @@ -409,17 +411,17 @@ extern "C" { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type ExportedHandler; + pub type ExportedHandler; #[wasm_bindgen(method, catch)] - pub async fn fetch( - this: &ExportedHandler, + pub async fn fetch( + this: &ExportedHandler, request: &Request, env: &E, ctx: &ExecutionContext, ) -> Result; #[wasm_bindgen(method, catch)] - pub async fn scheduled( - this: &ExportedHandler, + pub async fn scheduled( + this: &ExportedHandler, controller: &ScheduledController, env: &E, ctx: &ExecutionContext, diff --git a/tests/snapshots/coverage.rs b/tests/snapshots/coverage.rs index b328132..0f0111c 100644 --- a/tests/snapshots/coverage.rs +++ b/tests/snapshots/coverage.rs @@ -1,3 +1,5 @@ +// Generated by ts-gen. Do not edit. + #[allow(dead_code)] use ::web_sys::AbortSignal; #[allow(dead_code)] diff --git a/tests/snapshots/es-module-lexer.rs b/tests/snapshots/es-module-lexer.rs index 840e636..46fa4ae 100644 --- a/tests/snapshots/es-module-lexer.rs +++ b/tests/snapshots/es-module-lexer.rs @@ -1,3 +1,5 @@ +// Generated by ts-gen. Do not edit. + #[allow(unused_imports)] use js_sys::*; #[allow(unused_imports)] diff --git a/tests/snapshots/iterables.rs b/tests/snapshots/iterables.rs new file mode 100644 index 0000000..16d5e77 --- /dev/null +++ b/tests/snapshots/iterables.rs @@ -0,0 +1,123 @@ +// Generated by ts-gen. Do not edit. + +#[allow(unused_imports)] +use js_sys::*; +#[allow(unused_imports)] +use wasm_bindgen::prelude::*; +#[wasm_bindgen] +extern "C" { + # [wasm_bindgen (extends = Object)] + #[derive(Debug, Clone, PartialEq, Eq)] + pub type KeyValueStore; + #[wasm_bindgen(method)] + pub fn list(this: &KeyValueStore) -> KeyValueStoreList; + #[wasm_bindgen(method, catch, js_name = "list")] + pub fn try_list( + this: &KeyValueStore, + ) -> Result, JsValue>; + #[wasm_bindgen(method, js_name = "listAsync")] + pub fn list_async( + this: &KeyValueStore, + ) -> KeyValueStoreListAsync; + #[wasm_bindgen(method, catch, js_name = "listAsync")] + pub fn try_list_async( + this: &KeyValueStore, + ) -> Result, JsValue>; + #[wasm_bindgen(method)] + pub fn entries( + this: &KeyValueStore, + ) -> Iterator>; + #[wasm_bindgen(method, catch, js_name = "entries")] + pub fn try_entries( + this: &KeyValueStore, + ) -> Result>, JsValue>; + #[wasm_bindgen(method)] + pub fn keys(this: &KeyValueStore) -> Iterator; + #[wasm_bindgen(method, catch, js_name = "keys")] + pub fn try_keys(this: &KeyValueStore) -> Result, JsValue>; + #[wasm_bindgen(method)] + pub fn pages(this: &KeyValueStore) -> AsyncIterator; + #[wasm_bindgen(method, catch, js_name = "pages")] + pub fn try_pages( + this: &KeyValueStore, + ) -> Result, JsValue>; + #[wasm_bindgen(method, js_name = "asyncEntries")] + pub fn async_entries( + this: &KeyValueStore, + ) -> AsyncIterator>; + #[wasm_bindgen(method, catch, js_name = "asyncEntries")] + pub fn try_async_entries( + this: &KeyValueStore, + ) -> Result>, JsValue>; + #[wasm_bindgen(method)] + pub fn put(this: &KeyValueStore, key: &str, value: &T); + #[wasm_bindgen(method, catch, js_name = "put")] + pub fn try_put( + this: &KeyValueStore, + key: &str, + value: &T, + ) -> Result<(), JsValue>; + #[wasm_bindgen(method)] + pub fn get(this: &KeyValueStore, key: &str) -> Option; + #[wasm_bindgen(method, catch, js_name = "get")] + pub fn try_get( + this: &KeyValueStore, + key: &str, + ) -> Result, JsValue>; +} +#[wasm_bindgen] +extern "C" { + # [wasm_bindgen (extends = Object)] + #[derive(Debug, Clone, PartialEq, Eq)] + pub type KeyValueStoreList; + #[doc = " Conformance to the JS iteration protocol — returns the underlying iterator."] + #[wasm_bindgen(method, js_name = "[Symbol.iterator]")] + pub fn iterator( + this: &KeyValueStoreList, + ) -> Iterator>; + #[doc = " Conformance to the JS iteration protocol — returns the underlying iterator."] + #[wasm_bindgen(method, catch, js_name = "[Symbol.iterator]")] + pub fn try_iterator( + this: &KeyValueStoreList, + ) -> Result>, JsValue>; +} +#[wasm_bindgen] +extern "C" { + # [wasm_bindgen (extends = Object)] + #[derive(Debug, Clone, PartialEq, Eq)] + pub type KeyValueStoreListAsync; + #[doc = " Conformance to the JS async iteration protocol — returns the underlying iterator."] + #[wasm_bindgen(method, js_name = "[Symbol.asyncIterator]")] + pub fn async_iterator( + this: &KeyValueStoreListAsync, + ) -> AsyncIterator>; + #[doc = " Conformance to the JS async iteration protocol — returns the underlying iterator."] + #[wasm_bindgen(method, catch, js_name = "[Symbol.asyncIterator]")] + pub fn try_async_iterator( + this: &KeyValueStoreListAsync, + ) -> Result>, JsValue>; +} +#[wasm_bindgen] +extern "C" { + # [wasm_bindgen (extends = Object)] + #[derive(Debug, Clone, PartialEq, Eq)] + pub type Cursor; + #[wasm_bindgen(method)] + pub fn walk(this: &Cursor) -> CursorWalk; + #[wasm_bindgen(method, catch, js_name = "walk")] + pub fn try_walk(this: &Cursor) -> Result, JsValue>; +} +#[wasm_bindgen] +extern "C" { + # [wasm_bindgen (extends = Object)] + #[derive(Debug, Clone, PartialEq, Eq)] + pub type CursorWalk; + #[doc = " Conformance to the JS iteration protocol — returns the underlying iterator."] + #[wasm_bindgen(method, js_name = "[Symbol.iterator]")] + pub fn iterator(this: &CursorWalk) -> Iterator; + #[doc = " Conformance to the JS iteration protocol — returns the underlying iterator."] + #[wasm_bindgen(method, catch, js_name = "[Symbol.iterator]")] + pub fn try_iterator( + this: &CursorWalk, + ) -> Result, JsValue>; +} diff --git a/tests/snapshots/node-console.rs b/tests/snapshots/node-console.rs index 5d8d024..095c79c 100644 --- a/tests/snapshots/node-console.rs +++ b/tests/snapshots/node-console.rs @@ -1,3 +1,5 @@ +// Generated by ts-gen. Do not edit. + #[allow(unused_imports)] use js_sys::*; #[allow(unused_imports)] diff --git a/tests/snapshots/phase1.rs b/tests/snapshots/phase1.rs index c98850e..53962fe 100644 --- a/tests/snapshots/phase1.rs +++ b/tests/snapshots/phase1.rs @@ -1,3 +1,5 @@ +// Generated by ts-gen. Do not edit. + #[allow(unused_imports)] use js_sys::*; #[allow(unused_imports)] @@ -99,9 +101,9 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "count")] pub fn try_count(this: &Counter) -> Result; #[wasm_bindgen(method, js_name = "try_count")] - pub fn try_count_1(this: &Counter) -> f64; + pub fn try_count_2(this: &Counter) -> f64; #[wasm_bindgen(method, catch, js_name = "try_count")] - pub fn try_try_count_1(this: &Counter) -> Result; + pub fn try_try_count_2(this: &Counter) -> Result; #[wasm_bindgen(method)] pub fn reset(this: &Counter); #[wasm_bindgen(method, catch, js_name = "reset")] diff --git a/tests/snapshots/phase2.rs b/tests/snapshots/phase2.rs index 34f0944..82dc7c4 100644 --- a/tests/snapshots/phase2.rs +++ b/tests/snapshots/phase2.rs @@ -1,3 +1,5 @@ +// Generated by ts-gen. Do not edit. + #[allow(dead_code)] use ::web_sys::Blob; #[allow(dead_code)] diff --git a/tests/snapshots/web-sys-extend.rs b/tests/snapshots/web-sys-extend.rs index c82ce06..def36ea 100644 --- a/tests/snapshots/web-sys-extend.rs +++ b/tests/snapshots/web-sys-extend.rs @@ -1,3 +1,5 @@ +// Generated by ts-gen. Do not edit. + #[allow(dead_code)] use ::web_sys::Request; #[allow(dead_code)] @@ -66,7 +68,7 @@ extern "C" { pub type ResponseExt; #[doc = " Parse the body as JSON and return a typed result."] #[wasm_bindgen(method, catch, js_name = "jsonExt")] - pub async fn json_ext(this: &ResponseExt) -> Result; + pub async fn json_ext(this: &ResponseExt) -> Result; #[doc = " Get the response body as a Uint8Array."] #[wasm_bindgen(method, catch)] pub async fn bytes(this: &ResponseExt) -> Result; diff --git a/tests/snapshots/workers-types.rs b/tests/snapshots/workers-types.rs index 6c2b8ca..05664a4 100644 --- a/tests/snapshots/workers-types.rs +++ b/tests/snapshots/workers-types.rs @@ -1,3 +1,5 @@ +// Generated by ts-gen. Do not edit. + #[allow(unused_imports)] use js_sys::*; #[allow(unused_imports)] @@ -5,12 +7,10 @@ use wasm_bindgen::prelude::*; #[allow(dead_code)] use JsValue as Args; #[allow(dead_code)] -use JsValue as AsyncIterable; -#[allow(dead_code)] -use JsValue as AsyncIterableIterator; -#[allow(dead_code)] use JsValue as Cf; #[allow(dead_code)] +use JsValue as CfHostMetadata; +#[allow(dead_code)] use JsValue as D1Result; #[allow(dead_code)] use JsValue as Data; @@ -47,21 +47,15 @@ use JsValue as HostMetadata; #[allow(dead_code)] use JsValue as I; #[allow(dead_code)] -use JsValue as InputOptions; -#[allow(dead_code)] -use JsValue as Iterable; -#[allow(dead_code)] -use JsValue as IterableIterator; +use JsValue as IncomingRequestCfProperties; #[allow(dead_code)] use JsValue as Key; #[allow(dead_code)] use JsValue as Metadata; #[allow(dead_code)] -use JsValue as Name; -#[allow(dead_code)] use JsValue as O; #[allow(dead_code)] -use JsValue as Options; +use JsValue as P; #[allow(dead_code)] use JsValue as PARAMS; #[allow(dead_code)] @@ -71,6 +65,8 @@ use JsValue as PluginArgs; #[allow(dead_code)] use JsValue as Props; #[allow(dead_code)] +use JsValue as QueueHandlerMessage; +#[allow(dead_code)] use JsValue as R; #[allow(dead_code)] use JsValue as Readonly; @@ -85,8 +81,6 @@ use JsValue as TailEvent; #[allow(dead_code)] use JsValue as TailEventHandler; #[allow(dead_code)] -use JsValue as This; -#[allow(dead_code)] use JsValue as Type; #[allow(dead_code)] use JsValue as Value; @@ -1075,26 +1069,26 @@ extern "C" { ms_delay: f64, ) -> Result; #[wasm_bindgen(method, variadic, js_name = "setTimeout")] - pub fn set_timeout_with_function_and_args( + pub fn set_timeout_with_function_and_args( this: &ServiceWorkerGlobalScope, callback: &Function Undefined>, args: &[JsValue], ) -> f64; #[wasm_bindgen(method, variadic, catch, js_name = "setTimeout")] - pub fn try_set_timeout_with_function_and_args( + pub fn try_set_timeout_with_function_and_args( this: &ServiceWorkerGlobalScope, callback: &Function Undefined>, args: &[JsValue], ) -> Result; #[wasm_bindgen(method, variadic, js_name = "setTimeout")] - pub fn set_timeout_with_function_and_ms_delay_and_args( + pub fn set_timeout_with_function_and_ms_delay_and_args( this: &ServiceWorkerGlobalScope, callback: &Function Undefined>, ms_delay: f64, args: &[JsValue], ) -> f64; #[wasm_bindgen(method, variadic, catch, js_name = "setTimeout")] - pub fn try_set_timeout_with_function_and_ms_delay_and_args( + pub fn try_set_timeout_with_function_and_ms_delay_and_args( this: &ServiceWorkerGlobalScope, callback: &Function Undefined>, ms_delay: f64, @@ -1137,26 +1131,26 @@ extern "C" { ms_delay: f64, ) -> Result; #[wasm_bindgen(method, variadic, js_name = "setInterval")] - pub fn set_interval_with_function_and_args( + pub fn set_interval_with_function_and_args( this: &ServiceWorkerGlobalScope, callback: &Function Undefined>, args: &[JsValue], ) -> f64; #[wasm_bindgen(method, variadic, catch, js_name = "setInterval")] - pub fn try_set_interval_with_function_and_args( + pub fn try_set_interval_with_function_and_args( this: &ServiceWorkerGlobalScope, callback: &Function Undefined>, args: &[JsValue], ) -> Result; #[wasm_bindgen(method, variadic, js_name = "setInterval")] - pub fn set_interval_with_function_and_ms_delay_and_args( + pub fn set_interval_with_function_and_ms_delay_and_args( this: &ServiceWorkerGlobalScope, callback: &Function Undefined>, ms_delay: f64, args: &[JsValue], ) -> f64; #[wasm_bindgen(method, variadic, catch, js_name = "setInterval")] - pub fn try_set_interval_with_function_and_ms_delay_and_args( + pub fn try_set_interval_with_function_and_ms_delay_and_args( this: &ServiceWorkerGlobalScope, callback: &Function Undefined>, ms_delay: f64, @@ -1184,24 +1178,27 @@ extern "C" { task: &Function, ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "structuredClone")] - pub fn structured_clone(this: &ServiceWorkerGlobalScope, value: &T) -> JsValue; + pub fn structured_clone( + this: &ServiceWorkerGlobalScope, + value: &T, + ) -> T; #[wasm_bindgen(method, catch, js_name = "structuredClone")] - pub fn try_structured_clone( + pub fn try_structured_clone( this: &ServiceWorkerGlobalScope, value: &T, - ) -> Result; + ) -> Result; #[wasm_bindgen(method, js_name = "structuredClone")] - pub fn structured_clone_with_options( + pub fn structured_clone_with_options( this: &ServiceWorkerGlobalScope, value: &T, options: &StructuredSerializeOptions, - ) -> JsValue; + ) -> T; #[wasm_bindgen(method, catch, js_name = "structuredClone")] - pub fn try_structured_clone_with_options( + pub fn try_structured_clone_with_options( this: &ServiceWorkerGlobalScope, value: &T, options: &StructuredSerializeOptions, - ) -> Result; + ) -> Result; #[wasm_bindgen(method, js_name = "reportError")] pub fn report_error(this: &ServiceWorkerGlobalScope, error: &JsValue); #[wasm_bindgen(method, catch, js_name = "reportError")] @@ -1212,7 +1209,7 @@ extern "C" { #[wasm_bindgen(method, catch)] pub async fn fetch( this: &ServiceWorkerGlobalScope, - input: &Request, + input: &Request, ) -> Result; #[wasm_bindgen(method, catch, js_name = "fetch")] pub async fn fetch_with_str( @@ -1227,20 +1224,20 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "fetch")] pub async fn fetch_with_js_value_and_init( this: &ServiceWorkerGlobalScope, - input: &Request, - init: &RequestInit, + input: &Request, + init: &RequestInit, ) -> Result; #[wasm_bindgen(method, catch, js_name = "fetch")] pub async fn fetch_with_str_and_init( this: &ServiceWorkerGlobalScope, input: &str, - init: &RequestInit, + init: &RequestInit, ) -> Result; #[wasm_bindgen(method, catch, js_name = "fetch")] pub async fn fetch_with_url_and_init( this: &ServiceWorkerGlobalScope, input: &URL, - init: &RequestInit, + init: &RequestInit, ) -> Result; #[wasm_bindgen(method, getter)] pub fn self_(this: &ServiceWorkerGlobalScope) -> ServiceWorkerGlobalScope; @@ -1441,9 +1438,9 @@ extern "C" { #[wasm_bindgen(method, setter)] pub fn set_navigator(this: &ServiceWorkerGlobalScope, val: &Navigator); #[wasm_bindgen(method, getter, js_name = "Navigator")] - pub fn navigator_1(this: &ServiceWorkerGlobalScope) -> JsValue; + pub fn navigator_2(this: &ServiceWorkerGlobalScope) -> JsValue; #[wasm_bindgen(method, setter, js_name = "Navigator")] - pub fn set_navigator_1(this: &ServiceWorkerGlobalScope, val: &JsValue); + pub fn set_navigator_2(this: &ServiceWorkerGlobalScope, val: &JsValue); #[wasm_bindgen(method, getter, js_name = "URL")] pub fn url(this: &ServiceWorkerGlobalScope) -> JsValue; #[wasm_bindgen(method, setter, js_name = "URL")] @@ -1469,9 +1466,9 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "FormData")] pub fn set_form_data(this: &ServiceWorkerGlobalScope, val: &JsValue); #[wasm_bindgen(method, getter, js_name = "Crypto")] - pub fn crypto_1(this: &ServiceWorkerGlobalScope) -> JsValue; + pub fn crypto_2(this: &ServiceWorkerGlobalScope) -> JsValue; #[wasm_bindgen(method, setter, js_name = "Crypto")] - pub fn set_crypto_1(this: &ServiceWorkerGlobalScope, val: &JsValue); + pub fn set_crypto_2(this: &ServiceWorkerGlobalScope, val: &JsValue); #[wasm_bindgen(method, getter, js_name = "SubtleCrypto")] pub fn subtle_crypto(this: &ServiceWorkerGlobalScope) -> JsValue; #[wasm_bindgen(method, setter, js_name = "SubtleCrypto")] @@ -1504,14 +1501,14 @@ extern "C" { #[wasm_bindgen] extern "C" { #[wasm_bindgen(js_name = "addEventListener")] - pub fn add_event_listener(r#type: &Type, handler: &EventListenerOrEventListenerObject); + pub fn add_event_listener(r#type: &Type, handler: &EventListenerOrEventListenerObject); } #[wasm_bindgen] extern "C" { #[wasm_bindgen(catch, js_name = "addEventListener")] pub fn try_add_event_listener( r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, ) -> Result<(), JsValue>; } #[wasm_bindgen] @@ -1519,7 +1516,7 @@ extern "C" { #[wasm_bindgen(js_name = "addEventListener")] pub fn add_event_listener_with_event_target_add_event_listener_options( r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: &EventTargetAddEventListenerOptions, ); } @@ -1528,7 +1525,7 @@ extern "C" { #[wasm_bindgen(catch, js_name = "addEventListener")] pub fn try_add_event_listener_with_event_target_add_event_listener_options( r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: &EventTargetAddEventListenerOptions, ) -> Result<(), JsValue>; } @@ -1537,7 +1534,7 @@ extern "C" { #[wasm_bindgen(js_name = "addEventListener")] pub fn add_event_listener_with_bool( r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: bool, ); } @@ -1546,21 +1543,24 @@ extern "C" { #[wasm_bindgen(catch, js_name = "addEventListener")] pub fn try_add_event_listener_with_bool( r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: bool, ) -> Result<(), JsValue>; } #[wasm_bindgen] extern "C" { #[wasm_bindgen(js_name = "removeEventListener")] - pub fn remove_event_listener(r#type: &Type, handler: &EventListenerOrEventListenerObject); + pub fn remove_event_listener( + r#type: &Type, + handler: &EventListenerOrEventListenerObject, + ); } #[wasm_bindgen] extern "C" { #[wasm_bindgen(catch, js_name = "removeEventListener")] pub fn try_remove_event_listener( r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, ) -> Result<(), JsValue>; } #[wasm_bindgen] @@ -1568,7 +1568,7 @@ extern "C" { #[wasm_bindgen(js_name = "removeEventListener")] pub fn remove_event_listener_with_event_target_event_listener_options( r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: &EventTargetEventListenerOptions, ); } @@ -1577,7 +1577,7 @@ extern "C" { #[wasm_bindgen(catch, js_name = "removeEventListener")] pub fn try_remove_event_listener_with_event_target_event_listener_options( r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: &EventTargetEventListenerOptions, ) -> Result<(), JsValue>; } @@ -1586,7 +1586,7 @@ extern "C" { #[wasm_bindgen(js_name = "removeEventListener")] pub fn remove_event_listener_with_bool( r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: bool, ); } @@ -1595,7 +1595,7 @@ extern "C" { #[wasm_bindgen(catch, js_name = "removeEventListener")] pub fn try_remove_event_listener_with_bool( r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: bool, ) -> Result<(), JsValue>; } @@ -1748,20 +1748,17 @@ extern "C" { #[wasm_bindgen] extern "C" { #[wasm_bindgen(js_name = "structuredClone")] - pub fn structured_clone(value: &T) -> JsValue; + pub fn structured_clone(value: &T) -> T; } #[wasm_bindgen] extern "C" { #[wasm_bindgen(catch, js_name = "structuredClone")] - pub fn try_structured_clone(value: &T) -> Result; + pub fn try_structured_clone(value: &T) -> Result; } #[wasm_bindgen] extern "C" { #[wasm_bindgen(js_name = "structuredClone")] - pub fn structured_clone_with_options( - value: &T, - options: &StructuredSerializeOptions, - ) -> JsValue; + pub fn structured_clone_with_options(value: &T, options: &StructuredSerializeOptions) -> T; } #[wasm_bindgen] extern "C" { @@ -1769,7 +1766,7 @@ extern "C" { pub fn try_structured_clone_with_options( value: &T, options: &StructuredSerializeOptions, - ) -> Result; + ) -> Result; } #[wasm_bindgen] extern "C" { @@ -1784,7 +1781,7 @@ extern "C" { #[wasm_bindgen] extern "C" { #[wasm_bindgen(catch)] - pub async fn fetch(input: &Request) -> Result; + pub async fn fetch(input: &Request) -> Result; } #[wasm_bindgen] extern "C" { @@ -1800,8 +1797,8 @@ extern "C" { extern "C" { #[wasm_bindgen(catch, js_name = "fetch")] pub async fn fetch_with_js_value_and_init( - input: &Request, - init: &RequestInit, + input: &Request, + init: &RequestInit, ) -> Result; } #[wasm_bindgen] @@ -1809,7 +1806,7 @@ extern "C" { #[wasm_bindgen(catch, js_name = "fetch")] pub async fn fetch_with_str_and_init( input: &str, - init: &RequestInit, + init: &RequestInit, ) -> Result; } #[wasm_bindgen] @@ -1817,7 +1814,7 @@ extern "C" { #[wasm_bindgen(catch, js_name = "fetch")] pub async fn fetch_with_url_and_init( input: &URL, - init: &RequestInit, + init: &RequestInit, ) -> Result; } #[wasm_bindgen] @@ -1883,77 +1880,115 @@ extern "C" { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type ExecutionContext; + pub type ExecutionContext; #[wasm_bindgen(method, js_name = "waitUntil")] - pub fn wait_until(this: &ExecutionContext, promise: &Promise); + pub fn wait_until( + this: &ExecutionContext, + promise: &Promise, + ); #[wasm_bindgen(method, catch, js_name = "waitUntil")] - pub fn try_wait_until(this: &ExecutionContext, promise: &Promise) -> Result<(), JsValue>; + pub fn try_wait_until( + this: &ExecutionContext, + promise: &Promise, + ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "passThroughOnException")] - pub fn pass_through_on_exception(this: &ExecutionContext); + pub fn pass_through_on_exception( + this: &ExecutionContext, + ); #[wasm_bindgen(method, catch, js_name = "passThroughOnException")] - pub fn try_pass_through_on_exception(this: &ExecutionContext) -> Result<(), JsValue>; + pub fn try_pass_through_on_exception( + this: &ExecutionContext, + ) -> Result<(), JsValue>; #[wasm_bindgen(method, getter)] pub fn exports(this: &ExecutionContext) -> Exports; #[wasm_bindgen(method, getter)] pub fn props(this: &ExecutionContext) -> Props; } #[allow(dead_code)] -pub type ExportedHandlerFetchHandler = Function JsValue>; +pub type ExportedHandlerFetchHandler = Function< + fn( + Request>, + Env, + ExecutionContext, + ) -> JsValue, +>; #[allow(dead_code)] -pub type ExportedHandlerTailHandler = - Function, Env, ExecutionContext) -> JsOption>>; +pub type ExportedHandlerTailHandler = + Function, Env, ExecutionContext) -> JsOption>>; #[allow(dead_code)] -pub type ExportedHandlerTraceHandler = - Function, Env, ExecutionContext) -> JsOption>>; +pub type ExportedHandlerTraceHandler = + Function, Env, ExecutionContext) -> JsOption>>; #[allow(dead_code)] -pub type ExportedHandlerTailStreamHandler = - Function JsValue>; +pub type ExportedHandlerTailStreamHandler = + Function) -> JsValue>; #[allow(dead_code)] -pub type ExportedHandlerScheduledHandler = - Function JsOption>>; +pub type ExportedHandlerScheduledHandler = + Function) -> JsOption>>; #[allow(dead_code)] -pub type ExportedHandlerQueueHandler = - Function JsOption>>; +pub type ExportedHandlerQueueHandler = Function< + fn(MessageBatch, Env, ExecutionContext) -> JsOption>, +>; #[allow(dead_code)] -pub type ExportedHandlerTestHandler = - Function JsOption>>; +pub type ExportedHandlerTestHandler = + Function) -> JsOption>>; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type ExportedHandler; + pub type ExportedHandler< + Env: ::wasm_bindgen::JsGeneric, + QueueHandlerMessage: ::wasm_bindgen::JsGeneric, + CfHostMetadata: ::wasm_bindgen::JsGeneric, + Props: ::wasm_bindgen::JsGeneric, + >; #[wasm_bindgen(method, getter)] - pub fn fetch(this: &ExportedHandler) -> Option; + pub fn fetch( + this: &ExportedHandler, + ) -> Option>; #[wasm_bindgen(method, setter)] - pub fn set_fetch(this: &ExportedHandler, val: &ExportedHandlerFetchHandler); + pub fn set_fetch( + this: &ExportedHandler, + val: &ExportedHandlerFetchHandler, + ); #[wasm_bindgen(method, getter)] - pub fn tail(this: &ExportedHandler) -> Option; + pub fn tail(this: &ExportedHandler) -> Option>; #[wasm_bindgen(method, setter)] - pub fn set_tail(this: &ExportedHandler, val: &ExportedHandlerTailHandler); + pub fn set_tail(this: &ExportedHandler, val: &ExportedHandlerTailHandler); #[wasm_bindgen(method, getter)] - pub fn trace(this: &ExportedHandler) -> Option; + pub fn trace(this: &ExportedHandler) -> Option>; #[wasm_bindgen(method, setter)] - pub fn set_trace(this: &ExportedHandler, val: &ExportedHandlerTraceHandler); + pub fn set_trace(this: &ExportedHandler, val: &ExportedHandlerTraceHandler); #[wasm_bindgen(method, getter, js_name = "tailStream")] - pub fn tail_stream(this: &ExportedHandler) -> Option; + pub fn tail_stream( + this: &ExportedHandler, + ) -> Option>; #[wasm_bindgen(method, setter, js_name = "tailStream")] - pub fn set_tail_stream(this: &ExportedHandler, val: &ExportedHandlerTailStreamHandler); + pub fn set_tail_stream( + this: &ExportedHandler, + val: &ExportedHandlerTailStreamHandler, + ); #[wasm_bindgen(method, getter)] - pub fn scheduled(this: &ExportedHandler) -> Option; + pub fn scheduled(this: &ExportedHandler) + -> Option>; #[wasm_bindgen(method, setter)] - pub fn set_scheduled(this: &ExportedHandler, val: &ExportedHandlerScheduledHandler); + pub fn set_scheduled(this: &ExportedHandler, val: &ExportedHandlerScheduledHandler); #[wasm_bindgen(method, getter)] - pub fn test(this: &ExportedHandler) -> Option; + pub fn test(this: &ExportedHandler) -> Option>; #[wasm_bindgen(method, setter)] - pub fn set_test(this: &ExportedHandler, val: &ExportedHandlerTestHandler); + pub fn set_test(this: &ExportedHandler, val: &ExportedHandlerTestHandler); #[wasm_bindgen(method, getter)] - pub fn email(this: &ExportedHandler) -> Option; + pub fn email(this: &ExportedHandler) -> Option>; #[wasm_bindgen(method, setter)] - pub fn set_email(this: &ExportedHandler, val: &EmailExportedHandler); + pub fn set_email(this: &ExportedHandler, val: &EmailExportedHandler); #[wasm_bindgen(method, getter)] - pub fn queue(this: &ExportedHandler) -> Option; + pub fn queue( + this: &ExportedHandler, + ) -> Option>; #[wasm_bindgen(method, setter)] - pub fn set_queue(this: &ExportedHandler, val: &ExportedHandlerQueueHandler); + pub fn set_queue( + this: &ExportedHandler, + val: &ExportedHandlerQueueHandler, + ); } impl ExportedHandler { pub fn new() -> ExportedHandler { @@ -1969,35 +2004,35 @@ pub struct ExportedHandlerBuilder { inner: ExportedHandler, } impl ExportedHandlerBuilder { - pub fn fetch(self, val: &ExportedHandlerFetchHandler) -> Self { + pub fn fetch(self, val: &ExportedHandlerFetchHandler) -> Self { self.inner.set_fetch(val); self } - pub fn tail(self, val: &ExportedHandlerTailHandler) -> Self { + pub fn tail(self, val: &ExportedHandlerTailHandler) -> Self { self.inner.set_tail(val); self } - pub fn trace(self, val: &ExportedHandlerTraceHandler) -> Self { + pub fn trace(self, val: &ExportedHandlerTraceHandler) -> Self { self.inner.set_trace(val); self } - pub fn tail_stream(self, val: &ExportedHandlerTailStreamHandler) -> Self { + pub fn tail_stream(self, val: &ExportedHandlerTailStreamHandler) -> Self { self.inner.set_tail_stream(val); self } - pub fn scheduled(self, val: &ExportedHandlerScheduledHandler) -> Self { + pub fn scheduled(self, val: &ExportedHandlerScheduledHandler) -> Self { self.inner.set_scheduled(val); self } - pub fn test(self, val: &ExportedHandlerTestHandler) -> Self { + pub fn test(self, val: &ExportedHandlerTestHandler) -> Self { self.inner.set_test(val); self } - pub fn email(self, val: &EmailExportedHandler) -> Self { + pub fn email(self, val: &EmailExportedHandler) -> Self { self.inner.set_email(val); self } - pub fn queue(self, val: &ExportedHandlerQueueHandler) -> Self { + pub fn queue(self, val: &ExportedHandlerQueueHandler) -> Self { self.inner.set_queue(val); self } @@ -2047,12 +2082,16 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "sendBeacon")] pub fn try_send_beacon(this: &Navigator, url: &str) -> Result; #[wasm_bindgen(method, js_name = "sendBeacon")] - pub fn send_beacon_with_js_value(this: &Navigator, url: &str, body: &ReadableStream) -> bool; + pub fn send_beacon_with_js_value( + this: &Navigator, + url: &str, + body: &ReadableStream, + ) -> bool; #[wasm_bindgen(method, catch, js_name = "sendBeacon")] pub fn try_send_beacon_with_js_value( this: &Navigator, url: &str, - body: &ReadableStream, + body: &ReadableStream, ) -> Result; #[wasm_bindgen(method, js_name = "sendBeacon")] pub fn send_beacon_with_str(this: &Navigator, url: &str, body: &str) -> bool; @@ -2071,9 +2110,9 @@ extern "C" { body: &ArrayBuffer, ) -> Result; #[wasm_bindgen(method, js_name = "sendBeacon")] - pub fn send_beacon_with_js_value_1(this: &Navigator, url: &str, body: &Object) -> bool; + pub fn send_beacon_with_js_value_2(this: &Navigator, url: &str, body: &Object) -> bool; #[wasm_bindgen(method, catch, js_name = "sendBeacon")] - pub fn try_send_beacon_with_js_value_1( + pub fn try_send_beacon_with_js_value_2( this: &Navigator, url: &str, body: &Object, @@ -2107,20 +2146,20 @@ extern "C" { body: &FormData, ) -> Result; #[wasm_bindgen(method, js_name = "sendBeacon")] - pub fn send_beacon_with_js_value_2(this: &Navigator, url: &str, body: &Iterable) -> bool; + pub fn send_beacon_with_iterable(this: &Navigator, url: &str, body: &JsValue) -> bool; #[wasm_bindgen(method, catch, js_name = "sendBeacon")] - pub fn try_send_beacon_with_js_value_2( + pub fn try_send_beacon_with_iterable( this: &Navigator, url: &str, - body: &Iterable, + body: &JsValue, ) -> Result; #[wasm_bindgen(method, js_name = "sendBeacon")] - pub fn send_beacon_with_js_value_3(this: &Navigator, url: &str, body: &AsyncIterable) -> bool; + pub fn send_beacon_with_async_iterable(this: &Navigator, url: &str, body: &JsValue) -> bool; #[wasm_bindgen(method, catch, js_name = "sendBeacon")] - pub fn try_send_beacon_with_js_value_3( + pub fn try_send_beacon_with_async_iterable( this: &Navigator, url: &str, - body: &AsyncIterable, + body: &JsValue, ) -> Result; #[wasm_bindgen(method, getter, js_name = "userAgent")] pub fn user_agent(this: &Navigator) -> String; @@ -2244,7 +2283,7 @@ extern "C" { ) -> Result>, JsValue>; } #[allow(dead_code)] -pub type DurableObjectStub = JsValue; +pub type DurableObjectStub = JsValue; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] @@ -2265,83 +2304,99 @@ extern "C" { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type DurableObjectNamespace; + pub type DurableObjectNamespace; #[wasm_bindgen(method, js_name = "newUniqueId")] - pub fn new_unique_id(this: &DurableObjectNamespace) -> DurableObjectId; + pub fn new_unique_id( + this: &DurableObjectNamespace, + ) -> DurableObjectId; #[wasm_bindgen(method, catch, js_name = "newUniqueId")] - pub fn try_new_unique_id(this: &DurableObjectNamespace) -> Result; + pub fn try_new_unique_id( + this: &DurableObjectNamespace, + ) -> Result; #[wasm_bindgen(method, js_name = "newUniqueId")] - pub fn new_unique_id_with_options( - this: &DurableObjectNamespace, + pub fn new_unique_id_with_options( + this: &DurableObjectNamespace, options: &DurableObjectNamespaceNewUniqueIdOptions, ) -> DurableObjectId; #[wasm_bindgen(method, catch, js_name = "newUniqueId")] - pub fn try_new_unique_id_with_options( - this: &DurableObjectNamespace, + pub fn try_new_unique_id_with_options( + this: &DurableObjectNamespace, options: &DurableObjectNamespaceNewUniqueIdOptions, ) -> Result; #[wasm_bindgen(method, js_name = "idFromName")] - pub fn id_from_name(this: &DurableObjectNamespace, name: &str) -> DurableObjectId; + pub fn id_from_name( + this: &DurableObjectNamespace, + name: &str, + ) -> DurableObjectId; #[wasm_bindgen(method, catch, js_name = "idFromName")] - pub fn try_id_from_name( - this: &DurableObjectNamespace, + pub fn try_id_from_name( + this: &DurableObjectNamespace, name: &str, ) -> Result; #[wasm_bindgen(method, js_name = "idFromString")] - pub fn id_from_string(this: &DurableObjectNamespace, id: &str) -> DurableObjectId; + pub fn id_from_string( + this: &DurableObjectNamespace, + id: &str, + ) -> DurableObjectId; #[wasm_bindgen(method, catch, js_name = "idFromString")] - pub fn try_id_from_string( - this: &DurableObjectNamespace, + pub fn try_id_from_string( + this: &DurableObjectNamespace, id: &str, ) -> Result; #[wasm_bindgen(method)] - pub fn get(this: &DurableObjectNamespace, id: &DurableObjectId) -> DurableObjectStub; + pub fn get( + this: &DurableObjectNamespace, + id: &DurableObjectId, + ) -> DurableObjectStub; #[wasm_bindgen(method, catch, js_name = "get")] - pub fn try_get( - this: &DurableObjectNamespace, + pub fn try_get( + this: &DurableObjectNamespace, id: &DurableObjectId, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "get")] - pub fn get_with_options( - this: &DurableObjectNamespace, + pub fn get_with_options( + this: &DurableObjectNamespace, id: &DurableObjectId, options: &DurableObjectNamespaceGetDurableObjectOptions, - ) -> DurableObjectStub; + ) -> DurableObjectStub; #[wasm_bindgen(method, catch, js_name = "get")] - pub fn try_get_with_options( - this: &DurableObjectNamespace, + pub fn try_get_with_options( + this: &DurableObjectNamespace, id: &DurableObjectId, options: &DurableObjectNamespaceGetDurableObjectOptions, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "getByName")] - pub fn get_by_name(this: &DurableObjectNamespace, name: &str) -> DurableObjectStub; + pub fn get_by_name( + this: &DurableObjectNamespace, + name: &str, + ) -> DurableObjectStub; #[wasm_bindgen(method, catch, js_name = "getByName")] - pub fn try_get_by_name( - this: &DurableObjectNamespace, + pub fn try_get_by_name( + this: &DurableObjectNamespace, name: &str, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "getByName")] - pub fn get_by_name_with_options( - this: &DurableObjectNamespace, + pub fn get_by_name_with_options( + this: &DurableObjectNamespace, name: &str, options: &DurableObjectNamespaceGetDurableObjectOptions, - ) -> DurableObjectStub; + ) -> DurableObjectStub; #[wasm_bindgen(method, catch, js_name = "getByName")] - pub fn try_get_by_name_with_options( - this: &DurableObjectNamespace, + pub fn try_get_by_name_with_options( + this: &DurableObjectNamespace, name: &str, options: &DurableObjectNamespaceGetDurableObjectOptions, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method)] - pub fn jurisdiction( - this: &DurableObjectNamespace, + pub fn jurisdiction( + this: &DurableObjectNamespace, jurisdiction: &DurableObjectJurisdiction, - ) -> DurableObjectNamespace; + ) -> DurableObjectNamespace; #[wasm_bindgen(method, catch, js_name = "jurisdiction")] - pub fn try_jurisdiction( - this: &DurableObjectNamespace, + pub fn try_jurisdiction( + this: &DurableObjectNamespace, jurisdiction: &DurableObjectJurisdiction, - ) -> Result; + ) -> Result, JsValue>; } #[wasm_bindgen] #[derive(Debug, Clone, Copy, PartialEq, Eq)] @@ -2472,17 +2527,23 @@ impl DurableObjectNamespaceGetDurableObjectOptionsBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type DurableObjectClass; + pub type DurableObjectClass<_T: ::wasm_bindgen::JsGeneric>; } #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type DurableObjectState; + pub type DurableObjectState; #[wasm_bindgen(method, js_name = "waitUntil")] - pub fn wait_until(this: &DurableObjectState, promise: &Promise); + pub fn wait_until( + this: &DurableObjectState, + promise: &Promise, + ); #[wasm_bindgen(method, catch, js_name = "waitUntil")] - pub fn try_wait_until(this: &DurableObjectState, promise: &Promise) -> Result<(), JsValue>; + pub fn try_wait_until( + this: &DurableObjectState, + promise: &Promise, + ) -> Result<(), JsValue>; #[wasm_bindgen(method, getter)] pub fn exports(this: &DurableObjectState) -> Exports; #[wasm_bindgen(method, getter)] @@ -2496,106 +2557,145 @@ extern "C" { #[wasm_bindgen(method, setter)] pub fn set_container(this: &DurableObjectState, val: &Container); #[wasm_bindgen(method, catch, js_name = "blockConcurrencyWhile")] - pub async fn block_concurrency_while( - this: &DurableObjectState, + pub async fn block_concurrency_while< + Props: ::wasm_bindgen::JsGeneric, + T: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObjectState, callback: &Function Promise>, - ) -> Result; + ) -> Result; #[wasm_bindgen(method, js_name = "acceptWebSocket")] - pub fn accept_web_socket(this: &DurableObjectState, ws: &WebSocket); + pub fn accept_web_socket( + this: &DurableObjectState, + ws: &WebSocket, + ); #[wasm_bindgen(method, catch, js_name = "acceptWebSocket")] - pub fn try_accept_web_socket(this: &DurableObjectState, ws: &WebSocket) -> Result<(), JsValue>; + pub fn try_accept_web_socket( + this: &DurableObjectState, + ws: &WebSocket, + ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "acceptWebSocket")] - pub fn accept_web_socket_with_tags( - this: &DurableObjectState, + pub fn accept_web_socket_with_tags( + this: &DurableObjectState, ws: &WebSocket, tags: &Array, ); #[wasm_bindgen(method, catch, js_name = "acceptWebSocket")] - pub fn try_accept_web_socket_with_tags( - this: &DurableObjectState, + pub fn try_accept_web_socket_with_tags( + this: &DurableObjectState, ws: &WebSocket, tags: &Array, ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "getWebSockets")] - pub fn get_web_sockets(this: &DurableObjectState) -> Array; + pub fn get_web_sockets( + this: &DurableObjectState, + ) -> Array; #[wasm_bindgen(method, catch, js_name = "getWebSockets")] - pub fn try_get_web_sockets(this: &DurableObjectState) -> Result, JsValue>; + pub fn try_get_web_sockets( + this: &DurableObjectState, + ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "getWebSockets")] - pub fn get_web_sockets_with_tag(this: &DurableObjectState, tag: &str) -> Array; + pub fn get_web_sockets_with_tag( + this: &DurableObjectState, + tag: &str, + ) -> Array; #[wasm_bindgen(method, catch, js_name = "getWebSockets")] - pub fn try_get_web_sockets_with_tag( - this: &DurableObjectState, + pub fn try_get_web_sockets_with_tag( + this: &DurableObjectState, tag: &str, ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "setWebSocketAutoResponse")] - pub fn set_web_socket_auto_response(this: &DurableObjectState); + pub fn set_web_socket_auto_response( + this: &DurableObjectState, + ); #[wasm_bindgen(method, catch, js_name = "setWebSocketAutoResponse")] - pub fn try_set_web_socket_auto_response(this: &DurableObjectState) -> Result<(), JsValue>; + pub fn try_set_web_socket_auto_response( + this: &DurableObjectState, + ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "setWebSocketAutoResponse")] - pub fn set_web_socket_auto_response_with_maybe_req_resp( - this: &DurableObjectState, + pub fn set_web_socket_auto_response_with_maybe_req_resp( + this: &DurableObjectState, maybe_req_resp: &WebSocketRequestResponsePair, ); #[wasm_bindgen(method, catch, js_name = "setWebSocketAutoResponse")] - pub fn try_set_web_socket_auto_response_with_maybe_req_resp( - this: &DurableObjectState, + pub fn try_set_web_socket_auto_response_with_maybe_req_resp( + this: &DurableObjectState, maybe_req_resp: &WebSocketRequestResponsePair, ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "getWebSocketAutoResponse")] - pub fn get_web_socket_auto_response( - this: &DurableObjectState, + pub fn get_web_socket_auto_response( + this: &DurableObjectState, ) -> Option; #[wasm_bindgen(method, catch, js_name = "getWebSocketAutoResponse")] - pub fn try_get_web_socket_auto_response( - this: &DurableObjectState, + pub fn try_get_web_socket_auto_response( + this: &DurableObjectState, ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "getWebSocketAutoResponseTimestamp")] - pub fn get_web_socket_auto_response_timestamp( - this: &DurableObjectState, + pub fn get_web_socket_auto_response_timestamp( + this: &DurableObjectState, ws: &WebSocket, ) -> Option; #[wasm_bindgen(method, catch, js_name = "getWebSocketAutoResponseTimestamp")] - pub fn try_get_web_socket_auto_response_timestamp( - this: &DurableObjectState, + pub fn try_get_web_socket_auto_response_timestamp( + this: &DurableObjectState, ws: &WebSocket, ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "setHibernatableWebSocketEventTimeout")] - pub fn set_hibernatable_web_socket_event_timeout(this: &DurableObjectState); + pub fn set_hibernatable_web_socket_event_timeout( + this: &DurableObjectState, + ); #[wasm_bindgen(method, catch, js_name = "setHibernatableWebSocketEventTimeout")] - pub fn try_set_hibernatable_web_socket_event_timeout( - this: &DurableObjectState, + pub fn try_set_hibernatable_web_socket_event_timeout( + this: &DurableObjectState, ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "setHibernatableWebSocketEventTimeout")] - pub fn set_hibernatable_web_socket_event_timeout_with_timeout_ms( - this: &DurableObjectState, + pub fn set_hibernatable_web_socket_event_timeout_with_timeout_ms< + Props: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObjectState, timeout_ms: f64, ); #[wasm_bindgen(method, catch, js_name = "setHibernatableWebSocketEventTimeout")] - pub fn try_set_hibernatable_web_socket_event_timeout_with_timeout_ms( - this: &DurableObjectState, + pub fn try_set_hibernatable_web_socket_event_timeout_with_timeout_ms< + Props: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObjectState, timeout_ms: f64, ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "getHibernatableWebSocketEventTimeout")] - pub fn get_hibernatable_web_socket_event_timeout(this: &DurableObjectState) -> Option; + pub fn get_hibernatable_web_socket_event_timeout( + this: &DurableObjectState, + ) -> Option; #[wasm_bindgen(method, catch, js_name = "getHibernatableWebSocketEventTimeout")] - pub fn try_get_hibernatable_web_socket_event_timeout( - this: &DurableObjectState, + pub fn try_get_hibernatable_web_socket_event_timeout( + this: &DurableObjectState, ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "getTags")] - pub fn get_tags(this: &DurableObjectState, ws: &WebSocket) -> Array; + pub fn get_tags( + this: &DurableObjectState, + ws: &WebSocket, + ) -> Array; #[wasm_bindgen(method, catch, js_name = "getTags")] - pub fn try_get_tags( - this: &DurableObjectState, + pub fn try_get_tags( + this: &DurableObjectState, ws: &WebSocket, ) -> Result, JsValue>; #[wasm_bindgen(method)] - pub fn abort(this: &DurableObjectState); + pub fn abort(this: &DurableObjectState); #[wasm_bindgen(method, catch, js_name = "abort")] - pub fn try_abort(this: &DurableObjectState) -> Result<(), JsValue>; + pub fn try_abort( + this: &DurableObjectState, + ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "abort")] - pub fn abort_with_reason(this: &DurableObjectState, reason: &str); + pub fn abort_with_reason( + this: &DurableObjectState, + reason: &str, + ); #[wasm_bindgen(method, catch, js_name = "abort")] - pub fn try_abort_with_reason(this: &DurableObjectState, reason: &str) -> Result<(), JsValue>; + pub fn try_abort_with_reason( + this: &DurableObjectState, + reason: &str, + ) -> Result<(), JsValue>; } #[wasm_bindgen] extern "C" { @@ -2603,51 +2703,56 @@ extern "C" { #[derive(Debug, Clone, PartialEq, Eq)] pub type DurableObjectTransaction; #[wasm_bindgen(method, catch)] - pub async fn get(this: &DurableObjectTransaction, key: &str) -> Result; + pub async fn get( + this: &DurableObjectTransaction, + key: &str, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_options( + pub async fn get_with_key_and_options( this: &DurableObjectTransaction, key: &str, options: &DurableObjectGetOptions, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_keys( + pub async fn get_with_keys( this: &DurableObjectTransaction, keys: &Array, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_keys_and_options( + pub async fn get_with_keys_and_options( this: &DurableObjectTransaction, keys: &Array, options: &DurableObjectGetOptions, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch)] - pub async fn list(this: &DurableObjectTransaction) -> Result, JsValue>; + pub async fn list( + this: &DurableObjectTransaction, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "list")] - pub async fn list_with_options( + pub async fn list_with_options( this: &DurableObjectTransaction, options: &DurableObjectListOptions, - ) -> Result, JsValue>; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch)] - pub async fn put( + pub async fn put( this: &DurableObjectTransaction, key: &str, value: &T, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_key_and_value_and_options( + pub async fn put_with_key_and_value_and_options( this: &DurableObjectTransaction, key: &str, value: &T, options: &DurableObjectPutOptions, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_entries( + pub async fn put_with_entries( this: &DurableObjectTransaction, entries: &Object, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_entries_and_options( + pub async fn put_with_entries_and_options( this: &DurableObjectTransaction, entries: &Object, options: &DurableObjectPutOptions, @@ -2718,51 +2823,56 @@ extern "C" { #[derive(Debug, Clone, PartialEq, Eq)] pub type DurableObjectStorage; #[wasm_bindgen(method, catch)] - pub async fn get(this: &DurableObjectStorage, key: &str) -> Result; + pub async fn get( + this: &DurableObjectStorage, + key: &str, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_options( + pub async fn get_with_key_and_options( this: &DurableObjectStorage, key: &str, options: &DurableObjectGetOptions, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_keys( + pub async fn get_with_keys( this: &DurableObjectStorage, keys: &Array, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_keys_and_options( + pub async fn get_with_keys_and_options( this: &DurableObjectStorage, keys: &Array, options: &DurableObjectGetOptions, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch)] - pub async fn list(this: &DurableObjectStorage) -> Result, JsValue>; + pub async fn list( + this: &DurableObjectStorage, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "list")] - pub async fn list_with_options( + pub async fn list_with_options( this: &DurableObjectStorage, options: &DurableObjectListOptions, - ) -> Result, JsValue>; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch)] - pub async fn put( + pub async fn put( this: &DurableObjectStorage, key: &str, value: &T, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_key_and_value_and_options( + pub async fn put_with_key_and_value_and_options( this: &DurableObjectStorage, key: &str, value: &T, options: &DurableObjectPutOptions, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_entries( + pub async fn put_with_entries( this: &DurableObjectStorage, entries: &Object, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_entries_and_options( + pub async fn put_with_entries_and_options( this: &DurableObjectStorage, entries: &Object, options: &DurableObjectPutOptions, @@ -2794,10 +2904,10 @@ extern "C" { options: &DurableObjectPutOptions, ) -> Result; #[wasm_bindgen(method, catch)] - pub async fn transaction( + pub async fn transaction( this: &DurableObjectStorage, closure: &Function Promise>, - ) -> Result; + ) -> Result; #[wasm_bindgen(method, catch, js_name = "getAlarm")] pub async fn get_alarm(this: &DurableObjectStorage) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getAlarm")] @@ -2845,12 +2955,15 @@ extern "C" { #[wasm_bindgen(method, setter)] pub fn set_kv(this: &DurableObjectStorage, val: &SyncKvStorage); #[wasm_bindgen(method, js_name = "transactionSync")] - pub fn transaction_sync(this: &DurableObjectStorage, closure: &Function T>) -> JsValue; + pub fn transaction_sync( + this: &DurableObjectStorage, + closure: &Function T>, + ) -> T; #[wasm_bindgen(method, catch, js_name = "transactionSync")] - pub fn try_transaction_sync( + pub fn try_transaction_sync( this: &DurableObjectStorage, closure: &Function T>, - ) -> Result; + ) -> Result; #[wasm_bindgen(method, catch, js_name = "getCurrentBookmark")] pub async fn get_current_bookmark(this: &DurableObjectStorage) -> Result; #[wasm_bindgen(method, catch, js_name = "getBookmarkForTime")] @@ -3378,152 +3491,200 @@ impl EventInitBuilder { } } #[allow(dead_code)] -pub type EventListener = Function Undefined>; +pub type EventListener = Function Undefined>; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type EventListenerObject; + pub type EventListenerObject; #[wasm_bindgen(method, js_name = "handleEvent")] - pub fn handle_event(this: &EventListenerObject, event: &EventType); + pub fn handle_event( + this: &EventListenerObject, + event: &EventType, + ); #[wasm_bindgen(method, catch, js_name = "handleEvent")] - pub fn try_handle_event(this: &EventListenerObject, event: &EventType) -> Result<(), JsValue>; + pub fn try_handle_event( + this: &EventListenerObject, + event: &EventType, + ) -> Result<(), JsValue>; } #[allow(dead_code)] -pub type EventListenerOrEventListenerObject = JsValue; +pub type EventListenerOrEventListenerObject = JsValue; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type EventTarget; + pub type EventTarget; #[wasm_bindgen(constructor, catch)] pub fn new() -> Result; #[doc = " The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)"] #[wasm_bindgen(method, js_name = "addEventListener")] - pub fn add_event_listener( - this: &EventTarget, + pub fn add_event_listener< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, ); #[doc = " The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)"] #[wasm_bindgen(method, catch, js_name = "addEventListener")] - pub fn try_add_event_listener( - this: &EventTarget, + pub fn try_add_event_listener< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, ) -> Result<(), JsValue>; #[doc = " The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)"] #[wasm_bindgen(method, js_name = "addEventListener")] - pub fn add_event_listener_with_event_target_add_event_listener_options( - this: &EventTarget, + pub fn add_event_listener_with_event_target_add_event_listener_options< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: &EventTargetAddEventListenerOptions, ); #[doc = " The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)"] #[wasm_bindgen(method, catch, js_name = "addEventListener")] - pub fn try_add_event_listener_with_event_target_add_event_listener_options( - this: &EventTarget, + pub fn try_add_event_listener_with_event_target_add_event_listener_options< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: &EventTargetAddEventListenerOptions, ) -> Result<(), JsValue>; #[doc = " The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)"] #[wasm_bindgen(method, js_name = "addEventListener")] - pub fn add_event_listener_with_bool( - this: &EventTarget, + pub fn add_event_listener_with_bool< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: bool, ); #[doc = " The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)"] #[wasm_bindgen(method, catch, js_name = "addEventListener")] - pub fn try_add_event_listener_with_bool( - this: &EventTarget, + pub fn try_add_event_listener_with_bool< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: bool, ) -> Result<(), JsValue>; #[doc = " The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)"] #[wasm_bindgen(method, js_name = "removeEventListener")] - pub fn remove_event_listener( - this: &EventTarget, + pub fn remove_event_listener< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, ); #[doc = " The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)"] #[wasm_bindgen(method, catch, js_name = "removeEventListener")] - pub fn try_remove_event_listener( - this: &EventTarget, + pub fn try_remove_event_listener< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, ) -> Result<(), JsValue>; #[doc = " The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)"] #[wasm_bindgen(method, js_name = "removeEventListener")] - pub fn remove_event_listener_with_event_target_event_listener_options( - this: &EventTarget, + pub fn remove_event_listener_with_event_target_event_listener_options< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: &EventTargetEventListenerOptions, ); #[doc = " The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)"] #[wasm_bindgen(method, catch, js_name = "removeEventListener")] - pub fn try_remove_event_listener_with_event_target_event_listener_options( - this: &EventTarget, + pub fn try_remove_event_listener_with_event_target_event_listener_options< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: &EventTargetEventListenerOptions, ) -> Result<(), JsValue>; #[doc = " The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)"] #[wasm_bindgen(method, js_name = "removeEventListener")] - pub fn remove_event_listener_with_bool( - this: &EventTarget, + pub fn remove_event_listener_with_bool< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: bool, ); #[doc = " The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)"] #[wasm_bindgen(method, catch, js_name = "removeEventListener")] - pub fn try_remove_event_listener_with_bool( - this: &EventTarget, + pub fn try_remove_event_listener_with_bool< + EventMap: ::wasm_bindgen::JsGeneric, + Type: ::wasm_bindgen::JsGeneric, + >( + this: &EventTarget, r#type: &Type, - handler: &EventListenerOrEventListenerObject, + handler: &EventListenerOrEventListenerObject, options: bool, ) -> Result<(), JsValue>; #[doc = " The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)"] #[wasm_bindgen(method, js_name = "dispatchEvent")] - pub fn dispatch_event(this: &EventTarget, event: &JsValue) -> bool; + pub fn dispatch_event( + this: &EventTarget, + event: &JsValue, + ) -> bool; #[doc = " The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)"] #[wasm_bindgen(method, catch, js_name = "dispatchEvent")] - pub fn try_dispatch_event(this: &EventTarget, event: &JsValue) -> Result; + pub fn try_dispatch_event( + this: &EventTarget, + event: &JsValue, + ) -> Result; } #[wasm_bindgen] extern "C" { @@ -3820,7 +3981,7 @@ extern "C" { extern "C" { # [wasm_bindgen (extends = Event , extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type CustomEvent; + pub type CustomEvent; #[wasm_bindgen(constructor, catch)] pub fn new(r#type: &str) -> Result; #[wasm_bindgen(constructor, catch, js_name = "CustomEvent")] @@ -4114,7 +4275,10 @@ extern "C" { #[derive(Debug, Clone, PartialEq, Eq)] pub type Cache; #[wasm_bindgen(method, catch)] - pub async fn delete(this: &Cache, request: &Request) -> Result; + pub async fn delete( + this: &Cache, + request: &Request, + ) -> Result; #[wasm_bindgen(method, catch, js_name = "delete")] pub async fn delete_with_str(this: &Cache, request: &str) -> Result; #[wasm_bindgen(method, catch, js_name = "delete")] @@ -4122,7 +4286,7 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "delete")] pub async fn delete_with_js_value_and_options( this: &Cache, - request: &Request, + request: &Request, options: &CacheQueryOptions, ) -> Result; #[wasm_bindgen(method, catch, js_name = "delete")] @@ -4138,7 +4302,10 @@ extern "C" { options: &CacheQueryOptions, ) -> Result; #[wasm_bindgen(method, catch)] - pub async fn r#match(this: &Cache, request: &Request) -> Result, JsValue>; + pub async fn r#match( + this: &Cache, + request: &Request, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "match")] pub async fn match_with_str(this: &Cache, request: &str) -> Result, JsValue>; @@ -4148,7 +4315,7 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "match")] pub async fn match_with_js_value_and_options( this: &Cache, - request: &Request, + request: &Request, options: &CacheQueryOptions, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "match")] @@ -4166,7 +4333,7 @@ extern "C" { #[wasm_bindgen(method, catch)] pub async fn put( this: &Cache, - request: &Request, + request: &Request, response: &Response, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] @@ -4229,12 +4396,15 @@ extern "C" { #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues)"] #[wasm_bindgen(method, js_name = "getRandomValues")] - pub fn get_random_values(this: &Crypto, buffer: &T) -> JsValue; + pub fn get_random_values(this: &Crypto, buffer: &T) -> T; #[doc = " The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues)"] #[wasm_bindgen(method, catch, js_name = "getRandomValues")] - pub fn try_get_random_values(this: &Crypto, buffer: &T) -> Result; + pub fn try_get_random_values( + this: &Crypto, + buffer: &T, + ) -> Result; #[doc = " The **`randomUUID()`** method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator."] #[doc = " Available only in secure contexts."] #[doc = ""] @@ -6547,17 +6717,19 @@ extern "C" { filename: &str, ) -> Result<(), JsValue>; #[wasm_bindgen(method)] - pub fn entries(this: &FormData) -> IterableIterator; + pub fn entries(this: &FormData) -> Iterator>; #[wasm_bindgen(method, catch, js_name = "entries")] - pub fn try_entries(this: &FormData) -> Result; + pub fn try_entries( + this: &FormData, + ) -> Result>, JsValue>; #[wasm_bindgen(method)] - pub fn keys(this: &FormData) -> IterableIterator; + pub fn keys(this: &FormData) -> Iterator; #[wasm_bindgen(method, catch, js_name = "keys")] - pub fn try_keys(this: &FormData) -> Result; + pub fn try_keys(this: &FormData) -> Result, JsValue>; #[wasm_bindgen(method)] - pub fn values(this: &FormData) -> IterableIterator; + pub fn values(this: &FormData) -> Iterator; #[wasm_bindgen(method, catch, js_name = "values")] - pub fn try_values(this: &FormData) -> Result; + pub fn try_values(this: &FormData) -> Result; #[wasm_bindgen(method, js_name = "forEach")] pub fn for_each( this: &FormData, @@ -6569,13 +6741,13 @@ extern "C" { callback: &Function Undefined>, ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "forEach")] - pub fn for_each_with_this_arg( + pub fn for_each_with_this_arg( this: &FormData, callback: &Function Undefined>, this_arg: &This, ); #[wasm_bindgen(method, catch, js_name = "forEach")] - pub fn try_for_each_with_this_arg( + pub fn try_for_each_with_this_arg( this: &FormData, callback: &Function Undefined>, this_arg: &This, @@ -6760,7 +6932,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "tagName")] pub fn set_tag_name(this: &Element, val: &str); #[wasm_bindgen(method, getter)] - pub fn attributes(this: &Element) -> IterableIterator; + pub fn attributes(this: &Element) -> Iterator>; #[wasm_bindgen(method, getter)] pub fn removed(this: &Element) -> bool; #[wasm_bindgen(method, getter, js_name = "namespaceURI")] @@ -7527,7 +7699,7 @@ extern "C" { #[wasm_bindgen(constructor, catch, js_name = "Headers")] pub fn new_with_headers(init: &Headers) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Headers")] - pub fn new_with_js_value(init: &Iterable) -> Result; + pub fn new_with_iterable(init: &JsValue) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Headers")] pub fn new_with_record(init: &Object) -> Result; #[doc = " The **`get()`** method of the Headers interface returns a byte string of all the values of a header within a `Headers` object with a given name."] @@ -7605,29 +7777,31 @@ extern "C" { callback: &Function Undefined>, ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "forEach")] - pub fn for_each_with_this_arg( + pub fn for_each_with_this_arg( this: &Headers, callback: &Function Undefined>, this_arg: &This, ); #[wasm_bindgen(method, catch, js_name = "forEach")] - pub fn try_for_each_with_this_arg( + pub fn try_for_each_with_this_arg( this: &Headers, callback: &Function Undefined>, this_arg: &This, ) -> Result<(), JsValue>; #[wasm_bindgen(method)] - pub fn entries(this: &Headers) -> IterableIterator; + pub fn entries(this: &Headers) -> Iterator>; #[wasm_bindgen(method, catch, js_name = "entries")] - pub fn try_entries(this: &Headers) -> Result; + pub fn try_entries( + this: &Headers, + ) -> Result>, JsValue>; #[wasm_bindgen(method)] - pub fn keys(this: &Headers) -> IterableIterator; + pub fn keys(this: &Headers) -> Iterator; #[wasm_bindgen(method, catch, js_name = "keys")] - pub fn try_keys(this: &Headers) -> Result; + pub fn try_keys(this: &Headers) -> Result, JsValue>; #[wasm_bindgen(method)] - pub fn values(this: &Headers) -> IterableIterator; + pub fn values(this: &Headers) -> Iterator; #[wasm_bindgen(method, catch, js_name = "values")] - pub fn try_values(this: &Headers) -> Result; + pub fn try_values(this: &Headers) -> Result, JsValue>; } #[allow(dead_code)] pub type BodyInit = JsValue; @@ -7647,7 +7821,7 @@ extern "C" { #[wasm_bindgen(method, catch)] pub async fn text(this: &Body) -> Result; #[wasm_bindgen(method, catch)] - pub async fn json(this: &Body) -> Result; + pub async fn json(this: &Body) -> Result; #[wasm_bindgen(method, catch, js_name = "formData")] pub async fn form_data(this: &Body) -> Result; #[wasm_bindgen(method, catch)] @@ -7661,13 +7835,13 @@ extern "C" { #[wasm_bindgen(constructor, catch)] pub fn new() -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] - pub fn new_with_js_value(body: &ReadableStream) -> Result; + pub fn new_with_js_value(body: &ReadableStream) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] pub fn new_with_str(body: &str) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] pub fn new_with_array_buffer(body: &ArrayBuffer) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] - pub fn new_with_js_value_1(body: &Object) -> Result; + pub fn new_with_js_value_2(body: &Object) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] pub fn new_with_blob(body: &Blob) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] @@ -7675,14 +7849,14 @@ extern "C" { #[wasm_bindgen(constructor, catch, js_name = "Response")] pub fn new_with_form_data(body: &FormData) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] - pub fn new_with_js_value_2(body: &Iterable) -> Result; + pub fn new_with_iterable(body: &JsValue) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] - pub fn new_with_js_value_3(body: &AsyncIterable) -> Result; + pub fn new_with_async_iterable(body: &JsValue) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] pub fn new_with_null(body: &Null) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] pub fn new_with_js_value_and_init( - body: &ReadableStream, + body: &ReadableStream, init: &ResponseInit, ) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] @@ -7693,7 +7867,7 @@ extern "C" { init: &ResponseInit, ) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] - pub fn new_with_js_value_and_init_1( + pub fn new_with_js_value_and_init_2( body: &Object, init: &ResponseInit, ) -> Result; @@ -7710,13 +7884,13 @@ extern "C" { init: &ResponseInit, ) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] - pub fn new_with_js_value_and_init_2( - body: &Iterable, + pub fn new_with_iterable_and_init( + body: &JsValue, init: &ResponseInit, ) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] - pub fn new_with_js_value_and_init_3( - body: &AsyncIterable, + pub fn new_with_async_iterable_and_init( + body: &JsValue, init: &ResponseInit, ) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Response")] @@ -7843,7 +8017,7 @@ extern "C" { #[wasm_bindgen(method, setter)] pub fn set_headers(this: &ResponseInit, val: &Headers); #[wasm_bindgen(method, setter, js_name = "headers")] - pub fn set_headers_with_js_value(this: &ResponseInit, val: &Iterable); + pub fn set_headers_with_iterable(this: &ResponseInit, val: &JsValue); #[wasm_bindgen(method, setter, js_name = "headers")] pub fn set_headers_with_record(this: &ResponseInit, val: &Object); #[wasm_bindgen(method, getter)] @@ -7889,8 +8063,8 @@ impl ResponseInitBuilder { self.inner.set_headers(val); self } - pub fn headers_with_js_value(self, val: &Iterable) -> Self { - self.inner.set_headers_with_js_value(val); + pub fn headers_with_iterable(self, val: &JsValue) -> Self { + self.inner.set_headers_with_iterable(val); self } pub fn headers_with_record(self, val: &Object) -> Self { @@ -7922,33 +8096,37 @@ impl ResponseInitBuilder { } } #[allow(dead_code)] -pub type RequestInfo = JsValue; +pub type RequestInfo = JsValue; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Body , extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type Request; + pub type Request; #[wasm_bindgen(constructor, catch)] - pub fn new(input: &RequestInfo) -> Result; + pub fn new(input: &RequestInfo) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Request")] pub fn new_with_url(input: &URL) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Request")] pub fn new_with_js_value_and_init( - input: &RequestInfo, - init: &RequestInit, + input: &RequestInfo, + init: &RequestInit, ) -> Result; #[wasm_bindgen(constructor, catch, js_name = "Request")] - pub fn new_with_url_and_init(input: &URL, init: &RequestInit) -> Result; + pub fn new_with_url_and_init(input: &URL, init: &RequestInit) -> Result; #[doc = " The **`clone()`** method of the Request interface creates a copy of the current `Request` object."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone)"] #[wasm_bindgen(method)] - pub fn clone(this: &Request) -> Request; + pub fn clone( + this: &Request, + ) -> Request; #[doc = " The **`clone()`** method of the Request interface creates a copy of the current `Request` object."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone)"] #[wasm_bindgen(method, catch, js_name = "clone")] - pub fn try_clone(this: &Request) -> Result; + pub fn try_clone( + this: &Request, + ) -> Result, JsValue>; #[doc = " The **`method`** read-only property of the `POST`, etc.) A String indicating the method of the request."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)"] @@ -8022,7 +8200,7 @@ extern "C" { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type RequestInit; + pub type RequestInit; #[wasm_bindgen(method, getter)] pub fn method(this: &RequestInit) -> Option; #[wasm_bindgen(method, setter)] @@ -8032,13 +8210,13 @@ extern "C" { #[wasm_bindgen(method, setter)] pub fn set_headers(this: &RequestInit, val: &Headers); #[wasm_bindgen(method, setter, js_name = "headers")] - pub fn set_headers_with_js_value(this: &RequestInit, val: &Iterable); + pub fn set_headers_with_iterable(this: &RequestInit, val: &JsValue); #[wasm_bindgen(method, setter, js_name = "headers")] pub fn set_headers_with_record(this: &RequestInit, val: &Object); #[wasm_bindgen(method, getter)] pub fn body(this: &RequestInit) -> Option; #[wasm_bindgen(method, setter)] - pub fn set_body(this: &RequestInit, val: &ReadableStream); + pub fn set_body(this: &RequestInit, val: &ReadableStream); #[wasm_bindgen(method, setter, js_name = "body")] pub fn set_body_with_str(this: &RequestInit, val: &str); #[wasm_bindgen(method, setter, js_name = "body")] @@ -8052,9 +8230,9 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "body")] pub fn set_body_with_form_data(this: &RequestInit, val: &FormData); #[wasm_bindgen(method, setter, js_name = "body")] - pub fn set_body_with_js_value_1(this: &RequestInit, val: &Iterable); + pub fn set_body_with_iterable(this: &RequestInit, val: &JsValue); #[wasm_bindgen(method, setter, js_name = "body")] - pub fn set_body_with_js_value_2(this: &RequestInit, val: &AsyncIterable); + pub fn set_body_with_async_iterable(this: &RequestInit, val: &JsValue); #[wasm_bindgen(method, setter, js_name = "body")] pub fn set_body_with_null(this: &RequestInit, val: &Null); #[wasm_bindgen(method, getter)] @@ -8116,15 +8294,15 @@ impl RequestInitBuilder { self.inner.set_headers(val); self } - pub fn headers_with_js_value(self, val: &Iterable) -> Self { - self.inner.set_headers_with_js_value(val); + pub fn headers_with_iterable(self, val: &JsValue) -> Self { + self.inner.set_headers_with_iterable(val); self } pub fn headers_with_record(self, val: &Object) -> Self { self.inner.set_headers_with_record(val); self } - pub fn body(self, val: &ReadableStream) -> Self { + pub fn body(self, val: &ReadableStream) -> Self { self.inner.set_body(val); self } @@ -8152,12 +8330,12 @@ impl RequestInitBuilder { self.inner.set_body_with_form_data(val); self } - pub fn body_with_js_value_1(self, val: &Iterable) -> Self { - self.inner.set_body_with_js_value_1(val); + pub fn body_with_iterable(self, val: &JsValue) -> Self { + self.inner.set_body_with_iterable(val); self } - pub fn body_with_js_value_2(self, val: &AsyncIterable) -> Self { - self.inner.set_body_with_js_value_2(val); + pub fn body_with_async_iterable(self, val: &JsValue) -> Self { + self.inner.set_body_with_async_iterable(val); self } pub fn body_with_null(self, val: &Null) -> Self { @@ -8213,14 +8391,17 @@ impl RequestInitBuilder { } } #[allow(dead_code)] -pub type Service = JsValue; +pub type Service = JsValue; #[allow(dead_code)] -pub type Fetcher = JsValue; +pub type Fetcher = JsValue; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type KVNamespaceListKey; + pub type KVNamespaceListKey< + Metadata: ::wasm_bindgen::JsGeneric, + Key: ::wasm_bindgen::JsGeneric, + >; #[wasm_bindgen(method, getter)] pub fn name(this: &KVNamespaceListKey) -> Key; #[wasm_bindgen(method, setter)] @@ -8276,7 +8457,7 @@ extern "C" { #[wasm_bindgen(method, getter)] pub fn cursor(this: &KVNamespaceListResult) -> Option; #[wasm_bindgen(method, getter)] - pub fn keys(this: &KVNamespaceListResult) -> Array; + pub fn keys(this: &KVNamespaceListResult) -> Array>; #[wasm_bindgen(method, getter)] pub fn list_complete(this: &KVNamespaceListResult) -> JsValue; #[wasm_bindgen(method, setter, js_name = "cacheStatus")] @@ -8286,7 +8467,7 @@ extern "C" { #[wasm_bindgen(method, setter)] pub fn set_cursor(this: &KVNamespaceListResult, val: &str); #[wasm_bindgen(method, setter)] - pub fn set_keys(this: &KVNamespaceListResult, val: &Array); + pub fn set_keys(this: &KVNamespaceListResult, val: &Array>); #[wasm_bindgen(method, setter)] pub fn set_list_complete(this: &KVNamespaceListResult, val: bool); #[wasm_bindgen(method, setter, js_name = "list_complete")] @@ -8303,7 +8484,7 @@ impl KVNamespaceListResult { #[doc = " * `keys`"] pub fn new_false( cache_status: Option<&str>, - keys: &Array, + keys: &Array>, ) -> KVNamespaceListResult { Self::builder_false(cache_status, keys).build() } @@ -8317,7 +8498,7 @@ impl KVNamespaceListResult { #[doc = " * `keys`"] pub fn new_true( cache_status: Option<&str>, - keys: &Array, + keys: &Array>, ) -> KVNamespaceListResult { Self::builder_true(cache_status, keys).build() } @@ -8331,7 +8512,7 @@ impl KVNamespaceListResult { #[doc = " * `keys`"] pub fn builder_false( cache_status: Option<&str>, - keys: &Array, + keys: &Array>, ) -> KVNamespaceListResultBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_cache_status(cache_status); @@ -8349,7 +8530,7 @@ impl KVNamespaceListResult { #[doc = " * `keys`"] pub fn builder_true( cache_status: Option<&str>, - keys: &Array, + keys: &Array>, ) -> KVNamespaceListResultBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_cache_status(cache_status); @@ -8374,249 +8555,312 @@ impl KVNamespaceListResultBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type KVNamespace; + pub type KVNamespace; #[wasm_bindgen(method, catch)] - pub async fn get(this: &KVNamespace, key: &Key) -> Result, JsValue>; + pub async fn get( + this: &KVNamespace, + key: &Key, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_js_value( - this: &KVNamespace, + pub async fn get_with_key_and_js_value( + this: &KVNamespace, key: &Key, - options: &KVNamespaceGetOptions, + options: &KVNamespaceGetOptions, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_js_value_1( - this: &KVNamespace, + pub async fn get_with_key_and_js_value_2( + this: &KVNamespace, key: &Key, r#type: &str, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_js_value_2( - this: &KVNamespace, + pub async fn get_with_key_and_js_value_3( + this: &KVNamespace, key: &Key, r#type: &str, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_js_value_3( - this: &KVNamespace, + pub async fn get_with_key_and_js_value_4( + this: &KVNamespace, key: &Key, r#type: &str, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_js_value_4( - this: &KVNamespace, + pub async fn get_with_key_and_js_value_5( + this: &KVNamespace, key: &Key, r#type: &str, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_js_value_5( - this: &KVNamespace, + pub async fn get_with_key_and_js_value_6( + this: &KVNamespace, key: &Key, - options: &KVNamespaceGetOptions, + options: &KVNamespaceGetOptions, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_js_value_6( - this: &KVNamespace, + pub async fn get_with_key_and_js_value_7( + this: &KVNamespace, key: &Key, - options: &KVNamespaceGetOptions, + options: &KVNamespaceGetOptions, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_js_value_7( - this: &KVNamespace, + pub async fn get_with_key_and_js_value_8( + this: &KVNamespace, key: &Key, - options: &KVNamespaceGetOptions, + options: &KVNamespaceGetOptions, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_key_and_js_value_8( - this: &KVNamespace, + pub async fn get_with_key_and_js_value_9( + this: &KVNamespace, key: &Key, - options: &KVNamespaceGetOptions, + options: &KVNamespaceGetOptions, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_array_and_js_value( - this: &KVNamespace, + pub async fn get_with_array_and_js_value( + this: &KVNamespace, key: &Array, r#type: &str, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_array_and_js_value_1( - this: &KVNamespace, + pub async fn get_with_array_and_js_value_2( + this: &KVNamespace, key: &Array, r#type: &str, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_array( - this: &KVNamespace, + pub async fn get_with_array( + this: &KVNamespace, key: &Array, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_array_and_js_value_2( - this: &KVNamespace, + pub async fn get_with_array_and_js_value_3( + this: &KVNamespace, key: &Array, - options: &KVNamespaceGetOptions, + options: &KVNamespaceGetOptions, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_array_and_js_value_3( - this: &KVNamespace, + pub async fn get_with_array_and_js_value_4( + this: &KVNamespace, key: &Array, - options: &KVNamespaceGetOptions, + options: &KVNamespaceGetOptions, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_with_array_and_js_value_4( - this: &KVNamespace, + pub async fn get_with_array_and_js_value_5( + this: &KVNamespace, key: &Array, - options: &KVNamespaceGetOptions, + options: &KVNamespaceGetOptions, ) -> Result, JsValue>; #[wasm_bindgen(method, catch)] - pub async fn list(this: &KVNamespace) -> Result; + pub async fn list( + this: &KVNamespace, + ) -> Result; #[wasm_bindgen(method, catch, js_name = "list")] - pub async fn list_with_options( - this: &KVNamespace, + pub async fn list_with_options< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, options: &KVNamespaceListOptions, ) -> Result; #[wasm_bindgen(method, catch)] - pub async fn put(this: &KVNamespace, key: &Key, value: &str) -> Result; + pub async fn put( + this: &KVNamespace, + key: &Key, + value: &str, + ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_array_buffer( - this: &KVNamespace, + pub async fn put_with_array_buffer( + this: &KVNamespace, key: &Key, value: &ArrayBuffer, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_js_value( - this: &KVNamespace, + pub async fn put_with_js_value( + this: &KVNamespace, key: &Key, value: &Object, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_readable_stream( - this: &KVNamespace, + pub async fn put_with_readable_stream( + this: &KVNamespace, key: &Key, value: &ReadableStream, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_str_and_options( - this: &KVNamespace, + pub async fn put_with_str_and_options( + this: &KVNamespace, key: &Key, value: &str, options: &KVNamespacePutOptions, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_array_buffer_and_options( - this: &KVNamespace, + pub async fn put_with_array_buffer_and_options( + this: &KVNamespace, key: &Key, value: &ArrayBuffer, options: &KVNamespacePutOptions, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_js_value_and_options( - this: &KVNamespace, + pub async fn put_with_js_value_and_options( + this: &KVNamespace, key: &Key, value: &Object, options: &KVNamespacePutOptions, ) -> Result; #[wasm_bindgen(method, catch, js_name = "put")] - pub async fn put_with_readable_stream_and_options( - this: &KVNamespace, + pub async fn put_with_readable_stream_and_options( + this: &KVNamespace, key: &Key, value: &ReadableStream, options: &KVNamespacePutOptions, ) -> Result; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata( - this: &KVNamespace, + pub async fn get_with_metadata< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Key, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_key_and_js_value( - this: &KVNamespace, + pub async fn get_with_metadata_with_key_and_js_value< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Key, - options: &KVNamespaceGetOptions, - ) -> Result; + options: &KVNamespaceGetOptions, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_key_and_js_value_1( - this: &KVNamespace, + pub async fn get_with_metadata_with_key_and_js_value_2< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Key, r#type: &str, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_key_and_js_value_2( - this: &KVNamespace, + pub async fn get_with_metadata_with_key_and_js_value_3< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Key, r#type: &str, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_key_and_js_value_3( - this: &KVNamespace, + pub async fn get_with_metadata_with_key_and_js_value_4< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Key, r#type: &str, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_key_and_js_value_4( - this: &KVNamespace, + pub async fn get_with_metadata_with_key_and_js_value_5< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Key, r#type: &str, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_key_and_js_value_5( - this: &KVNamespace, + pub async fn get_with_metadata_with_key_and_js_value_6< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Key, - options: &KVNamespaceGetOptions, - ) -> Result; + options: &KVNamespaceGetOptions, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_key_and_js_value_6( - this: &KVNamespace, + pub async fn get_with_metadata_with_key_and_js_value_7< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Key, - options: &KVNamespaceGetOptions, - ) -> Result; + options: &KVNamespaceGetOptions, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_key_and_js_value_7( - this: &KVNamespace, + pub async fn get_with_metadata_with_key_and_js_value_8< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Key, - options: &KVNamespaceGetOptions, - ) -> Result; + options: &KVNamespaceGetOptions, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_key_and_js_value_8( - this: &KVNamespace, + pub async fn get_with_metadata_with_key_and_js_value_9< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Key, - options: &KVNamespaceGetOptions, - ) -> Result; + options: &KVNamespaceGetOptions, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_array_and_js_value( - this: &KVNamespace, + pub async fn get_with_metadata_with_array_and_js_value< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Array, r#type: &str, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_array_and_js_value_1( - this: &KVNamespace, + pub async fn get_with_metadata_with_array_and_js_value_2< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Array, r#type: &str, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_array( - this: &KVNamespace, + pub async fn get_with_metadata_with_array< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Array, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_array_and_js_value_2( - this: &KVNamespace, + pub async fn get_with_metadata_with_array_and_js_value_3< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Array, - options: &KVNamespaceGetOptions, - ) -> Result; + options: &KVNamespaceGetOptions, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_array_and_js_value_3( - this: &KVNamespace, + pub async fn get_with_metadata_with_array_and_js_value_4< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Array, - options: &KVNamespaceGetOptions, - ) -> Result; + options: &KVNamespaceGetOptions, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "getWithMetadata")] - pub async fn get_with_metadata_with_array_and_js_value_4( - this: &KVNamespace, + pub async fn get_with_metadata_with_array_and_js_value_5< + Key: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >( + this: &KVNamespace, key: &Array, - options: &KVNamespaceGetOptions, - ) -> Result; + options: &KVNamespaceGetOptions, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch)] - pub async fn delete(this: &KVNamespace, key: &Key) -> Result; + pub async fn delete( + this: &KVNamespace, + key: &Key, + ) -> Result; } #[wasm_bindgen] extern "C" { @@ -8682,7 +8926,7 @@ impl KVNamespaceListOptionsBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type KVNamespaceGetOptions; + pub type KVNamespaceGetOptions; #[wasm_bindgen(method, getter)] pub fn r#type(this: &KVNamespaceGetOptions) -> Type; #[wasm_bindgen(method, setter)] @@ -8778,7 +9022,10 @@ impl KVNamespacePutOptionsBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type KVNamespaceGetWithMetadataResult; + pub type KVNamespaceGetWithMetadataResult< + Value: ::wasm_bindgen::JsGeneric, + Metadata: ::wasm_bindgen::JsGeneric, + >; #[wasm_bindgen(method, getter)] pub fn value(this: &KVNamespaceGetWithMetadataResult) -> Option; #[wasm_bindgen(method, setter)] @@ -8852,21 +9099,27 @@ pub enum QueueContentType { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type Queue; + pub type Queue; #[wasm_bindgen(method, catch)] - pub async fn send(this: &Queue, message: &Body) -> Result; + pub async fn send( + this: &Queue, + message: &Body, + ) -> Result; #[wasm_bindgen(method, catch, js_name = "send")] - pub async fn send_with_options( - this: &Queue, + pub async fn send_with_options( + this: &Queue, message: &Body, options: &QueueSendOptions, ) -> Result; #[wasm_bindgen(method, catch, js_name = "sendBatch")] - pub async fn send_batch(this: &Queue, messages: &Iterable) -> Result; + pub async fn send_batch( + this: &Queue, + messages: &JsValue, + ) -> Result; #[wasm_bindgen(method, catch, js_name = "sendBatch")] - pub async fn send_batch_with_options( - this: &Queue, - messages: &Iterable, + pub async fn send_batch_with_options( + this: &Queue, + messages: &JsValue, options: &QueueSendBatchOptions, ) -> Result; } @@ -8946,7 +9199,7 @@ impl QueueSendBatchOptionsBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type MessageSendRequest; + pub type MessageSendRequest; #[wasm_bindgen(method, getter)] pub fn body(this: &MessageSendRequest) -> Body; #[wasm_bindgen(method, setter)] @@ -9028,7 +9281,7 @@ impl QueueRetryOptionsBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type Message; + pub type Message; #[wasm_bindgen(method, getter)] pub fn id(this: &Message) -> String; #[wasm_bindgen(method, getter)] @@ -9038,70 +9291,87 @@ extern "C" { #[wasm_bindgen(method, getter)] pub fn attempts(this: &Message) -> f64; #[wasm_bindgen(method)] - pub fn retry(this: &Message); + pub fn retry(this: &Message); #[wasm_bindgen(method, catch, js_name = "retry")] - pub fn try_retry(this: &Message) -> Result<(), JsValue>; + pub fn try_retry(this: &Message) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "retry")] - pub fn retry_with_options(this: &Message, options: &QueueRetryOptions); + pub fn retry_with_options( + this: &Message, + options: &QueueRetryOptions, + ); #[wasm_bindgen(method, catch, js_name = "retry")] - pub fn try_retry_with_options( - this: &Message, + pub fn try_retry_with_options( + this: &Message, options: &QueueRetryOptions, ) -> Result<(), JsValue>; #[wasm_bindgen(method)] - pub fn ack(this: &Message); + pub fn ack(this: &Message); #[wasm_bindgen(method, catch, js_name = "ack")] - pub fn try_ack(this: &Message) -> Result<(), JsValue>; + pub fn try_ack(this: &Message) -> Result<(), JsValue>; } #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = ExtendableEvent , extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type QueueEvent; + pub type QueueEvent; #[wasm_bindgen(method, getter)] - pub fn messages(this: &QueueEvent) -> Array; + pub fn messages(this: &QueueEvent) -> Array>; #[wasm_bindgen(method, getter)] pub fn queue(this: &QueueEvent) -> String; #[wasm_bindgen(method, js_name = "retryAll")] - pub fn retry_all(this: &QueueEvent); + pub fn retry_all(this: &QueueEvent); #[wasm_bindgen(method, catch, js_name = "retryAll")] - pub fn try_retry_all(this: &QueueEvent) -> Result<(), JsValue>; + pub fn try_retry_all( + this: &QueueEvent, + ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "retryAll")] - pub fn retry_all_with_options(this: &QueueEvent, options: &QueueRetryOptions); + pub fn retry_all_with_options( + this: &QueueEvent, + options: &QueueRetryOptions, + ); #[wasm_bindgen(method, catch, js_name = "retryAll")] - pub fn try_retry_all_with_options( - this: &QueueEvent, + pub fn try_retry_all_with_options( + this: &QueueEvent, options: &QueueRetryOptions, ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "ackAll")] - pub fn ack_all(this: &QueueEvent); + pub fn ack_all(this: &QueueEvent); #[wasm_bindgen(method, catch, js_name = "ackAll")] - pub fn try_ack_all(this: &QueueEvent) -> Result<(), JsValue>; + pub fn try_ack_all( + this: &QueueEvent, + ) -> Result<(), JsValue>; } #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type MessageBatch; + pub type MessageBatch; #[wasm_bindgen(method, getter)] - pub fn messages(this: &MessageBatch) -> Array; + pub fn messages(this: &MessageBatch) -> Array>; #[wasm_bindgen(method, getter)] pub fn queue(this: &MessageBatch) -> String; #[wasm_bindgen(method, js_name = "retryAll")] - pub fn retry_all(this: &MessageBatch); + pub fn retry_all(this: &MessageBatch); #[wasm_bindgen(method, catch, js_name = "retryAll")] - pub fn try_retry_all(this: &MessageBatch) -> Result<(), JsValue>; + pub fn try_retry_all( + this: &MessageBatch, + ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "retryAll")] - pub fn retry_all_with_options(this: &MessageBatch, options: &QueueRetryOptions); + pub fn retry_all_with_options( + this: &MessageBatch, + options: &QueueRetryOptions, + ); #[wasm_bindgen(method, catch, js_name = "retryAll")] - pub fn try_retry_all_with_options( - this: &MessageBatch, + pub fn try_retry_all_with_options( + this: &MessageBatch, options: &QueueRetryOptions, ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "ackAll")] - pub fn ack_all(this: &MessageBatch); + pub fn ack_all(this: &MessageBatch); #[wasm_bindgen(method, catch, js_name = "ackAll")] - pub fn try_ack_all(this: &MessageBatch) -> Result<(), JsValue>; + pub fn try_ack_all( + this: &MessageBatch, + ) -> Result<(), JsValue>; } #[wasm_bindgen] extern "C" { @@ -9214,7 +9484,7 @@ extern "C" { options: &JsValue, ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] - pub async fn get_1(this: &R2Bucket, key: &str) -> Result, JsValue>; + pub async fn get_2(this: &R2Bucket, key: &str) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "get")] pub async fn get_with_r_2_get_options( this: &R2Bucket, @@ -9552,7 +9822,7 @@ extern "C" { #[wasm_bindgen(method, catch)] pub async fn text(this: &R2ObjectBody) -> Result; #[wasm_bindgen(method, catch)] - pub async fn json(this: &R2ObjectBody) -> Result; + pub async fn json(this: &R2ObjectBody) -> Result; #[wasm_bindgen(method, catch)] pub async fn blob(this: &R2ObjectBody) -> Result; } @@ -10212,7 +10482,7 @@ extern "C" { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type QueuingStrategy; + pub type QueuingStrategy; #[wasm_bindgen(method, getter, js_name = "highWaterMark")] pub fn high_water_mark(this: &QueuingStrategy) -> Option; #[wasm_bindgen(method, setter, js_name = "highWaterMark")] @@ -10258,7 +10528,7 @@ impl QueuingStrategyBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type UnderlyingSink; + pub type UnderlyingSink; #[wasm_bindgen(method, getter)] pub fn r#type(this: &UnderlyingSink) -> Option; #[wasm_bindgen(method, setter)] @@ -10430,7 +10700,7 @@ impl UnderlyingByteSourceBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type UnderlyingSource; + pub type UnderlyingSource; #[wasm_bindgen(method, getter)] pub fn r#type(this: &UnderlyingSource) -> Option; #[wasm_bindgen(method, setter)] @@ -10440,20 +10710,20 @@ extern "C" { #[wasm_bindgen(method, getter)] pub fn start( this: &UnderlyingSource, - ) -> Option JsOption>>>; + ) -> Option) -> JsOption>>>; #[wasm_bindgen(method, setter)] pub fn set_start( this: &UnderlyingSource, - val: &Function JsOption>>, + val: &Function) -> JsOption>>, ); #[wasm_bindgen(method, getter)] pub fn pull( this: &UnderlyingSource, - ) -> Option JsOption>>>; + ) -> Option) -> JsOption>>>; #[wasm_bindgen(method, setter)] pub fn set_pull( this: &UnderlyingSource, - val: &Function JsOption>>, + val: &Function) -> JsOption>>, ); #[wasm_bindgen(method, getter)] pub fn cancel( @@ -10495,14 +10765,14 @@ impl UnderlyingSourceBuilder { } pub fn start( self, - val: &Function JsOption>>, + val: &Function) -> JsOption>>, ) -> Self { self.inner.set_start(val); self } pub fn pull( self, - val: &Function JsOption>>, + val: &Function) -> JsOption>>, ) -> Self { self.inner.set_pull(val); self @@ -10527,7 +10797,7 @@ impl UnderlyingSourceBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type Transformer; + pub type Transformer; #[wasm_bindgen(method, getter, js_name = "readableType")] pub fn readable_type(this: &Transformer) -> Option; #[wasm_bindgen(method, setter, js_name = "readableType")] @@ -10539,29 +10809,29 @@ extern "C" { #[wasm_bindgen(method, getter)] pub fn start( this: &Transformer, - ) -> Option JsOption>>>; + ) -> Option) -> JsOption>>>; #[wasm_bindgen(method, setter)] pub fn set_start( this: &Transformer, - val: &Function JsOption>>, + val: &Function) -> JsOption>>, ); #[wasm_bindgen(method, getter)] pub fn transform( this: &Transformer, - ) -> Option JsOption>>>; + ) -> Option) -> JsOption>>>; #[wasm_bindgen(method, setter)] pub fn set_transform( this: &Transformer, - val: &Function JsOption>>, + val: &Function) -> JsOption>>, ); #[wasm_bindgen(method, getter)] pub fn flush( this: &Transformer, - ) -> Option JsOption>>>; + ) -> Option) -> JsOption>>>; #[wasm_bindgen(method, setter)] pub fn set_flush( this: &Transformer, - val: &Function JsOption>>, + val: &Function) -> JsOption>>, ); #[wasm_bindgen(method, getter)] pub fn cancel( @@ -10601,21 +10871,21 @@ impl TransformerBuilder { } pub fn start( self, - val: &Function JsOption>>, + val: &Function) -> JsOption>>, ) -> Self { self.inner.set_start(val); self } pub fn transform( self, - val: &Function JsOption>>, + val: &Function) -> JsOption>>, ) -> Self { self.inner.set_transform(val); self } pub fn flush( self, - val: &Function JsOption>>, + val: &Function) -> JsOption>>, ) -> Self { self.inner.set_flush(val); self @@ -10771,17 +11041,17 @@ impl ReadableStreamReadResultBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type ReadableStream; + pub type ReadableStream; #[wasm_bindgen(constructor, catch)] pub fn new() -> Result; #[wasm_bindgen(constructor, catch, js_name = "ReadableStream")] pub fn new_with_underlying_source( - underlying_source: &UnderlyingSource, + underlying_source: &UnderlyingSource, ) -> Result; #[wasm_bindgen(constructor, catch, js_name = "ReadableStream")] pub fn new_with_underlying_source_and_strategy( - underlying_source: &UnderlyingSource, - strategy: &QueuingStrategy, + underlying_source: &UnderlyingSource, + strategy: &QueuingStrategy, ) -> Result; #[doc = " The **`locked`** read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader."] #[doc = ""] @@ -10792,139 +11062,155 @@ extern "C" { #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)"] #[wasm_bindgen(method, catch)] - pub async fn cancel(this: &ReadableStream) -> Result; + pub async fn cancel( + this: &ReadableStream, + ) -> Result; #[doc = " The **`cancel()`** method of the ReadableStream interface returns a Promise that resolves when the stream is canceled."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)"] #[wasm_bindgen(method, catch, js_name = "cancel")] - pub async fn cancel_with_reason( - this: &ReadableStream, + pub async fn cancel_with_reason( + this: &ReadableStream, reason: &JsValue, ) -> Result; #[doc = " The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)"] #[wasm_bindgen(method, js_name = "getReader")] - pub fn get_reader( - this: &ReadableStream, + pub fn get_reader( + this: &ReadableStream, options: &ReadableStreamGetReaderOptions, ) -> ReadableStreamBYOBReader; #[doc = " The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)"] #[wasm_bindgen(method, catch, js_name = "getReader")] - pub fn try_get_reader( - this: &ReadableStream, + pub fn try_get_reader( + this: &ReadableStream, options: &ReadableStreamGetReaderOptions, ) -> Result; #[doc = " The **`pipeThrough()`** method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)"] #[wasm_bindgen(method, js_name = "pipeThrough")] - pub fn pipe_through(this: &ReadableStream, transform: &ReadableWritablePair) -> ReadableStream; + pub fn pipe_through( + this: &ReadableStream, + transform: &ReadableWritablePair, + ) -> ReadableStream; #[doc = " The **`pipeThrough()`** method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)"] #[wasm_bindgen(method, catch, js_name = "pipeThrough")] - pub fn try_pipe_through( - this: &ReadableStream, - transform: &ReadableWritablePair, - ) -> Result; + pub fn try_pipe_through( + this: &ReadableStream, + transform: &ReadableWritablePair, + ) -> Result, JsValue>; #[doc = " The **`pipeThrough()`** method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)"] #[wasm_bindgen(method, js_name = "pipeThrough")] - pub fn pipe_through_with_options( - this: &ReadableStream, - transform: &ReadableWritablePair, + pub fn pipe_through_with_options( + this: &ReadableStream, + transform: &ReadableWritablePair, options: &StreamPipeOptions, - ) -> ReadableStream; + ) -> ReadableStream; #[doc = " The **`pipeThrough()`** method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)"] #[wasm_bindgen(method, catch, js_name = "pipeThrough")] - pub fn try_pipe_through_with_options( - this: &ReadableStream, - transform: &ReadableWritablePair, + pub fn try_pipe_through_with_options< + R: ::wasm_bindgen::JsGeneric, + T: ::wasm_bindgen::JsGeneric, + >( + this: &ReadableStream, + transform: &ReadableWritablePair, options: &StreamPipeOptions, - ) -> Result; + ) -> Result, JsValue>; #[doc = " The **`pipeTo()`** method of the ReadableStream interface pipes the current `ReadableStream` to a given WritableStream and returns a Promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)"] #[wasm_bindgen(method, catch, js_name = "pipeTo")] - pub async fn pipe_to( - this: &ReadableStream, - destination: &WritableStream, + pub async fn pipe_to( + this: &ReadableStream, + destination: &WritableStream, ) -> Result; #[doc = " The **`pipeTo()`** method of the ReadableStream interface pipes the current `ReadableStream` to a given WritableStream and returns a Promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)"] #[wasm_bindgen(method, catch, js_name = "pipeTo")] - pub async fn pipe_to_with_options( - this: &ReadableStream, - destination: &WritableStream, + pub async fn pipe_to_with_options( + this: &ReadableStream, + destination: &WritableStream, options: &StreamPipeOptions, ) -> Result; #[doc = " The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)"] #[wasm_bindgen(method)] - pub fn tee(this: &ReadableStream) -> ArrayTuple<(ReadableStream, ReadableStream)>; + pub fn tee( + this: &ReadableStream, + ) -> ArrayTuple<(ReadableStream, ReadableStream)>; #[doc = " The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)"] #[wasm_bindgen(method, catch, js_name = "tee")] - pub fn try_tee( - this: &ReadableStream, - ) -> Result, JsValue>; + pub fn try_tee( + this: &ReadableStream, + ) -> Result, ReadableStream)>, JsValue>; #[wasm_bindgen(method)] - pub fn values(this: &ReadableStream) -> AsyncIterableIterator; + pub fn values(this: &ReadableStream) -> AsyncIterator; #[wasm_bindgen(method, catch, js_name = "values")] - pub fn try_values(this: &ReadableStream) -> Result; + pub fn try_values( + this: &ReadableStream, + ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "values")] - pub fn values_with_options( - this: &ReadableStream, + pub fn values_with_options( + this: &ReadableStream, options: &ReadableStreamValuesOptions, - ) -> AsyncIterableIterator; + ) -> AsyncIterator; #[wasm_bindgen(method, catch, js_name = "values")] - pub fn try_values_with_options( - this: &ReadableStream, + pub fn try_values_with_options( + this: &ReadableStream, options: &ReadableStreamValuesOptions, - ) -> Result; + ) -> Result, JsValue>; } #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type ReadableStreamDefaultReader; + pub type ReadableStreamDefaultReader; #[wasm_bindgen(constructor, catch)] pub fn new(stream: &ReadableStream) -> Result; #[wasm_bindgen(method, getter)] pub fn closed(this: &ReadableStreamDefaultReader) -> Promise; #[wasm_bindgen(method, catch)] - pub async fn cancel(this: &ReadableStreamDefaultReader) -> Result; + pub async fn cancel( + this: &ReadableStreamDefaultReader, + ) -> Result; #[wasm_bindgen(method, catch, js_name = "cancel")] - pub async fn cancel_with_reason( - this: &ReadableStreamDefaultReader, + pub async fn cancel_with_reason( + this: &ReadableStreamDefaultReader, reason: &JsValue, ) -> Result; #[doc = " The **`read()`** method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read)"] #[wasm_bindgen(method, catch)] - pub async fn read( - this: &ReadableStreamDefaultReader, + pub async fn read( + this: &ReadableStreamDefaultReader, ) -> Result; #[doc = " The **`releaseLock()`** method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock)"] #[wasm_bindgen(method, js_name = "releaseLock")] - pub fn release_lock(this: &ReadableStreamDefaultReader); + pub fn release_lock(this: &ReadableStreamDefaultReader); #[doc = " The **`releaseLock()`** method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock)"] #[wasm_bindgen(method, catch, js_name = "releaseLock")] - pub fn try_release_lock(this: &ReadableStreamDefaultReader) -> Result<(), JsValue>; + pub fn try_release_lock( + this: &ReadableStreamDefaultReader, + ) -> Result<(), JsValue>; } #[wasm_bindgen] extern "C" { @@ -10946,7 +11232,7 @@ extern "C" { #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)"] #[wasm_bindgen(method, catch)] - pub async fn read( + pub async fn read( this: &ReadableStreamBYOBReader, view: &T, ) -> Result; @@ -10961,7 +11247,7 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "releaseLock")] pub fn try_release_lock(this: &ReadableStreamBYOBReader) -> Result<(), JsValue>; #[wasm_bindgen(method, catch, js_name = "readAtLeast")] - pub async fn read_at_least( + pub async fn read_at_least( this: &ReadableStreamBYOBReader, min_elements: f64, view: &T, @@ -11094,7 +11380,7 @@ extern "C" { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type ReadableStreamDefaultController; + pub type ReadableStreamDefaultController; #[doc = " The **`desiredSize`** read-only property of the required to fill the stream's internal queue."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)"] @@ -11104,46 +11390,56 @@ extern "C" { #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close)"] #[wasm_bindgen(method)] - pub fn close(this: &ReadableStreamDefaultController); + pub fn close(this: &ReadableStreamDefaultController); #[doc = " The **`close()`** method of the ReadableStreamDefaultController interface closes the associated stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close)"] #[wasm_bindgen(method, catch, js_name = "close")] - pub fn try_close(this: &ReadableStreamDefaultController) -> Result<(), JsValue>; + pub fn try_close( + this: &ReadableStreamDefaultController, + ) -> Result<(), JsValue>; #[doc = " The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)"] #[wasm_bindgen(method)] - pub fn enqueue(this: &ReadableStreamDefaultController); + pub fn enqueue(this: &ReadableStreamDefaultController); #[doc = " The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)"] #[wasm_bindgen(method, catch, js_name = "enqueue")] - pub fn try_enqueue(this: &ReadableStreamDefaultController) -> Result<(), JsValue>; + pub fn try_enqueue( + this: &ReadableStreamDefaultController, + ) -> Result<(), JsValue>; #[doc = " The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)"] #[wasm_bindgen(method, js_name = "enqueue")] - pub fn enqueue_with_chunk(this: &ReadableStreamDefaultController, chunk: &R); + pub fn enqueue_with_chunk( + this: &ReadableStreamDefaultController, + chunk: &R, + ); #[doc = " The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)"] #[wasm_bindgen(method, catch, js_name = "enqueue")] - pub fn try_enqueue_with_chunk( - this: &ReadableStreamDefaultController, + pub fn try_enqueue_with_chunk( + this: &ReadableStreamDefaultController, chunk: &R, ) -> Result<(), JsValue>; #[doc = " The **`error()`** method of the with the associated stream to error."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)"] #[wasm_bindgen(method)] - pub fn error(this: &ReadableStreamDefaultController, reason: &JsValue); + pub fn error( + this: &ReadableStreamDefaultController, + reason: &JsValue, + ); #[doc = " The **`error()`** method of the with the associated stream to error."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)"] #[wasm_bindgen(method, catch, js_name = "error")] - pub fn try_error( - this: &ReadableStreamDefaultController, + pub fn try_error( + this: &ReadableStreamDefaultController, reason: &JsValue, ) -> Result<(), JsValue>; } @@ -11247,7 +11543,7 @@ extern "C" { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type TransformStreamDefaultController; + pub type TransformStreamDefaultController; #[doc = " The **`desiredSize`** read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize)"] @@ -11257,65 +11553,75 @@ extern "C" { #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)"] #[wasm_bindgen(method)] - pub fn enqueue(this: &TransformStreamDefaultController); + pub fn enqueue(this: &TransformStreamDefaultController); #[doc = " The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)"] #[wasm_bindgen(method, catch, js_name = "enqueue")] - pub fn try_enqueue(this: &TransformStreamDefaultController) -> Result<(), JsValue>; + pub fn try_enqueue( + this: &TransformStreamDefaultController, + ) -> Result<(), JsValue>; #[doc = " The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)"] #[wasm_bindgen(method, js_name = "enqueue")] - pub fn enqueue_with_chunk(this: &TransformStreamDefaultController, chunk: &O); + pub fn enqueue_with_chunk( + this: &TransformStreamDefaultController, + chunk: &O, + ); #[doc = " The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)"] #[wasm_bindgen(method, catch, js_name = "enqueue")] - pub fn try_enqueue_with_chunk( - this: &TransformStreamDefaultController, + pub fn try_enqueue_with_chunk( + this: &TransformStreamDefaultController, chunk: &O, ) -> Result<(), JsValue>; #[doc = " The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)"] #[wasm_bindgen(method)] - pub fn error(this: &TransformStreamDefaultController, reason: &JsValue); + pub fn error( + this: &TransformStreamDefaultController, + reason: &JsValue, + ); #[doc = " The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)"] #[wasm_bindgen(method, catch, js_name = "error")] - pub fn try_error( - this: &TransformStreamDefaultController, + pub fn try_error( + this: &TransformStreamDefaultController, reason: &JsValue, ) -> Result<(), JsValue>; #[doc = " The **`terminate()`** method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate)"] #[wasm_bindgen(method)] - pub fn terminate(this: &TransformStreamDefaultController); + pub fn terminate(this: &TransformStreamDefaultController); #[doc = " The **`terminate()`** method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate)"] #[wasm_bindgen(method, catch, js_name = "terminate")] - pub fn try_terminate(this: &TransformStreamDefaultController) -> Result<(), JsValue>; + pub fn try_terminate( + this: &TransformStreamDefaultController, + ) -> Result<(), JsValue>; } #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type ReadableWritablePair; + pub type ReadableWritablePair; #[wasm_bindgen(method, getter)] - pub fn readable(this: &ReadableWritablePair) -> ReadableStream; + pub fn readable(this: &ReadableWritablePair) -> ReadableStream; #[wasm_bindgen(method, setter)] - pub fn set_readable(this: &ReadableWritablePair, val: &ReadableStream); + pub fn set_readable(this: &ReadableWritablePair, val: &ReadableStream); #[doc = " Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use."] #[doc = ""] #[doc = " Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader."] #[wasm_bindgen(method, getter)] - pub fn writable(this: &ReadableWritablePair) -> WritableStream; + pub fn writable(this: &ReadableWritablePair) -> WritableStream; #[wasm_bindgen(method, setter)] - pub fn set_writable(this: &ReadableWritablePair, val: &WritableStream); + pub fn set_writable(this: &ReadableWritablePair, val: &WritableStream); } impl ReadableWritablePair { #[doc = " ## Arguments"] @@ -11324,7 +11630,7 @@ impl ReadableWritablePair { #[doc = " * `writable` - Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use."] #[doc = ""] #[doc = " Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader."] - pub fn new(readable: &ReadableStream, writable: &WritableStream) -> ReadableWritablePair { + pub fn new(readable: &ReadableStream, writable: &WritableStream) -> ReadableWritablePair { Self::builder(readable, writable).build() } #[doc = " ## Arguments"] @@ -11334,8 +11640,8 @@ impl ReadableWritablePair { #[doc = ""] #[doc = " Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader."] pub fn builder( - readable: &ReadableStream, - writable: &WritableStream, + readable: &ReadableStream, + writable: &WritableStream, ) -> ReadableWritablePairBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_readable(readable); @@ -11355,7 +11661,7 @@ impl ReadableWritablePairBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type WritableStream; + pub type WritableStream; #[wasm_bindgen(constructor, catch)] pub fn new() -> Result; #[wasm_bindgen(constructor, catch, js_name = "WritableStream")] @@ -11376,36 +11682,44 @@ extern "C" { #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)"] #[wasm_bindgen(method, catch)] - pub async fn abort(this: &WritableStream) -> Result; + pub async fn abort( + this: &WritableStream, + ) -> Result; #[doc = " The **`abort()`** method of the WritableStream interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)"] #[wasm_bindgen(method, catch, js_name = "abort")] - pub async fn abort_with_reason( - this: &WritableStream, + pub async fn abort_with_reason( + this: &WritableStream, reason: &JsValue, ) -> Result; #[doc = " The **`close()`** method of the WritableStream interface closes the associated stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)"] #[wasm_bindgen(method, catch)] - pub async fn close(this: &WritableStream) -> Result; + pub async fn close( + this: &WritableStream, + ) -> Result; #[doc = " The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)"] #[wasm_bindgen(method, js_name = "getWriter")] - pub fn get_writer(this: &WritableStream) -> WritableStreamDefaultWriter; + pub fn get_writer( + this: &WritableStream, + ) -> WritableStreamDefaultWriter; #[doc = " The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)"] #[wasm_bindgen(method, catch, js_name = "getWriter")] - pub fn try_get_writer(this: &WritableStream) -> Result; + pub fn try_get_writer( + this: &WritableStream, + ) -> Result, JsValue>; } #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type WritableStreamDefaultWriter; + pub type WritableStreamDefaultWriter; #[wasm_bindgen(constructor, catch)] pub fn new(stream: &WritableStream) -> Result; #[doc = " The **`closed`** read-only property of the the stream errors or the writer's lock is released."] @@ -11427,74 +11741,84 @@ extern "C" { #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)"] #[wasm_bindgen(method, catch)] - pub async fn abort(this: &WritableStreamDefaultWriter) -> Result; + pub async fn abort( + this: &WritableStreamDefaultWriter, + ) -> Result; #[doc = " The **`abort()`** method of the the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)"] #[wasm_bindgen(method, catch, js_name = "abort")] - pub async fn abort_with_reason( - this: &WritableStreamDefaultWriter, + pub async fn abort_with_reason( + this: &WritableStreamDefaultWriter, reason: &JsValue, ) -> Result; #[doc = " The **`close()`** method of the stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)"] #[wasm_bindgen(method, catch)] - pub async fn close(this: &WritableStreamDefaultWriter) -> Result; + pub async fn close( + this: &WritableStreamDefaultWriter, + ) -> Result; #[doc = " The **`write()`** method of the operation."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)"] #[wasm_bindgen(method, catch)] - pub async fn write(this: &WritableStreamDefaultWriter) -> Result; + pub async fn write( + this: &WritableStreamDefaultWriter, + ) -> Result; #[doc = " The **`write()`** method of the operation."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)"] #[wasm_bindgen(method, catch, js_name = "write")] - pub async fn write_with_chunk( - this: &WritableStreamDefaultWriter, + pub async fn write_with_chunk( + this: &WritableStreamDefaultWriter, chunk: &W, ) -> Result; #[doc = " The **`releaseLock()`** method of the corresponding stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)"] #[wasm_bindgen(method, js_name = "releaseLock")] - pub fn release_lock(this: &WritableStreamDefaultWriter); + pub fn release_lock(this: &WritableStreamDefaultWriter); #[doc = " The **`releaseLock()`** method of the corresponding stream."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)"] #[wasm_bindgen(method, catch, js_name = "releaseLock")] - pub fn try_release_lock(this: &WritableStreamDefaultWriter) -> Result<(), JsValue>; + pub fn try_release_lock( + this: &WritableStreamDefaultWriter, + ) -> Result<(), JsValue>; } #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type TransformStream; + pub type TransformStream; #[wasm_bindgen(constructor, catch)] pub fn new() -> Result; #[wasm_bindgen(constructor, catch, js_name = "TransformStream")] - pub fn new_with_transformer(transformer: &Transformer) -> Result; + pub fn new_with_transformer( + transformer: &Transformer, + ) -> Result; #[wasm_bindgen(constructor, catch, js_name = "TransformStream")] pub fn new_with_transformer_and_writable_strategy( - transformer: &Transformer, - writable_strategy: &QueuingStrategy, + transformer: &Transformer, + writable_strategy: &QueuingStrategy, ) -> Result; #[wasm_bindgen(constructor, catch, js_name = "TransformStream")] pub fn new_with_transformer_and_writable_strategy_and_readable_strategy( - transformer: &Transformer, - writable_strategy: &QueuingStrategy, - readable_strategy: &QueuingStrategy, + transformer: &Transformer, + writable_strategy: &QueuingStrategy, + readable_strategy: &QueuingStrategy, ) -> Result; #[doc = " The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this `TransformStream`."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)"] #[wasm_bindgen(method, getter)] - pub fn readable(this: &TransformStream) -> ReadableStream; + pub fn readable(this: &TransformStream) -> ReadableStream; #[doc = " The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this `TransformStream`."] #[doc = ""] #[doc = " [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)"] #[wasm_bindgen(method, getter)] - pub fn writable(this: &TransformStream) -> WritableStream; + pub fn writable(this: &TransformStream) -> WritableStream; } #[wasm_bindgen] extern "C" { @@ -11611,7 +11935,7 @@ extern "C" { #[wasm_bindgen(constructor, catch, js_name = "CompressionStream")] pub fn new_with_js_value(format: &str) -> Result; #[wasm_bindgen(constructor, catch, js_name = "CompressionStream")] - pub fn new_with_js_value_1(format: &str) -> Result; + pub fn new_with_js_value_2(format: &str) -> Result; } #[wasm_bindgen] extern "C" { @@ -11623,7 +11947,7 @@ extern "C" { #[wasm_bindgen(constructor, catch, js_name = "DecompressionStream")] pub fn new_with_js_value(format: &str) -> Result; #[wasm_bindgen(constructor, catch, js_name = "DecompressionStream")] - pub fn new_with_js_value_1(format: &str) -> Result; + pub fn new_with_js_value_2(format: &str) -> Result; } #[wasm_bindgen] extern "C" { @@ -12450,7 +12774,7 @@ extern "C" { #[wasm_bindgen(constructor, catch)] pub fn new() -> Result; #[wasm_bindgen(constructor, catch, js_name = "URLSearchParams")] - pub fn new_with_js_value(init: &Iterable) -> Result; + pub fn new_with_iterable(init: &JsValue) -> Result; #[wasm_bindgen(constructor, catch, js_name = "URLSearchParams")] pub fn new_with_record(init: &Object) -> Result; #[wasm_bindgen(constructor, catch, js_name = "URLSearchParams")] @@ -12559,17 +12883,19 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "sort")] pub fn try_sort(this: &URLSearchParams) -> Result<(), JsValue>; #[wasm_bindgen(method)] - pub fn entries(this: &URLSearchParams) -> IterableIterator; + pub fn entries(this: &URLSearchParams) -> Iterator>; #[wasm_bindgen(method, catch, js_name = "entries")] - pub fn try_entries(this: &URLSearchParams) -> Result; + pub fn try_entries( + this: &URLSearchParams, + ) -> Result>, JsValue>; #[wasm_bindgen(method)] - pub fn keys(this: &URLSearchParams) -> IterableIterator; + pub fn keys(this: &URLSearchParams) -> Iterator; #[wasm_bindgen(method, catch, js_name = "keys")] - pub fn try_keys(this: &URLSearchParams) -> Result; + pub fn try_keys(this: &URLSearchParams) -> Result, JsValue>; #[wasm_bindgen(method)] - pub fn values(this: &URLSearchParams) -> IterableIterator; + pub fn values(this: &URLSearchParams) -> Iterator; #[wasm_bindgen(method, catch, js_name = "values")] - pub fn try_values(this: &URLSearchParams) -> Result; + pub fn try_values(this: &URLSearchParams) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "forEach")] pub fn for_each( this: &URLSearchParams, @@ -12581,13 +12907,13 @@ extern "C" { callback: &Function Undefined>, ) -> Result<(), JsValue>; #[wasm_bindgen(method, js_name = "forEach")] - pub fn for_each_with_this_arg( + pub fn for_each_with_this_arg( this: &URLSearchParams, callback: &Function Undefined>, this_arg: &This, ); #[wasm_bindgen(method, catch, js_name = "forEach")] - pub fn try_for_each_with_this_arg( + pub fn try_for_each_with_this_arg( this: &URLSearchParams, callback: &Function Undefined>, this_arg: &This, @@ -13373,13 +13699,17 @@ extern "C" { #[derive(Debug, Clone, PartialEq, Eq)] pub type SqlStorage; #[wasm_bindgen(method, variadic)] - pub fn exec(this: &SqlStorage, query: &str, bindings: &[JsValue]) -> SqlStorageCursor; + pub fn exec( + this: &SqlStorage, + query: &str, + bindings: &[JsValue], + ) -> SqlStorageCursor; #[wasm_bindgen(method, variadic, catch, js_name = "exec")] - pub fn try_exec( + pub fn try_exec( this: &SqlStorage, query: &str, bindings: &[JsValue], - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method, getter, js_name = "databaseSize")] pub fn database_size(this: &SqlStorage) -> f64; #[wasm_bindgen(method, getter, js_name = "Cursor")] @@ -13403,23 +13733,31 @@ pub type SqlStorageValue = JsValue; extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type SqlStorageCursor; + pub type SqlStorageCursor; #[wasm_bindgen(method)] - pub fn next(this: &SqlStorageCursor) -> JsValue; + pub fn next(this: &SqlStorageCursor) -> JsValue; #[wasm_bindgen(method, catch, js_name = "next")] - pub fn try_next(this: &SqlStorageCursor) -> Result; + pub fn try_next( + this: &SqlStorageCursor, + ) -> Result; #[wasm_bindgen(method, js_name = "toArray")] - pub fn to_array(this: &SqlStorageCursor) -> Array; + pub fn to_array(this: &SqlStorageCursor) -> Array; #[wasm_bindgen(method, catch, js_name = "toArray")] - pub fn try_to_array(this: &SqlStorageCursor) -> Result, JsValue>; + pub fn try_to_array( + this: &SqlStorageCursor, + ) -> Result, JsValue>; #[wasm_bindgen(method)] - pub fn one(this: &SqlStorageCursor) -> T; + pub fn one(this: &SqlStorageCursor) -> T; #[wasm_bindgen(method, catch, js_name = "one")] - pub fn try_one(this: &SqlStorageCursor) -> Result; + pub fn try_one(this: &SqlStorageCursor) -> Result; #[wasm_bindgen(method)] - pub fn raw(this: &SqlStorageCursor) -> IterableIterator; + pub fn raw( + this: &SqlStorageCursor, + ) -> Iterator; #[wasm_bindgen(method, catch, js_name = "raw")] - pub fn try_raw(this: &SqlStorageCursor) -> Result; + pub fn try_raw( + this: &SqlStorageCursor, + ) -> Result, JsValue>; #[wasm_bindgen(method, getter, js_name = "columnNames")] pub fn column_names(this: &SqlStorageCursor) -> Array; #[wasm_bindgen(method, setter, js_name = "columnNames")] @@ -13991,41 +14329,69 @@ impl MessagePortPostMessageOptionsBuilder { } } #[allow(dead_code)] -pub type LoopbackForExport = JsValue; +pub type LoopbackForExport = JsValue; #[allow(dead_code)] -pub type LoopbackServiceStub = JsValue; +pub type LoopbackServiceStub = JsValue; #[allow(dead_code)] -pub type LoopbackDurableObjectClass = JsValue; +pub type LoopbackDurableObjectClass = JsValue; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] pub type SyncKvStorage; #[wasm_bindgen(method)] - pub fn get(this: &SyncKvStorage, key: &str) -> Option; + pub fn get(this: &SyncKvStorage, key: &str) -> Option; #[wasm_bindgen(method, catch, js_name = "get")] - pub fn try_get(this: &SyncKvStorage, key: &str) -> Result, JsValue>; + pub fn try_get( + this: &SyncKvStorage, + key: &str, + ) -> Result, JsValue>; #[wasm_bindgen(method)] - pub fn list(this: &SyncKvStorage) -> Iterable; + pub fn list(this: &SyncKvStorage) -> SyncKvStorageList; #[wasm_bindgen(method, catch, js_name = "list")] - pub fn try_list(this: &SyncKvStorage) -> Result; + pub fn try_list( + this: &SyncKvStorage, + ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "list")] - pub fn list_with_options(this: &SyncKvStorage, options: &SyncKvListOptions) -> Iterable; + pub fn list_with_options( + this: &SyncKvStorage, + options: &SyncKvListOptions, + ) -> SyncKvStorageList; #[wasm_bindgen(method, catch, js_name = "list")] - pub fn try_list_with_options( + pub fn try_list_with_options( this: &SyncKvStorage, options: &SyncKvListOptions, - ) -> Result; + ) -> Result, JsValue>; #[wasm_bindgen(method)] - pub fn put(this: &SyncKvStorage, key: &str, value: &T); + pub fn put(this: &SyncKvStorage, key: &str, value: &T); #[wasm_bindgen(method, catch, js_name = "put")] - pub fn try_put(this: &SyncKvStorage, key: &str, value: &T) -> Result<(), JsValue>; + pub fn try_put( + this: &SyncKvStorage, + key: &str, + value: &T, + ) -> Result<(), JsValue>; #[wasm_bindgen(method)] pub fn delete(this: &SyncKvStorage, key: &str) -> bool; #[wasm_bindgen(method, catch, js_name = "delete")] pub fn try_delete(this: &SyncKvStorage, key: &str) -> Result; } #[wasm_bindgen] +extern "C" { + # [wasm_bindgen (extends = Object)] + #[derive(Debug, Clone, PartialEq, Eq)] + pub type SyncKvStorageList; + #[doc = " Conformance to the JS iteration protocol — returns the underlying iterator."] + #[wasm_bindgen(method, js_name = "[Symbol.iterator]")] + pub fn iterator( + this: &SyncKvStorageList, + ) -> Iterator>; + #[doc = " Conformance to the JS iteration protocol — returns the underlying iterator."] + #[wasm_bindgen(method, catch, js_name = "[Symbol.iterator]")] + pub fn try_iterator( + this: &SyncKvStorageList, + ) -> Result>, JsValue>; +} +#[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] @@ -14103,25 +14469,33 @@ extern "C" { #[derive(Debug, Clone, PartialEq, Eq)] pub type WorkerStub; #[wasm_bindgen(method, js_name = "getEntrypoint")] - pub fn get_entrypoint(this: &WorkerStub) -> Fetcher; + pub fn get_entrypoint(this: &WorkerStub) -> Fetcher; #[wasm_bindgen(method, catch, js_name = "getEntrypoint")] - pub fn try_get_entrypoint(this: &WorkerStub) -> Result; + pub fn try_get_entrypoint( + this: &WorkerStub, + ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "getEntrypoint")] - pub fn get_entrypoint_with_name(this: &WorkerStub, name: &str) -> Fetcher; + pub fn get_entrypoint_with_name( + this: &WorkerStub, + name: &str, + ) -> Fetcher; #[wasm_bindgen(method, catch, js_name = "getEntrypoint")] - pub fn try_get_entrypoint_with_name(this: &WorkerStub, name: &str) -> Result; + pub fn try_get_entrypoint_with_name( + this: &WorkerStub, + name: &str, + ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "getEntrypoint")] - pub fn get_entrypoint_with_name_and_options( + pub fn get_entrypoint_with_name_and_options( this: &WorkerStub, name: &str, options: &WorkerStubEntrypointOptions, - ) -> Fetcher; + ) -> Fetcher; #[wasm_bindgen(method, catch, js_name = "getEntrypoint")] - pub fn try_get_entrypoint_with_name_and_options( + pub fn try_get_entrypoint_with_name_and_options( this: &WorkerStub, name: &str, options: &WorkerStubEntrypointOptions, - ) -> Result; + ) -> Result, JsValue>; } #[wasm_bindgen] extern "C" { @@ -15819,11 +16193,11 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "role")] pub fn set_role_with_js_value(this: &RoleScopedChatInput, val: &str); #[wasm_bindgen(method, setter, js_name = "role")] - pub fn set_role_with_js_value_1(this: &RoleScopedChatInput, val: &str); - #[wasm_bindgen(method, setter, js_name = "role")] pub fn set_role_with_js_value_2(this: &RoleScopedChatInput, val: &str); #[wasm_bindgen(method, setter, js_name = "role")] - pub fn set_role_with_js_value_3(this: &RoleScopedChatInput, val: &JsValue); + pub fn set_role_with_js_value_3(this: &RoleScopedChatInput, val: &str); + #[wasm_bindgen(method, setter, js_name = "role")] + pub fn set_role_with_js_value_4(this: &RoleScopedChatInput, val: &JsValue); #[wasm_bindgen(method, getter)] pub fn content(this: &RoleScopedChatInput) -> String; #[wasm_bindgen(method, setter)] @@ -15916,7 +16290,7 @@ impl RoleScopedChatInput { #[doc = " * `content`"] pub fn builder_system(content: &str) -> RoleScopedChatInputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_role_with_js_value_1("system"); + inner.set_role_with_js_value_2("system"); inner.set_content(content); RoleScopedChatInputBuilder { inner } } @@ -15929,7 +16303,7 @@ impl RoleScopedChatInput { #[doc = " * `content`"] pub fn builder_tool(content: &str) -> RoleScopedChatInputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_role_with_js_value_2("tool"); + inner.set_role_with_js_value_3("tool"); inner.set_content(content); RoleScopedChatInputBuilder { inner } } @@ -15939,7 +16313,7 @@ impl RoleScopedChatInput { #[doc = " * `content`"] pub fn builder(role: &JsValue, content: &str) -> RoleScopedChatInputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_role_with_js_value_3(role); + inner.set_role_with_js_value_4(role); inner.set_content(content); RoleScopedChatInputBuilder { inner } } @@ -16698,7 +17072,7 @@ impl AiTextToImageInputBuilder { } } #[allow(dead_code)] -pub type AiTextToImageOutput = ReadableStream; +pub type AiTextToImageOutput = ReadableStream; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] @@ -16709,9 +17083,9 @@ extern "C" { #[wasm_bindgen(method, setter)] pub fn set_inputs(this: &BaseAiTextToImage, val: &AiTextToImageInput); #[wasm_bindgen(method, getter, js_name = "postProcessedOutputs")] - pub fn post_processed_outputs(this: &BaseAiTextToImage) -> ReadableStream; + pub fn post_processed_outputs(this: &BaseAiTextToImage) -> ReadableStream; #[wasm_bindgen(method, setter, js_name = "postProcessedOutputs")] - pub fn set_post_processed_outputs(this: &BaseAiTextToImage, val: &ReadableStream); + pub fn set_post_processed_outputs(this: &BaseAiTextToImage, val: &ReadableStream); } #[wasm_bindgen] extern "C" { @@ -16887,12 +17261,12 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "service_tier")] pub fn set_service_tier_with_js_value(this: &ResponsesInput, val: &str); #[wasm_bindgen(method, setter, js_name = "service_tier")] - pub fn set_service_tier_with_js_value_1(this: &ResponsesInput, val: &str); - #[wasm_bindgen(method, setter, js_name = "service_tier")] pub fn set_service_tier_with_js_value_2(this: &ResponsesInput, val: &str); #[wasm_bindgen(method, setter, js_name = "service_tier")] pub fn set_service_tier_with_js_value_3(this: &ResponsesInput, val: &str); #[wasm_bindgen(method, setter, js_name = "service_tier")] + pub fn set_service_tier_with_js_value_4(this: &ResponsesInput, val: &str); + #[wasm_bindgen(method, setter, js_name = "service_tier")] pub fn set_service_tier_with_null(this: &ResponsesInput, val: &Null); #[wasm_bindgen(method, getter)] pub fn stream(this: &ResponsesInput) -> Option; @@ -17054,10 +17428,6 @@ impl ResponsesInputBuilder { self.inner.set_service_tier_with_js_value(val); self } - pub fn service_tier_with_js_value_1(self, val: &str) -> Self { - self.inner.set_service_tier_with_js_value_1(val); - self - } pub fn service_tier_with_js_value_2(self, val: &str) -> Self { self.inner.set_service_tier_with_js_value_2(val); self @@ -17066,6 +17436,10 @@ impl ResponsesInputBuilder { self.inner.set_service_tier_with_js_value_3(val); self } + pub fn service_tier_with_js_value_4(self, val: &str) -> Self { + self.inner.set_service_tier_with_js_value_4(val); + self + } pub fn service_tier_with_null(self, val: &Null) -> Self { self.inner.set_service_tier_with_null(val); self @@ -17243,12 +17617,12 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "service_tier")] pub fn set_service_tier_with_js_value(this: &ResponsesOutput, val: &str); #[wasm_bindgen(method, setter, js_name = "service_tier")] - pub fn set_service_tier_with_js_value_1(this: &ResponsesOutput, val: &str); - #[wasm_bindgen(method, setter, js_name = "service_tier")] pub fn set_service_tier_with_js_value_2(this: &ResponsesOutput, val: &str); #[wasm_bindgen(method, setter, js_name = "service_tier")] pub fn set_service_tier_with_js_value_3(this: &ResponsesOutput, val: &str); #[wasm_bindgen(method, setter, js_name = "service_tier")] + pub fn set_service_tier_with_js_value_4(this: &ResponsesOutput, val: &str); + #[wasm_bindgen(method, setter, js_name = "service_tier")] pub fn set_service_tier_with_null(this: &ResponsesOutput, val: &Null); #[wasm_bindgen(method, getter)] pub fn status(this: &ResponsesOutput) -> Option; @@ -17409,10 +17783,6 @@ impl ResponsesOutputBuilder { self.inner.set_service_tier_with_js_value(val); self } - pub fn service_tier_with_js_value_1(self, val: &str) -> Self { - self.inner.set_service_tier_with_js_value_1(val); - self - } pub fn service_tier_with_js_value_2(self, val: &str) -> Self { self.inner.set_service_tier_with_js_value_2(val); self @@ -17421,6 +17791,10 @@ impl ResponsesOutputBuilder { self.inner.set_service_tier_with_js_value_3(val); self } + pub fn service_tier_with_js_value_4(self, val: &str) -> Self { + self.inner.set_service_tier_with_js_value_4(val); + self + } pub fn service_tier_with_null(self, val: &Null) -> Self { self.inner.set_service_tier_with_null(val); self @@ -17471,9 +17845,9 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "role")] pub fn set_role_with_js_value(this: &EasyInputMessage, val: &str); #[wasm_bindgen(method, setter, js_name = "role")] - pub fn set_role_with_js_value_1(this: &EasyInputMessage, val: &str); - #[wasm_bindgen(method, setter, js_name = "role")] pub fn set_role_with_js_value_2(this: &EasyInputMessage, val: &str); + #[wasm_bindgen(method, setter, js_name = "role")] + pub fn set_role_with_js_value_3(this: &EasyInputMessage, val: &str); #[wasm_bindgen(method, getter)] pub fn r#type(this: &EasyInputMessage) -> Option; #[wasm_bindgen(method, setter)] @@ -17602,7 +17976,7 @@ impl EasyInputMessage { pub fn builder_system(content: &str) -> EasyInputMessageBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_content(content); - inner.set_role_with_js_value_1("system"); + inner.set_role_with_js_value_2("system"); EasyInputMessageBuilder { inner } } #[doc = " ## Inlined fields"] @@ -17615,7 +17989,7 @@ impl EasyInputMessage { pub fn builder_developer(content: &str) -> EasyInputMessageBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_content(content); - inner.set_role_with_js_value_2("developer"); + inner.set_role_with_js_value_3("developer"); EasyInputMessageBuilder { inner } } #[doc = " ## Inlined fields"] @@ -17660,7 +18034,7 @@ impl EasyInputMessage { ) -> EasyInputMessageBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_content(content); - inner.set_role_with_js_value_1("system"); + inner.set_role_with_js_value_2("system"); EasyInputMessageBuilder { inner } } #[doc = " ## Inlined fields"] @@ -17675,7 +18049,7 @@ impl EasyInputMessage { ) -> EasyInputMessageBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_content(content); - inner.set_role_with_js_value_2("developer"); + inner.set_role_with_js_value_3("developer"); EasyInputMessageBuilder { inner } } } @@ -17890,10 +18264,10 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "effort")] pub fn set_effort_with_js_value(this: &Reasoning, val: &str); #[wasm_bindgen(method, setter, js_name = "effort")] - pub fn set_effort_with_js_value_1(this: &Reasoning, val: &str); - #[wasm_bindgen(method, setter, js_name = "effort")] pub fn set_effort_with_js_value_2(this: &Reasoning, val: &str); #[wasm_bindgen(method, setter, js_name = "effort")] + pub fn set_effort_with_js_value_3(this: &Reasoning, val: &str); + #[wasm_bindgen(method, setter, js_name = "effort")] pub fn set_effort_with_null(this: &Reasoning, val: &Null); #[wasm_bindgen(method, getter)] pub fn generate_summary(this: &Reasoning) -> Option; @@ -17902,7 +18276,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "generate_summary")] pub fn set_generate_summary_with_js_value(this: &Reasoning, val: &str); #[wasm_bindgen(method, setter, js_name = "generate_summary")] - pub fn set_generate_summary_with_js_value_1(this: &Reasoning, val: &str); + pub fn set_generate_summary_with_js_value_2(this: &Reasoning, val: &str); #[wasm_bindgen(method, setter, js_name = "generate_summary")] pub fn set_generate_summary_with_null(this: &Reasoning, val: &Null); #[wasm_bindgen(method, getter)] @@ -17912,7 +18286,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "summary")] pub fn set_summary_with_js_value(this: &Reasoning, val: &str); #[wasm_bindgen(method, setter, js_name = "summary")] - pub fn set_summary_with_js_value_1(this: &Reasoning, val: &str); + pub fn set_summary_with_js_value_2(this: &Reasoning, val: &str); #[wasm_bindgen(method, setter, js_name = "summary")] pub fn set_summary_with_null(this: &Reasoning, val: &Null); } @@ -17938,14 +18312,14 @@ impl ReasoningBuilder { self.inner.set_effort_with_js_value(val); self } - pub fn effort_with_js_value_1(self, val: &str) -> Self { - self.inner.set_effort_with_js_value_1(val); - self - } pub fn effort_with_js_value_2(self, val: &str) -> Self { self.inner.set_effort_with_js_value_2(val); self } + pub fn effort_with_js_value_3(self, val: &str) -> Self { + self.inner.set_effort_with_js_value_3(val); + self + } pub fn effort_with_null(self, val: &Null) -> Self { self.inner.set_effort_with_null(val); self @@ -17958,8 +18332,8 @@ impl ReasoningBuilder { self.inner.set_generate_summary_with_js_value(val); self } - pub fn generate_summary_with_js_value_1(self, val: &str) -> Self { - self.inner.set_generate_summary_with_js_value_1(val); + pub fn generate_summary_with_js_value_2(self, val: &str) -> Self { + self.inner.set_generate_summary_with_js_value_2(val); self } pub fn generate_summary_with_null(self, val: &Null) -> Self { @@ -17974,8 +18348,8 @@ impl ReasoningBuilder { self.inner.set_summary_with_js_value(val); self } - pub fn summary_with_js_value_1(self, val: &str) -> Self { - self.inner.set_summary_with_js_value_1(val); + pub fn summary_with_js_value_2(self, val: &str) -> Self { + self.inner.set_summary_with_js_value_2(val); self } pub fn summary_with_null(self, val: &Null) -> Self { @@ -18240,8 +18614,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "code")] pub fn set_code_with_js_value(this: &ResponseError, val: &str); #[wasm_bindgen(method, setter, js_name = "code")] - pub fn set_code_with_js_value_1(this: &ResponseError, val: &str); - #[wasm_bindgen(method, setter, js_name = "code")] pub fn set_code_with_js_value_2(this: &ResponseError, val: &str); #[wasm_bindgen(method, setter, js_name = "code")] pub fn set_code_with_js_value_3(this: &ResponseError, val: &str); @@ -18271,6 +18643,8 @@ extern "C" { pub fn set_code_with_js_value_15(this: &ResponseError, val: &str); #[wasm_bindgen(method, setter, js_name = "code")] pub fn set_code_with_js_value_16(this: &ResponseError, val: &str); + #[wasm_bindgen(method, setter, js_name = "code")] + pub fn set_code_with_js_value_17(this: &ResponseError, val: &str); #[wasm_bindgen(method, getter)] pub fn message(this: &ResponseError) -> String; #[wasm_bindgen(method, setter)] @@ -18492,7 +18866,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_invalid_prompt(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_1("invalid_prompt"); + inner.set_code_with_js_value_2("invalid_prompt"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18505,7 +18879,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_vector_store_timeout(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_2("vector_store_timeout"); + inner.set_code_with_js_value_3("vector_store_timeout"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18518,7 +18892,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_invalid_image(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_3("invalid_image"); + inner.set_code_with_js_value_4("invalid_image"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18531,7 +18905,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_invalid_image_format(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_4("invalid_image_format"); + inner.set_code_with_js_value_5("invalid_image_format"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18544,7 +18918,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_invalid_base_64_image(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_5("invalid_base64_image"); + inner.set_code_with_js_value_6("invalid_base64_image"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18557,7 +18931,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_invalid_image_url(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_6("invalid_image_url"); + inner.set_code_with_js_value_7("invalid_image_url"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18570,7 +18944,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_image_too_large(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_7("image_too_large"); + inner.set_code_with_js_value_8("image_too_large"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18583,7 +18957,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_image_too_small(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_8("image_too_small"); + inner.set_code_with_js_value_9("image_too_small"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18596,7 +18970,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_image_parse_error(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_9("image_parse_error"); + inner.set_code_with_js_value_10("image_parse_error"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18609,7 +18983,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_image_content_policy_violation(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_10("image_content_policy_violation"); + inner.set_code_with_js_value_11("image_content_policy_violation"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18622,7 +18996,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_invalid_image_mode(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_11("invalid_image_mode"); + inner.set_code_with_js_value_12("invalid_image_mode"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18635,7 +19009,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_image_file_too_large(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_12("image_file_too_large"); + inner.set_code_with_js_value_13("image_file_too_large"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18648,7 +19022,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_unsupported_image_media_type(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_13("unsupported_image_media_type"); + inner.set_code_with_js_value_14("unsupported_image_media_type"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18661,7 +19035,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_empty_image_file(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_14("empty_image_file"); + inner.set_code_with_js_value_15("empty_image_file"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18674,7 +19048,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_failed_to_download_image(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_15("failed_to_download_image"); + inner.set_code_with_js_value_16("failed_to_download_image"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -18687,7 +19061,7 @@ impl ResponseError { #[doc = " * `message`"] pub fn builder_image_file_not_found(message: &str) -> ResponseErrorBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_code_with_js_value_16("image_file_not_found"); + inner.set_code_with_js_value_17("image_file_not_found"); inner.set_message(message); ResponseErrorBuilder { inner } } @@ -19202,7 +19576,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value(this: &ResponseFunctionToolCall, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] - pub fn set_status_with_js_value_1(this: &ResponseFunctionToolCall, val: &str); + pub fn set_status_with_js_value_2(this: &ResponseFunctionToolCall, val: &str); } impl ResponseFunctionToolCall { #[doc = " ## Inlined fields"] @@ -19259,8 +19633,8 @@ impl ResponseFunctionToolCallBuilder { self.inner.set_status_with_js_value(val); self } - pub fn status_with_js_value_1(self, val: &str) -> Self { - self.inner.set_status_with_js_value_1(val); + pub fn status_with_js_value_2(self, val: &str) -> Self { + self.inner.set_status_with_js_value_2(val); self } pub fn build(self) -> ResponseFunctionToolCall { @@ -19331,7 +19705,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value(this: &ResponseFunctionToolCallOutputItem, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] - pub fn set_status_with_js_value_1(this: &ResponseFunctionToolCallOutputItem, val: &str); + pub fn set_status_with_js_value_2(this: &ResponseFunctionToolCallOutputItem, val: &str); } impl ResponseFunctionToolCallOutputItem { #[doc = " ## Inlined fields"] @@ -19421,8 +19795,8 @@ impl ResponseFunctionToolCallOutputItemBuilder { self.inner.set_status_with_js_value(val); self } - pub fn status_with_js_value_1(self, val: &str) -> Self { - self.inner.set_status_with_js_value_1(val); + pub fn status_with_js_value_2(self, val: &str) -> Self { + self.inner.set_status_with_js_value_2(val); self } pub fn build(self) -> ResponseFunctionToolCallOutputItem { @@ -19513,7 +19887,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "detail")] pub fn set_detail_with_js_value(this: &ResponseInputImage, val: &str); #[wasm_bindgen(method, setter, js_name = "detail")] - pub fn set_detail_with_js_value_1(this: &ResponseInputImage, val: &str); + pub fn set_detail_with_js_value_2(this: &ResponseInputImage, val: &str); #[wasm_bindgen(method, getter)] pub fn r#type(this: &ResponseInputImage) -> String; #[wasm_bindgen(method, setter)] @@ -19574,7 +19948,7 @@ impl ResponseInputImage { #[doc = " * `type: \"input_image\"`"] pub fn builder_auto_input_image() -> ResponseInputImageBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_detail_with_js_value_1("auto"); + inner.set_detail_with_js_value_2("auto"); inner.set_type("input_image"); ResponseInputImageBuilder { inner } } @@ -19611,7 +19985,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "detail")] pub fn set_detail_with_js_value(this: &ResponseInputImageContent, val: &str); #[wasm_bindgen(method, setter, js_name = "detail")] - pub fn set_detail_with_js_value_1(this: &ResponseInputImageContent, val: &str); + pub fn set_detail_with_js_value_2(this: &ResponseInputImageContent, val: &str); #[wasm_bindgen(method, setter, js_name = "detail")] pub fn set_detail_with_null(this: &ResponseInputImageContent, val: &Null); #[doc = " Base64 encoded image"] @@ -19650,8 +20024,8 @@ impl ResponseInputImageContentBuilder { self.inner.set_detail_with_js_value(val); self } - pub fn detail_with_js_value_1(self, val: &str) -> Self { - self.inner.set_detail_with_js_value_1(val); + pub fn detail_with_js_value_2(self, val: &str) -> Self { + self.inner.set_detail_with_js_value_2(val); self } pub fn detail_with_null(self, val: &Null) -> Self { @@ -19704,7 +20078,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value(this: &ResponseInputItemFunctionCallOutput, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] - pub fn set_status_with_js_value_1(this: &ResponseInputItemFunctionCallOutput, val: &str); + pub fn set_status_with_js_value_2(this: &ResponseInputItemFunctionCallOutput, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_null(this: &ResponseInputItemFunctionCallOutput, val: &Null); } @@ -19797,8 +20171,8 @@ impl ResponseInputItemFunctionCallOutputBuilder { self.inner.set_status_with_js_value(val); self } - pub fn status_with_js_value_1(self, val: &str) -> Self { - self.inner.set_status_with_js_value_1(val); + pub fn status_with_js_value_2(self, val: &str) -> Self { + self.inner.set_status_with_js_value_2(val); self } pub fn status_with_null(self, val: &Null) -> Self { @@ -19825,7 +20199,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "role")] pub fn set_role_with_js_value(this: &ResponseInputItemMessage, val: &str); #[wasm_bindgen(method, setter, js_name = "role")] - pub fn set_role_with_js_value_1(this: &ResponseInputItemMessage, val: &str); + pub fn set_role_with_js_value_2(this: &ResponseInputItemMessage, val: &str); #[wasm_bindgen(method, getter)] pub fn status(this: &ResponseInputItemMessage) -> Option; #[wasm_bindgen(method, setter)] @@ -19833,7 +20207,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value(this: &ResponseInputItemMessage, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] - pub fn set_status_with_js_value_1(this: &ResponseInputItemMessage, val: &str); + pub fn set_status_with_js_value_2(this: &ResponseInputItemMessage, val: &str); #[wasm_bindgen(method, getter)] pub fn r#type(this: &ResponseInputItemMessage) -> Option; #[wasm_bindgen(method, setter)] @@ -19906,7 +20280,7 @@ impl ResponseInputItemMessage { pub fn builder_developer(content: &Array) -> ResponseInputItemMessageBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_content(content); - inner.set_role_with_js_value_1("developer"); + inner.set_role_with_js_value_2("developer"); ResponseInputItemMessageBuilder { inner } } } @@ -19922,8 +20296,8 @@ impl ResponseInputItemMessageBuilder { self.inner.set_status_with_js_value(val); self } - pub fn status_with_js_value_1(self, val: &str) -> Self { - self.inner.set_status_with_js_value_1(val); + pub fn status_with_js_value_2(self, val: &str) -> Self { + self.inner.set_status_with_js_value_2(val); self } pub fn r#type(self, val: &str) -> Self { @@ -19956,7 +20330,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "role")] pub fn set_role_with_js_value(this: &ResponseInputMessageItem, val: &str); #[wasm_bindgen(method, setter, js_name = "role")] - pub fn set_role_with_js_value_1(this: &ResponseInputMessageItem, val: &str); + pub fn set_role_with_js_value_2(this: &ResponseInputMessageItem, val: &str); #[wasm_bindgen(method, getter)] pub fn status(this: &ResponseInputMessageItem) -> Option; #[wasm_bindgen(method, setter)] @@ -19964,7 +20338,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value(this: &ResponseInputMessageItem, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] - pub fn set_status_with_js_value_1(this: &ResponseInputMessageItem, val: &str); + pub fn set_status_with_js_value_2(this: &ResponseInputMessageItem, val: &str); #[wasm_bindgen(method, getter)] pub fn r#type(this: &ResponseInputMessageItem) -> Option; #[wasm_bindgen(method, setter)] @@ -20046,7 +20420,7 @@ impl ResponseInputMessageItem { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_id(id); inner.set_content(content); - inner.set_role_with_js_value_1("developer"); + inner.set_role_with_js_value_2("developer"); ResponseInputMessageItemBuilder { inner } } } @@ -20062,8 +20436,8 @@ impl ResponseInputMessageItemBuilder { self.inner.set_status_with_js_value(val); self } - pub fn status_with_js_value_1(self, val: &str) -> Self { - self.inner.set_status_with_js_value_1(val); + pub fn status_with_js_value_2(self, val: &str) -> Self { + self.inner.set_status_with_js_value_2(val); self } pub fn r#type(self, val: &str) -> Self { @@ -20354,7 +20728,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value(this: &ResponseOutputMessage, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] - pub fn set_status_with_js_value_1(this: &ResponseOutputMessage, val: &str); + pub fn set_status_with_js_value_2(this: &ResponseOutputMessage, val: &str); #[wasm_bindgen(method, getter)] pub fn r#type(this: &ResponseOutputMessage) -> String; #[wasm_bindgen(method, setter)] @@ -20462,7 +20836,7 @@ impl ResponseOutputMessage { inner.set_id(id); inner.set_content(content); inner.set_role("assistant"); - inner.set_status_with_js_value_1("incomplete"); + inner.set_status_with_js_value_2("incomplete"); inner.set_type("message"); ResponseOutputMessageBuilder { inner } } @@ -20611,7 +20985,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value(this: &ResponseReasoningItem, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] - pub fn set_status_with_js_value_1(this: &ResponseReasoningItem, val: &str); + pub fn set_status_with_js_value_2(this: &ResponseReasoningItem, val: &str); } impl ResponseReasoningItem { #[doc = " ## Inlined fields"] @@ -20671,8 +21045,8 @@ impl ResponseReasoningItemBuilder { self.inner.set_status_with_js_value(val); self } - pub fn status_with_js_value_1(self, val: &str) -> Self { - self.inner.set_status_with_js_value_1(val); + pub fn status_with_js_value_2(self, val: &str) -> Self { + self.inner.set_status_with_js_value_2(val); self } pub fn build(self) -> ResponseReasoningItem { @@ -21253,7 +21627,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "verbosity")] pub fn set_verbosity_with_js_value(this: &ResponseTextConfig, val: &str); #[wasm_bindgen(method, setter, js_name = "verbosity")] - pub fn set_verbosity_with_js_value_1(this: &ResponseTextConfig, val: &str); + pub fn set_verbosity_with_js_value_2(this: &ResponseTextConfig, val: &str); #[wasm_bindgen(method, setter, js_name = "verbosity")] pub fn set_verbosity_with_null(this: &ResponseTextConfig, val: &Null); } @@ -21295,8 +21669,8 @@ impl ResponseTextConfigBuilder { self.inner.set_verbosity_with_js_value(val); self } - pub fn verbosity_with_js_value_1(self, val: &str) -> Self { - self.inner.set_verbosity_with_js_value_1(val); + pub fn verbosity_with_js_value_2(self, val: &str) -> Self { + self.inner.set_verbosity_with_js_value_2(val); self } pub fn verbosity_with_null(self, val: &Null) -> Self { @@ -28147,8 +28521,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value(this: &Ai_Cf_Deepgram_Nova_3_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] - pub fn set_encoding_with_js_value_1(this: &Ai_Cf_Deepgram_Nova_3_Input, val: &str); - #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_2(this: &Ai_Cf_Deepgram_Nova_3_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_3(this: &Ai_Cf_Deepgram_Nova_3_Input, val: &str); @@ -28158,6 +28530,8 @@ extern "C" { pub fn set_encoding_with_js_value_5(this: &Ai_Cf_Deepgram_Nova_3_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_6(this: &Ai_Cf_Deepgram_Nova_3_Input, val: &str); + #[wasm_bindgen(method, setter, js_name = "encoding")] + pub fn set_encoding_with_js_value_7(this: &Ai_Cf_Deepgram_Nova_3_Input, val: &str); #[doc = " Arbitrary key-value pairs that are attached to the API response for usage in downstream processing"] #[wasm_bindgen(method, getter)] pub fn extra(this: &Ai_Cf_Deepgram_Nova_3_Input) -> Option; @@ -28201,7 +28575,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "mode")] pub fn set_mode_with_js_value(this: &Ai_Cf_Deepgram_Nova_3_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "mode")] - pub fn set_mode_with_js_value_1(this: &Ai_Cf_Deepgram_Nova_3_Input, val: &str); + pub fn set_mode_with_js_value_2(this: &Ai_Cf_Deepgram_Nova_3_Input, val: &str); #[doc = " Transcribe each audio channel independently."] #[wasm_bindgen(method, getter)] pub fn multichannel(this: &Ai_Cf_Deepgram_Nova_3_Input) -> Option; @@ -28361,10 +28735,6 @@ impl Ai_Cf_Deepgram_Nova_3_InputBuilder { self.inner.set_encoding_with_js_value(val); self } - pub fn encoding_with_js_value_1(self, val: &str) -> Self { - self.inner.set_encoding_with_js_value_1(val); - self - } pub fn encoding_with_js_value_2(self, val: &str) -> Self { self.inner.set_encoding_with_js_value_2(val); self @@ -28385,6 +28755,10 @@ impl Ai_Cf_Deepgram_Nova_3_InputBuilder { self.inner.set_encoding_with_js_value_6(val); self } + pub fn encoding_with_js_value_7(self, val: &str) -> Self { + self.inner.set_encoding_with_js_value_7(val); + self + } pub fn extra(self, val: &str) -> Self { self.inner.set_extra(val); self @@ -28421,8 +28795,8 @@ impl Ai_Cf_Deepgram_Nova_3_InputBuilder { self.inner.set_mode_with_js_value(val); self } - pub fn mode_with_js_value_1(self, val: &str) -> Self { - self.inner.set_mode_with_js_value_1(val); + pub fn mode_with_js_value_2(self, val: &str) -> Self { + self.inner.set_mode_with_js_value_2(val); self } pub fn multichannel(self, val: bool) -> Self { @@ -28717,7 +29091,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "dtype")] pub fn set_dtype_with_js_value(this: &Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "dtype")] - pub fn set_dtype_with_js_value_1(this: &Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input, val: &str); + pub fn set_dtype_with_js_value_2(this: &Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input, val: &str); } impl Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input { #[doc = " ## Arguments"] @@ -28761,8 +29135,8 @@ impl Ai_Cf_Pipecat_Ai_Smart_Turn_V2_InputBuilder { self.inner.set_dtype_with_js_value(val); self } - pub fn dtype_with_js_value_1(self, val: &str) -> Self { - self.inner.set_dtype_with_js_value_1(val); + pub fn dtype_with_js_value_2(self, val: &str) -> Self { + self.inner.set_dtype_with_js_value_2(val); self } pub fn build(self) -> Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input { @@ -29128,8 +29502,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "speaker")] - pub fn set_speaker_with_js_value_1(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); - #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value_2(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value_3(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); @@ -29147,6 +29519,8 @@ extern "C" { pub fn set_speaker_with_js_value_9(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value_10(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); + #[wasm_bindgen(method, setter, js_name = "speaker")] + pub fn set_speaker_with_js_value_11(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); #[doc = " Encoding of the output audio."] #[wasm_bindgen(method, getter)] pub fn encoding(this: &Ai_Cf_Deepgram_Aura_1_Input) -> Option; @@ -29155,8 +29529,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] - pub fn set_encoding_with_js_value_1(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); - #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_2(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_3(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); @@ -29164,6 +29536,8 @@ extern "C" { pub fn set_encoding_with_js_value_4(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_5(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); + #[wasm_bindgen(method, setter, js_name = "encoding")] + pub fn set_encoding_with_js_value_6(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); #[doc = " Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.."] #[wasm_bindgen(method, getter)] pub fn container(this: &Ai_Cf_Deepgram_Aura_1_Input) -> Option; @@ -29172,7 +29546,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "container")] pub fn set_container_with_js_value(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "container")] - pub fn set_container_with_js_value_1(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); + pub fn set_container_with_js_value_2(this: &Ai_Cf_Deepgram_Aura_1_Input, val: &str); #[doc = " The text content to be converted to speech"] #[wasm_bindgen(method, getter)] pub fn text(this: &Ai_Cf_Deepgram_Aura_1_Input) -> String; @@ -29217,10 +29591,6 @@ impl Ai_Cf_Deepgram_Aura_1_InputBuilder { self.inner.set_speaker_with_js_value(val); self } - pub fn speaker_with_js_value_1(self, val: &str) -> Self { - self.inner.set_speaker_with_js_value_1(val); - self - } pub fn speaker_with_js_value_2(self, val: &str) -> Self { self.inner.set_speaker_with_js_value_2(val); self @@ -29257,6 +29627,10 @@ impl Ai_Cf_Deepgram_Aura_1_InputBuilder { self.inner.set_speaker_with_js_value_10(val); self } + pub fn speaker_with_js_value_11(self, val: &str) -> Self { + self.inner.set_speaker_with_js_value_11(val); + self + } pub fn encoding(self, val: &str) -> Self { self.inner.set_encoding(val); self @@ -29265,10 +29639,6 @@ impl Ai_Cf_Deepgram_Aura_1_InputBuilder { self.inner.set_encoding_with_js_value(val); self } - pub fn encoding_with_js_value_1(self, val: &str) -> Self { - self.inner.set_encoding_with_js_value_1(val); - self - } pub fn encoding_with_js_value_2(self, val: &str) -> Self { self.inner.set_encoding_with_js_value_2(val); self @@ -29285,6 +29655,10 @@ impl Ai_Cf_Deepgram_Aura_1_InputBuilder { self.inner.set_encoding_with_js_value_5(val); self } + pub fn encoding_with_js_value_6(self, val: &str) -> Self { + self.inner.set_encoding_with_js_value_6(val); + self + } pub fn container(self, val: &str) -> Self { self.inner.set_container(val); self @@ -29293,8 +29667,8 @@ impl Ai_Cf_Deepgram_Aura_1_InputBuilder { self.inner.set_container_with_js_value(val); self } - pub fn container_with_js_value_1(self, val: &str) -> Self { - self.inner.set_container_with_js_value_1(val); + pub fn container_with_js_value_2(self, val: &str) -> Self { + self.inner.set_container_with_js_value_2(val); self } pub fn sample_rate(self, val: f64) -> Self { @@ -29351,11 +29725,6 @@ extern "C" { val: &str, ); #[wasm_bindgen(method, setter, js_name = "target_language")] - pub fn set_target_language_with_js_value_1( - this: &Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input, - val: &str, - ); - #[wasm_bindgen(method, setter, js_name = "target_language")] pub fn set_target_language_with_js_value_2( this: &Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input, val: &str, @@ -29510,6 +29879,11 @@ extern "C" { this: &Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input, val: &str, ); + #[wasm_bindgen(method, setter, js_name = "target_language")] + pub fn set_target_language_with_js_value_33( + this: &Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input, + val: &str, + ); } impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { #[doc = " ## Inlined fields"] @@ -30296,7 +30670,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_ben_beng(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_1("ben_Beng"); + inner.set_target_language_with_js_value_2("ben_Beng"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30309,7 +30683,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_bho_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_2("bho_Deva"); + inner.set_target_language_with_js_value_3("bho_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30322,7 +30696,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_brx_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_3("brx_Deva"); + inner.set_target_language_with_js_value_4("brx_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30335,7 +30709,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_doi_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_4("doi_Deva"); + inner.set_target_language_with_js_value_5("doi_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30348,7 +30722,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_eng_latn(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_5("eng_Latn"); + inner.set_target_language_with_js_value_6("eng_Latn"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30361,7 +30735,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_gom_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_6("gom_Deva"); + inner.set_target_language_with_js_value_7("gom_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30374,7 +30748,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_gon_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_7("gon_Deva"); + inner.set_target_language_with_js_value_8("gon_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30387,7 +30761,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_guj_gujr(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_8("guj_Gujr"); + inner.set_target_language_with_js_value_9("guj_Gujr"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30400,7 +30774,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_hin_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_9("hin_Deva"); + inner.set_target_language_with_js_value_10("hin_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30413,7 +30787,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_hne_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_10("hne_Deva"); + inner.set_target_language_with_js_value_11("hne_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30426,7 +30800,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_kan_knda(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_11("kan_Knda"); + inner.set_target_language_with_js_value_12("kan_Knda"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30439,7 +30813,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_kas_arab(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_12("kas_Arab"); + inner.set_target_language_with_js_value_13("kas_Arab"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30452,7 +30826,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_kas_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_13("kas_Deva"); + inner.set_target_language_with_js_value_14("kas_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30465,7 +30839,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_kha_latn(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_14("kha_Latn"); + inner.set_target_language_with_js_value_15("kha_Latn"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30478,7 +30852,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_lus_latn(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_15("lus_Latn"); + inner.set_target_language_with_js_value_16("lus_Latn"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30491,7 +30865,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_mag_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_16("mag_Deva"); + inner.set_target_language_with_js_value_17("mag_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30504,7 +30878,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_mai_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_17("mai_Deva"); + inner.set_target_language_with_js_value_18("mai_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30517,7 +30891,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_mal_mlym(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_18("mal_Mlym"); + inner.set_target_language_with_js_value_19("mal_Mlym"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30530,7 +30904,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_mar_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_19("mar_Deva"); + inner.set_target_language_with_js_value_20("mar_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30543,7 +30917,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_mni_beng(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_20("mni_Beng"); + inner.set_target_language_with_js_value_21("mni_Beng"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30556,7 +30930,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_mni_mtei(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_21("mni_Mtei"); + inner.set_target_language_with_js_value_22("mni_Mtei"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30569,7 +30943,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_npi_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_22("npi_Deva"); + inner.set_target_language_with_js_value_23("npi_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30582,7 +30956,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_ory_orya(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_23("ory_Orya"); + inner.set_target_language_with_js_value_24("ory_Orya"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30595,7 +30969,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_pan_guru(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_24("pan_Guru"); + inner.set_target_language_with_js_value_25("pan_Guru"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30608,7 +30982,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_san_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_25("san_Deva"); + inner.set_target_language_with_js_value_26("san_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30621,7 +30995,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_sat_olck(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_26("sat_Olck"); + inner.set_target_language_with_js_value_27("sat_Olck"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30634,7 +31008,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_snd_arab(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_27("snd_Arab"); + inner.set_target_language_with_js_value_28("snd_Arab"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30647,7 +31021,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_snd_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_28("snd_Deva"); + inner.set_target_language_with_js_value_29("snd_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30660,7 +31034,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_tam_taml(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_29("tam_Taml"); + inner.set_target_language_with_js_value_30("tam_Taml"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30673,7 +31047,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_tel_telu(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_30("tel_Telu"); + inner.set_target_language_with_js_value_31("tel_Telu"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30686,7 +31060,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_urd_arab(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_31("urd_Arab"); + inner.set_target_language_with_js_value_32("urd_Arab"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30699,7 +31073,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { pub fn builder_unr_deva(text: &str) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text(text); - inner.set_target_language_with_js_value_32("unr_Deva"); + inner.set_target_language_with_js_value_33("unr_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30744,7 +31118,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_1("ben_Beng"); + inner.set_target_language_with_js_value_2("ben_Beng"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30759,7 +31133,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_2("bho_Deva"); + inner.set_target_language_with_js_value_3("bho_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30774,7 +31148,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_3("brx_Deva"); + inner.set_target_language_with_js_value_4("brx_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30789,7 +31163,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_4("doi_Deva"); + inner.set_target_language_with_js_value_5("doi_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30804,7 +31178,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_5("eng_Latn"); + inner.set_target_language_with_js_value_6("eng_Latn"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30819,7 +31193,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_6("gom_Deva"); + inner.set_target_language_with_js_value_7("gom_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30834,7 +31208,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_7("gon_Deva"); + inner.set_target_language_with_js_value_8("gon_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30849,7 +31223,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_8("guj_Gujr"); + inner.set_target_language_with_js_value_9("guj_Gujr"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30864,7 +31238,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_9("hin_Deva"); + inner.set_target_language_with_js_value_10("hin_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30879,7 +31253,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_10("hne_Deva"); + inner.set_target_language_with_js_value_11("hne_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30894,7 +31268,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_11("kan_Knda"); + inner.set_target_language_with_js_value_12("kan_Knda"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30909,7 +31283,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_12("kas_Arab"); + inner.set_target_language_with_js_value_13("kas_Arab"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30924,7 +31298,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_13("kas_Deva"); + inner.set_target_language_with_js_value_14("kas_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30939,7 +31313,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_14("kha_Latn"); + inner.set_target_language_with_js_value_15("kha_Latn"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30954,7 +31328,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_15("lus_Latn"); + inner.set_target_language_with_js_value_16("lus_Latn"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30969,7 +31343,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_16("mag_Deva"); + inner.set_target_language_with_js_value_17("mag_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30984,7 +31358,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_17("mai_Deva"); + inner.set_target_language_with_js_value_18("mai_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -30999,7 +31373,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_18("mal_Mlym"); + inner.set_target_language_with_js_value_19("mal_Mlym"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31014,7 +31388,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_19("mar_Deva"); + inner.set_target_language_with_js_value_20("mar_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31029,7 +31403,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_20("mni_Beng"); + inner.set_target_language_with_js_value_21("mni_Beng"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31044,7 +31418,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_21("mni_Mtei"); + inner.set_target_language_with_js_value_22("mni_Mtei"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31059,7 +31433,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_22("npi_Deva"); + inner.set_target_language_with_js_value_23("npi_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31074,7 +31448,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_23("ory_Orya"); + inner.set_target_language_with_js_value_24("ory_Orya"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31089,7 +31463,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_24("pan_Guru"); + inner.set_target_language_with_js_value_25("pan_Guru"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31104,7 +31478,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_25("san_Deva"); + inner.set_target_language_with_js_value_26("san_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31119,7 +31493,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_26("sat_Olck"); + inner.set_target_language_with_js_value_27("sat_Olck"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31134,7 +31508,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_27("snd_Arab"); + inner.set_target_language_with_js_value_28("snd_Arab"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31149,7 +31523,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_28("snd_Deva"); + inner.set_target_language_with_js_value_29("snd_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31164,7 +31538,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_29("tam_Taml"); + inner.set_target_language_with_js_value_30("tam_Taml"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31179,7 +31553,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_30("tel_Telu"); + inner.set_target_language_with_js_value_31("tel_Telu"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31194,7 +31568,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_31("urd_Arab"); + inner.set_target_language_with_js_value_32("urd_Arab"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } #[doc = " ## Inlined fields"] @@ -31209,7 +31583,7 @@ impl Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { ) -> Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_text_with_array(text); - inner.set_target_language_with_js_value_32("unr_Deva"); + inner.set_target_language_with_js_value_33("unr_Deva"); Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_InputBuilder { inner } } } @@ -32832,11 +33206,11 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "event")] pub fn set_event_with_js_value(this: &Ai_Cf_Deepgram_Flux_Output, val: &str); #[wasm_bindgen(method, setter, js_name = "event")] - pub fn set_event_with_js_value_1(this: &Ai_Cf_Deepgram_Flux_Output, val: &str); - #[wasm_bindgen(method, setter, js_name = "event")] pub fn set_event_with_js_value_2(this: &Ai_Cf_Deepgram_Flux_Output, val: &str); #[wasm_bindgen(method, setter, js_name = "event")] pub fn set_event_with_js_value_3(this: &Ai_Cf_Deepgram_Flux_Output, val: &str); + #[wasm_bindgen(method, setter, js_name = "event")] + pub fn set_event_with_js_value_4(this: &Ai_Cf_Deepgram_Flux_Output, val: &str); #[doc = " The index of the current turn"] #[wasm_bindgen(method, getter)] pub fn turn_index(this: &Ai_Cf_Deepgram_Flux_Output) -> Option; @@ -32898,10 +33272,6 @@ impl Ai_Cf_Deepgram_Flux_OutputBuilder { self.inner.set_event_with_js_value(val); self } - pub fn event_with_js_value_1(self, val: &str) -> Self { - self.inner.set_event_with_js_value_1(val); - self - } pub fn event_with_js_value_2(self, val: &str) -> Self { self.inner.set_event_with_js_value_2(val); self @@ -32910,6 +33280,10 @@ impl Ai_Cf_Deepgram_Flux_OutputBuilder { self.inner.set_event_with_js_value_3(val); self } + pub fn event_with_js_value_4(self, val: &str) -> Self { + self.inner.set_event_with_js_value_4(val); + self + } pub fn turn_index(self, val: f64) -> Self { self.inner.set_turn_index(val); self @@ -32968,8 +33342,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "speaker")] - pub fn set_speaker_with_js_value_1(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); - #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value_2(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value_3(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); @@ -33043,6 +33415,8 @@ extern "C" { pub fn set_speaker_with_js_value_37(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value_38(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); + #[wasm_bindgen(method, setter, js_name = "speaker")] + pub fn set_speaker_with_js_value_39(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); #[doc = " Encoding of the output audio."] #[wasm_bindgen(method, getter)] pub fn encoding(this: &Ai_Cf_Deepgram_Aura_2_En_Input) -> Option; @@ -33051,8 +33425,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] - pub fn set_encoding_with_js_value_1(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); - #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_2(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_3(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); @@ -33060,6 +33432,8 @@ extern "C" { pub fn set_encoding_with_js_value_4(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_5(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); + #[wasm_bindgen(method, setter, js_name = "encoding")] + pub fn set_encoding_with_js_value_6(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); #[doc = " Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.."] #[wasm_bindgen(method, getter)] pub fn container(this: &Ai_Cf_Deepgram_Aura_2_En_Input) -> Option; @@ -33068,7 +33442,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "container")] pub fn set_container_with_js_value(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "container")] - pub fn set_container_with_js_value_1(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); + pub fn set_container_with_js_value_2(this: &Ai_Cf_Deepgram_Aura_2_En_Input, val: &str); #[doc = " The text content to be converted to speech"] #[wasm_bindgen(method, getter)] pub fn text(this: &Ai_Cf_Deepgram_Aura_2_En_Input) -> String; @@ -33113,10 +33487,6 @@ impl Ai_Cf_Deepgram_Aura_2_En_InputBuilder { self.inner.set_speaker_with_js_value(val); self } - pub fn speaker_with_js_value_1(self, val: &str) -> Self { - self.inner.set_speaker_with_js_value_1(val); - self - } pub fn speaker_with_js_value_2(self, val: &str) -> Self { self.inner.set_speaker_with_js_value_2(val); self @@ -33265,6 +33635,10 @@ impl Ai_Cf_Deepgram_Aura_2_En_InputBuilder { self.inner.set_speaker_with_js_value_38(val); self } + pub fn speaker_with_js_value_39(self, val: &str) -> Self { + self.inner.set_speaker_with_js_value_39(val); + self + } pub fn encoding(self, val: &str) -> Self { self.inner.set_encoding(val); self @@ -33273,10 +33647,6 @@ impl Ai_Cf_Deepgram_Aura_2_En_InputBuilder { self.inner.set_encoding_with_js_value(val); self } - pub fn encoding_with_js_value_1(self, val: &str) -> Self { - self.inner.set_encoding_with_js_value_1(val); - self - } pub fn encoding_with_js_value_2(self, val: &str) -> Self { self.inner.set_encoding_with_js_value_2(val); self @@ -33293,6 +33663,10 @@ impl Ai_Cf_Deepgram_Aura_2_En_InputBuilder { self.inner.set_encoding_with_js_value_5(val); self } + pub fn encoding_with_js_value_6(self, val: &str) -> Self { + self.inner.set_encoding_with_js_value_6(val); + self + } pub fn container(self, val: &str) -> Self { self.inner.set_container(val); self @@ -33301,8 +33675,8 @@ impl Ai_Cf_Deepgram_Aura_2_En_InputBuilder { self.inner.set_container_with_js_value(val); self } - pub fn container_with_js_value_1(self, val: &str) -> Self { - self.inner.set_container_with_js_value_1(val); + pub fn container_with_js_value_2(self, val: &str) -> Self { + self.inner.set_container_with_js_value_2(val); self } pub fn sample_rate(self, val: f64) -> Self { @@ -33346,8 +33720,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "speaker")] - pub fn set_speaker_with_js_value_1(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); - #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value_2(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value_3(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); @@ -33361,6 +33733,8 @@ extern "C" { pub fn set_speaker_with_js_value_7(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "speaker")] pub fn set_speaker_with_js_value_8(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); + #[wasm_bindgen(method, setter, js_name = "speaker")] + pub fn set_speaker_with_js_value_9(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); #[doc = " Encoding of the output audio."] #[wasm_bindgen(method, getter)] pub fn encoding(this: &Ai_Cf_Deepgram_Aura_2_Es_Input) -> Option; @@ -33369,8 +33743,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] - pub fn set_encoding_with_js_value_1(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); - #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_2(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_3(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); @@ -33378,6 +33750,8 @@ extern "C" { pub fn set_encoding_with_js_value_4(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "encoding")] pub fn set_encoding_with_js_value_5(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); + #[wasm_bindgen(method, setter, js_name = "encoding")] + pub fn set_encoding_with_js_value_6(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); #[doc = " Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.."] #[wasm_bindgen(method, getter)] pub fn container(this: &Ai_Cf_Deepgram_Aura_2_Es_Input) -> Option; @@ -33386,7 +33760,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "container")] pub fn set_container_with_js_value(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); #[wasm_bindgen(method, setter, js_name = "container")] - pub fn set_container_with_js_value_1(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); + pub fn set_container_with_js_value_2(this: &Ai_Cf_Deepgram_Aura_2_Es_Input, val: &str); #[doc = " The text content to be converted to speech"] #[wasm_bindgen(method, getter)] pub fn text(this: &Ai_Cf_Deepgram_Aura_2_Es_Input) -> String; @@ -33431,10 +33805,6 @@ impl Ai_Cf_Deepgram_Aura_2_Es_InputBuilder { self.inner.set_speaker_with_js_value(val); self } - pub fn speaker_with_js_value_1(self, val: &str) -> Self { - self.inner.set_speaker_with_js_value_1(val); - self - } pub fn speaker_with_js_value_2(self, val: &str) -> Self { self.inner.set_speaker_with_js_value_2(val); self @@ -33463,6 +33833,10 @@ impl Ai_Cf_Deepgram_Aura_2_Es_InputBuilder { self.inner.set_speaker_with_js_value_8(val); self } + pub fn speaker_with_js_value_9(self, val: &str) -> Self { + self.inner.set_speaker_with_js_value_9(val); + self + } pub fn encoding(self, val: &str) -> Self { self.inner.set_encoding(val); self @@ -33471,10 +33845,6 @@ impl Ai_Cf_Deepgram_Aura_2_Es_InputBuilder { self.inner.set_encoding_with_js_value(val); self } - pub fn encoding_with_js_value_1(self, val: &str) -> Self { - self.inner.set_encoding_with_js_value_1(val); - self - } pub fn encoding_with_js_value_2(self, val: &str) -> Self { self.inner.set_encoding_with_js_value_2(val); self @@ -33491,6 +33861,10 @@ impl Ai_Cf_Deepgram_Aura_2_Es_InputBuilder { self.inner.set_encoding_with_js_value_5(val); self } + pub fn encoding_with_js_value_6(self, val: &str) -> Self { + self.inner.set_encoding_with_js_value_6(val); + self + } pub fn container(self, val: &str) -> Self { self.inner.set_container(val); self @@ -33499,8 +33873,8 @@ impl Ai_Cf_Deepgram_Aura_2_Es_InputBuilder { self.inner.set_container_with_js_value(val); self } - pub fn container_with_js_value_1(self, val: &str) -> Self { - self.inner.set_container_with_js_value_1(val); + pub fn container_with_js_value_2(self, val: &str) -> Self { + self.inner.set_container_with_js_value_2(val); self } pub fn sample_rate(self, val: f64) -> Self { @@ -34811,7 +35185,7 @@ pub type AiModelListType = Object; extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type Ai; + pub type Ai; #[wasm_bindgen(method, getter, js_name = "aiGatewayLogId")] pub fn ai_gateway_log_id(this: &Ai) -> Option; #[wasm_bindgen(method, setter, js_name = "aiGatewayLogId")] @@ -34819,9 +35193,15 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "aiGatewayLogId")] pub fn set_ai_gateway_log_id_with_null(this: &Ai, val: &Null); #[wasm_bindgen(method)] - pub fn gateway(this: &Ai, gateway_id: &str) -> AiGateway; + pub fn gateway( + this: &Ai, + gateway_id: &str, + ) -> AiGateway; #[wasm_bindgen(method, catch, js_name = "gateway")] - pub fn try_gateway(this: &Ai, gateway_id: &str) -> Result; + pub fn try_gateway( + this: &Ai, + gateway_id: &str, + ) -> Result; #[doc = " Access the AI Search API for managing AI-powered search instances."] #[doc = ""] #[doc = " This is the new API that replaces AutoRAG with better namespace separation:"] @@ -34851,7 +35231,9 @@ extern "C" { #[doc = " ```"] #[doc = " ```"] #[wasm_bindgen(method, js_name = "aiSearch")] - pub fn ai_search(this: &Ai) -> AiSearchAccountService; + pub fn ai_search( + this: &Ai, + ) -> AiSearchAccountService; #[doc = " Access the AI Search API for managing AI-powered search instances."] #[doc = ""] #[doc = " This is the new API that replaces AutoRAG with better namespace separation:"] @@ -34881,7 +35263,9 @@ extern "C" { #[doc = " ```"] #[doc = " ```"] #[wasm_bindgen(method, catch, js_name = "aiSearch")] - pub fn try_ai_search(this: &Ai) -> Result; + pub fn try_ai_search( + this: &Ai, + ) -> Result; #[doc = " @deprecated AutoRAG has been replaced by AI Search."] #[doc = " Use `env.AI.aiSearch` instead for better API design and new features."] #[doc = ""] @@ -34898,7 +35282,10 @@ extern "C" { #[doc = ""] #[doc = " * `autoragId` - Optional instance ID (omit for account-level operations)"] #[wasm_bindgen(method)] - pub fn autorag(this: &Ai, autorag_id: &str) -> AutoRAG; + pub fn autorag( + this: &Ai, + autorag_id: &str, + ) -> AutoRAG; #[doc = " @deprecated AutoRAG has been replaced by AI Search."] #[doc = " Use `env.AI.aiSearch` instead for better API design and new features."] #[doc = ""] @@ -34915,65 +35302,92 @@ extern "C" { #[doc = ""] #[doc = " * `autoragId` - Optional instance ID (omit for account-level operations)"] #[wasm_bindgen(method, catch, js_name = "autorag")] - pub fn try_autorag(this: &Ai, autorag_id: &str) -> Result; + pub fn try_autorag( + this: &Ai, + autorag_id: &str, + ) -> Result; #[wasm_bindgen(method, catch)] - pub async fn run(this: &Ai, model: &Name, inputs: &InputOptions) -> Result; + pub async fn run< + AiModelList: ::wasm_bindgen::JsGeneric, + Name: ::wasm_bindgen::JsGeneric, + InputOptions: ::wasm_bindgen::JsGeneric, + >( + this: &Ai, + model: &Name, + inputs: &InputOptions, + ) -> Result; #[wasm_bindgen(method, catch, js_name = "run")] - pub async fn run_with_options( - this: &Ai, + pub async fn run_with_options< + AiModelList: ::wasm_bindgen::JsGeneric, + Name: ::wasm_bindgen::JsGeneric, + InputOptions: ::wasm_bindgen::JsGeneric, + Options: ::wasm_bindgen::JsGeneric, + >( + this: &Ai, model: &Name, inputs: &InputOptions, options: &Options, ) -> Result; #[wasm_bindgen(method, catch)] - pub async fn models(this: &Ai) -> Result, JsValue>; + pub async fn models( + this: &Ai, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "models")] - pub async fn models_with_params( - this: &Ai, + pub async fn models_with_params( + this: &Ai, params: &AiModelsSearchParams, ) -> Result, JsValue>; #[wasm_bindgen(method, js_name = "toMarkdown")] - pub fn to_markdown(this: &Ai) -> ToMarkdownService; + pub fn to_markdown( + this: &Ai, + ) -> ToMarkdownService; #[wasm_bindgen(method, catch, js_name = "toMarkdown")] - pub fn try_to_markdown(this: &Ai) -> Result; + pub fn try_to_markdown( + this: &Ai, + ) -> Result; #[wasm_bindgen(method, js_name = "toMarkdown")] - pub fn to_markdown_with_array(this: &Ai, files: &Array) -> ToMarkdownService; + pub fn to_markdown_with_array( + this: &Ai, + files: &Array, + ) -> ToMarkdownService; #[wasm_bindgen(method, catch, js_name = "toMarkdown")] - pub fn try_to_markdown_with_array( - this: &Ai, + pub fn try_to_markdown_with_array( + this: &Ai, files: &Array, ) -> Result; #[wasm_bindgen(method, js_name = "toMarkdown")] - pub fn to_markdown_with_array_and_options( - this: &Ai, + pub fn to_markdown_with_array_and_options( + this: &Ai, files: &Array, options: &ConversionRequestOptions, ) -> ToMarkdownService; #[wasm_bindgen(method, catch, js_name = "toMarkdown")] - pub fn try_to_markdown_with_array_and_options( - this: &Ai, + pub fn try_to_markdown_with_array_and_options( + this: &Ai, files: &Array, options: &ConversionRequestOptions, ) -> Result; #[wasm_bindgen(method, js_name = "toMarkdown")] - pub fn to_markdown_with_markdown_document( - this: &Ai, + pub fn to_markdown_with_markdown_document( + this: &Ai, files: &MarkdownDocument, ) -> ToMarkdownService; #[wasm_bindgen(method, catch, js_name = "toMarkdown")] - pub fn try_to_markdown_with_markdown_document( - this: &Ai, + pub fn try_to_markdown_with_markdown_document( + this: &Ai, files: &MarkdownDocument, ) -> Result; #[wasm_bindgen(method, js_name = "toMarkdown")] - pub fn to_markdown_with_markdown_document_and_options( - this: &Ai, + pub fn to_markdown_with_markdown_document_and_options( + this: &Ai, files: &MarkdownDocument, options: &ConversionRequestOptions, ) -> ToMarkdownService; #[wasm_bindgen(method, catch, js_name = "toMarkdown")] - pub fn try_to_markdown_with_markdown_document_and_options( - this: &Ai, + pub fn try_to_markdown_with_markdown_document_and_options< + AiModelList: ::wasm_bindgen::JsGeneric, + >( + this: &Ai, files: &MarkdownDocument, options: &ConversionRequestOptions, ) -> Result; @@ -34990,11 +35404,11 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "maxAttempts")] pub fn set_max_attempts_with_js_value(this: &GatewayRetries, val: f64); #[wasm_bindgen(method, setter, js_name = "maxAttempts")] - pub fn set_max_attempts_with_js_value_1(this: &GatewayRetries, val: f64); - #[wasm_bindgen(method, setter, js_name = "maxAttempts")] pub fn set_max_attempts_with_js_value_2(this: &GatewayRetries, val: f64); #[wasm_bindgen(method, setter, js_name = "maxAttempts")] pub fn set_max_attempts_with_js_value_3(this: &GatewayRetries, val: f64); + #[wasm_bindgen(method, setter, js_name = "maxAttempts")] + pub fn set_max_attempts_with_js_value_4(this: &GatewayRetries, val: f64); #[wasm_bindgen(method, getter, js_name = "retryDelayMs")] pub fn retry_delay_ms(this: &GatewayRetries) -> Option; #[wasm_bindgen(method, setter, js_name = "retryDelayMs")] @@ -35006,7 +35420,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "backoff")] pub fn set_backoff_with_js_value(this: &GatewayRetries, val: &str); #[wasm_bindgen(method, setter, js_name = "backoff")] - pub fn set_backoff_with_js_value_1(this: &GatewayRetries, val: &str); + pub fn set_backoff_with_js_value_2(this: &GatewayRetries, val: &str); } impl GatewayRetries { pub fn new() -> GatewayRetries { @@ -35030,10 +35444,6 @@ impl GatewayRetriesBuilder { self.inner.set_max_attempts_with_js_value(val); self } - pub fn max_attempts_with_js_value_1(self, val: f64) -> Self { - self.inner.set_max_attempts_with_js_value_1(val); - self - } pub fn max_attempts_with_js_value_2(self, val: f64) -> Self { self.inner.set_max_attempts_with_js_value_2(val); self @@ -35042,6 +35452,10 @@ impl GatewayRetriesBuilder { self.inner.set_max_attempts_with_js_value_3(val); self } + pub fn max_attempts_with_js_value_4(self, val: f64) -> Self { + self.inner.set_max_attempts_with_js_value_4(val); + self + } pub fn retry_delay_ms(self, val: f64) -> Self { self.inner.set_retry_delay_ms(val); self @@ -35054,8 +35468,8 @@ impl GatewayRetriesBuilder { self.inner.set_backoff_with_js_value(val); self } - pub fn backoff_with_js_value_1(self, val: &str) -> Self { - self.inner.set_backoff_with_js_value_1(val); + pub fn backoff_with_js_value_2(self, val: &str) -> Self { + self.inner.set_backoff_with_js_value_2(val); self } pub fn build(self) -> GatewayRetries { @@ -59757,13 +60171,13 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "type")] pub fn set_type_with_js_value(this: &ComparisonFilter, val: &str); #[wasm_bindgen(method, setter, js_name = "type")] - pub fn set_type_with_js_value_1(this: &ComparisonFilter, val: &str); - #[wasm_bindgen(method, setter, js_name = "type")] pub fn set_type_with_js_value_2(this: &ComparisonFilter, val: &str); #[wasm_bindgen(method, setter, js_name = "type")] pub fn set_type_with_js_value_3(this: &ComparisonFilter, val: &str); #[wasm_bindgen(method, setter, js_name = "type")] pub fn set_type_with_js_value_4(this: &ComparisonFilter, val: &str); + #[wasm_bindgen(method, setter, js_name = "type")] + pub fn set_type_with_js_value_5(this: &ComparisonFilter, val: &str); #[wasm_bindgen(method, getter)] pub fn value(this: &ComparisonFilter) -> JsValue; #[wasm_bindgen(method, setter)] @@ -60073,7 +60487,7 @@ impl ComparisonFilter { pub fn builder_gt(key: &str, value: &str) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_1("gt"); + inner.set_type_with_js_value_2("gt"); inner.set_value(value); ComparisonFilterBuilder { inner } } @@ -60088,7 +60502,7 @@ impl ComparisonFilter { pub fn builder_gt_with_f64(key: &str, value: f64) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_1("gt"); + inner.set_type_with_js_value_2("gt"); inner.set_value_with_f64(value); ComparisonFilterBuilder { inner } } @@ -60103,7 +60517,7 @@ impl ComparisonFilter { pub fn builder_gt_with_bool(key: &str, value: bool) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_1("gt"); + inner.set_type_with_js_value_2("gt"); inner.set_value_with_bool(value); ComparisonFilterBuilder { inner } } @@ -60118,7 +60532,7 @@ impl ComparisonFilter { pub fn builder_gte(key: &str, value: &str) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_2("gte"); + inner.set_type_with_js_value_3("gte"); inner.set_value(value); ComparisonFilterBuilder { inner } } @@ -60133,7 +60547,7 @@ impl ComparisonFilter { pub fn builder_gte_with_f64(key: &str, value: f64) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_2("gte"); + inner.set_type_with_js_value_3("gte"); inner.set_value_with_f64(value); ComparisonFilterBuilder { inner } } @@ -60148,7 +60562,7 @@ impl ComparisonFilter { pub fn builder_gte_with_bool(key: &str, value: bool) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_2("gte"); + inner.set_type_with_js_value_3("gte"); inner.set_value_with_bool(value); ComparisonFilterBuilder { inner } } @@ -60163,7 +60577,7 @@ impl ComparisonFilter { pub fn builder_lt(key: &str, value: &str) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_3("lt"); + inner.set_type_with_js_value_4("lt"); inner.set_value(value); ComparisonFilterBuilder { inner } } @@ -60178,7 +60592,7 @@ impl ComparisonFilter { pub fn builder_lt_with_f64(key: &str, value: f64) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_3("lt"); + inner.set_type_with_js_value_4("lt"); inner.set_value_with_f64(value); ComparisonFilterBuilder { inner } } @@ -60193,7 +60607,7 @@ impl ComparisonFilter { pub fn builder_lt_with_bool(key: &str, value: bool) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_3("lt"); + inner.set_type_with_js_value_4("lt"); inner.set_value_with_bool(value); ComparisonFilterBuilder { inner } } @@ -60208,7 +60622,7 @@ impl ComparisonFilter { pub fn builder_lte(key: &str, value: &str) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_4("lte"); + inner.set_type_with_js_value_5("lte"); inner.set_value(value); ComparisonFilterBuilder { inner } } @@ -60223,7 +60637,7 @@ impl ComparisonFilter { pub fn builder_lte_with_f64(key: &str, value: f64) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_4("lte"); + inner.set_type_with_js_value_5("lte"); inner.set_value_with_f64(value); ComparisonFilterBuilder { inner } } @@ -60238,7 +60652,7 @@ impl ComparisonFilter { pub fn builder_lte_with_bool(key: &str, value: bool) -> ComparisonFilterBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); inner.set_key(key); - inner.set_type_with_js_value_4("lte"); + inner.set_type_with_js_value_5("lte"); inner.set_value_with_bool(value); ComparisonFilterBuilder { inner } } @@ -60567,13 +60981,13 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "fit")] pub fn set_fit_with_js_value(this: &BasicImageTransformations, val: &str); #[wasm_bindgen(method, setter, js_name = "fit")] - pub fn set_fit_with_js_value_1(this: &BasicImageTransformations, val: &str); - #[wasm_bindgen(method, setter, js_name = "fit")] pub fn set_fit_with_js_value_2(this: &BasicImageTransformations, val: &str); #[wasm_bindgen(method, setter, js_name = "fit")] pub fn set_fit_with_js_value_3(this: &BasicImageTransformations, val: &str); #[wasm_bindgen(method, setter, js_name = "fit")] pub fn set_fit_with_js_value_4(this: &BasicImageTransformations, val: &str); + #[wasm_bindgen(method, setter, js_name = "fit")] + pub fn set_fit_with_js_value_5(this: &BasicImageTransformations, val: &str); #[doc = " Image segmentation using artificial intelligence models. Sets pixels not"] #[doc = " within selected segment area to transparent e.g \"foreground\" sets every"] #[doc = " background pixel as transparent."] @@ -60598,8 +61012,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "gravity")] pub fn set_gravity_with_js_value(this: &BasicImageTransformations, val: &str); #[wasm_bindgen(method, setter, js_name = "gravity")] - pub fn set_gravity_with_js_value_1(this: &BasicImageTransformations, val: &str); - #[wasm_bindgen(method, setter, js_name = "gravity")] pub fn set_gravity_with_js_value_2(this: &BasicImageTransformations, val: &str); #[wasm_bindgen(method, setter, js_name = "gravity")] pub fn set_gravity_with_js_value_3(this: &BasicImageTransformations, val: &str); @@ -60610,6 +61022,8 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "gravity")] pub fn set_gravity_with_js_value_6(this: &BasicImageTransformations, val: &str); #[wasm_bindgen(method, setter, js_name = "gravity")] + pub fn set_gravity_with_js_value_7(this: &BasicImageTransformations, val: &str); + #[wasm_bindgen(method, setter, js_name = "gravity")] pub fn set_gravity_with_basic_image_transformations_gravity_coordinates( this: &BasicImageTransformations, val: &BasicImageTransformationsGravityCoordinates, @@ -60630,11 +61044,11 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "rotate")] pub fn set_rotate_with_js_value(this: &BasicImageTransformations, val: f64); #[wasm_bindgen(method, setter, js_name = "rotate")] - pub fn set_rotate_with_js_value_1(this: &BasicImageTransformations, val: f64); - #[wasm_bindgen(method, setter, js_name = "rotate")] pub fn set_rotate_with_js_value_2(this: &BasicImageTransformations, val: f64); #[wasm_bindgen(method, setter, js_name = "rotate")] pub fn set_rotate_with_js_value_3(this: &BasicImageTransformations, val: f64); + #[wasm_bindgen(method, setter, js_name = "rotate")] + pub fn set_rotate_with_js_value_4(this: &BasicImageTransformations, val: f64); } impl BasicImageTransformations { pub fn new() -> BasicImageTransformations { @@ -60666,10 +61080,6 @@ impl BasicImageTransformationsBuilder { self.inner.set_fit_with_js_value(val); self } - pub fn fit_with_js_value_1(self, val: &str) -> Self { - self.inner.set_fit_with_js_value_1(val); - self - } pub fn fit_with_js_value_2(self, val: &str) -> Self { self.inner.set_fit_with_js_value_2(val); self @@ -60682,6 +61092,10 @@ impl BasicImageTransformationsBuilder { self.inner.set_fit_with_js_value_4(val); self } + pub fn fit_with_js_value_5(self, val: &str) -> Self { + self.inner.set_fit_with_js_value_5(val); + self + } pub fn segment(self, val: &str) -> Self { self.inner.set_segment(val); self @@ -60694,10 +61108,6 @@ impl BasicImageTransformationsBuilder { self.inner.set_gravity_with_js_value(val); self } - pub fn gravity_with_js_value_1(self, val: &str) -> Self { - self.inner.set_gravity_with_js_value_1(val); - self - } pub fn gravity_with_js_value_2(self, val: &str) -> Self { self.inner.set_gravity_with_js_value_2(val); self @@ -60718,6 +61128,10 @@ impl BasicImageTransformationsBuilder { self.inner.set_gravity_with_js_value_6(val); self } + pub fn gravity_with_js_value_7(self, val: &str) -> Self { + self.inner.set_gravity_with_js_value_7(val); + self + } pub fn gravity_with_basic_image_transformations_gravity_coordinates( self, val: &BasicImageTransformationsGravityCoordinates, @@ -60738,10 +61152,6 @@ impl BasicImageTransformationsBuilder { self.inner.set_rotate_with_js_value(val); self } - pub fn rotate_with_js_value_1(self, val: f64) -> Self { - self.inner.set_rotate_with_js_value_1(val); - self - } pub fn rotate_with_js_value_2(self, val: f64) -> Self { self.inner.set_rotate_with_js_value_2(val); self @@ -60750,6 +61160,10 @@ impl BasicImageTransformationsBuilder { self.inner.set_rotate_with_js_value_3(val); self } + pub fn rotate_with_js_value_4(self, val: f64) -> Self { + self.inner.set_rotate_with_js_value_4(val); + self + } pub fn build(self) -> BasicImageTransformations { self.inner } @@ -60875,7 +61289,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "polish")] pub fn set_polish_with_js_value(this: &RequestInitCfProperties, val: &str); #[wasm_bindgen(method, setter, js_name = "polish")] - pub fn set_polish_with_js_value_1(this: &RequestInitCfProperties, val: &str); + pub fn set_polish_with_js_value_2(this: &RequestInitCfProperties, val: &str); #[wasm_bindgen(method, getter, js_name = "r2")] pub fn r_2(this: &RequestInitCfProperties) -> Option; #[wasm_bindgen(method, setter, js_name = "r2")] @@ -60958,8 +61372,8 @@ impl RequestInitCfPropertiesBuilder { self.inner.set_polish_with_js_value(val); self } - pub fn polish_with_js_value_1(self, val: &str) -> Self { - self.inner.set_polish_with_js_value_1(val); + pub fn polish_with_js_value_2(self, val: &str) -> Self { + self.inner.set_polish_with_js_value_2(val); self } pub fn r_2(self, val: &RequestInitCfPropertiesR2) -> Self { @@ -61005,7 +61419,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "repeat")] pub fn set_repeat_with_js_value(this: &RequestInitCfPropertiesImageDraw, val: &str); #[wasm_bindgen(method, setter, js_name = "repeat")] - pub fn set_repeat_with_js_value_1(this: &RequestInitCfPropertiesImageDraw, val: &str); + pub fn set_repeat_with_js_value_2(this: &RequestInitCfPropertiesImageDraw, val: &str); #[doc = " Position of the overlay image relative to a given edge. Each property is"] #[doc = " an offset in pixels. 0 aligns exactly to the edge. For example, left: 10"] #[doc = " positions left side of the overlay 10 pixels from the left edge of the"] @@ -61068,8 +61482,8 @@ impl RequestInitCfPropertiesImageDrawBuilder { self.inner.set_repeat_with_js_value(val); self } - pub fn repeat_with_js_value_1(self, val: &str) -> Self { - self.inner.set_repeat_with_js_value_1(val); + pub fn repeat_with_js_value_2(self, val: &str) -> Self { + self.inner.set_repeat_with_js_value_2(val); self } pub fn top(self, val: f64) -> Self { @@ -61132,11 +61546,11 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "quality")] pub fn set_quality_with_js_value(this: &RequestInitCfPropertiesImage, val: &str); #[wasm_bindgen(method, setter, js_name = "quality")] - pub fn set_quality_with_js_value_1(this: &RequestInitCfPropertiesImage, val: &str); - #[wasm_bindgen(method, setter, js_name = "quality")] pub fn set_quality_with_js_value_2(this: &RequestInitCfPropertiesImage, val: &str); #[wasm_bindgen(method, setter, js_name = "quality")] pub fn set_quality_with_js_value_3(this: &RequestInitCfPropertiesImage, val: &str); + #[wasm_bindgen(method, setter, js_name = "quality")] + pub fn set_quality_with_js_value_4(this: &RequestInitCfPropertiesImage, val: &str); #[doc = " Output format to generate. It can be:"] #[doc = " - avif: generate images in AVIF format."] #[doc = " - webp: generate images in Google WebP format. Set quality to 100 to get"] @@ -61153,8 +61567,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "format")] pub fn set_format_with_js_value(this: &RequestInitCfPropertiesImage, val: &str); #[wasm_bindgen(method, setter, js_name = "format")] - pub fn set_format_with_js_value_1(this: &RequestInitCfPropertiesImage, val: &str); - #[wasm_bindgen(method, setter, js_name = "format")] pub fn set_format_with_js_value_2(this: &RequestInitCfPropertiesImage, val: &str); #[wasm_bindgen(method, setter, js_name = "format")] pub fn set_format_with_js_value_3(this: &RequestInitCfPropertiesImage, val: &str); @@ -61164,6 +61576,8 @@ extern "C" { pub fn set_format_with_js_value_5(this: &RequestInitCfPropertiesImage, val: &str); #[wasm_bindgen(method, setter, js_name = "format")] pub fn set_format_with_js_value_6(this: &RequestInitCfPropertiesImage, val: &str); + #[wasm_bindgen(method, setter, js_name = "format")] + pub fn set_format_with_js_value_7(this: &RequestInitCfPropertiesImage, val: &str); #[doc = " Whether to preserve animation frames from input files. Default is true."] #[doc = " Setting it to false reduces animations to still images. This setting is"] #[doc = " recommended when enlarging images or processing arbitrary user content,"] @@ -61192,7 +61606,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "metadata")] pub fn set_metadata_with_js_value(this: &RequestInitCfPropertiesImage, val: &str); #[wasm_bindgen(method, setter, js_name = "metadata")] - pub fn set_metadata_with_js_value_1(this: &RequestInitCfPropertiesImage, val: &str); + pub fn set_metadata_with_js_value_2(this: &RequestInitCfPropertiesImage, val: &str); #[doc = " Strength of sharpening filter to apply to the image. Floating-point"] #[doc = " number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a"] #[doc = " recommended value for downscaled images."] @@ -61268,7 +61682,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "flip")] pub fn set_flip_with_js_value(this: &RequestInitCfPropertiesImage, val: &str); #[wasm_bindgen(method, setter, js_name = "flip")] - pub fn set_flip_with_js_value_1(this: &RequestInitCfPropertiesImage, val: &str); + pub fn set_flip_with_js_value_2(this: &RequestInitCfPropertiesImage, val: &str); #[doc = " Slightly reduces latency on a cache miss by selecting a"] #[doc = " quickest-to-compress file format, at a cost of increased file size and"] #[doc = " lower image quality. It will usually override the format option and choose"] @@ -61314,10 +61728,6 @@ impl RequestInitCfPropertiesImageBuilder { self.inner.set_quality_with_js_value(val); self } - pub fn quality_with_js_value_1(self, val: &str) -> Self { - self.inner.set_quality_with_js_value_1(val); - self - } pub fn quality_with_js_value_2(self, val: &str) -> Self { self.inner.set_quality_with_js_value_2(val); self @@ -61326,6 +61736,10 @@ impl RequestInitCfPropertiesImageBuilder { self.inner.set_quality_with_js_value_3(val); self } + pub fn quality_with_js_value_4(self, val: &str) -> Self { + self.inner.set_quality_with_js_value_4(val); + self + } pub fn format(self, val: &str) -> Self { self.inner.set_format(val); self @@ -61334,10 +61748,6 @@ impl RequestInitCfPropertiesImageBuilder { self.inner.set_format_with_js_value(val); self } - pub fn format_with_js_value_1(self, val: &str) -> Self { - self.inner.set_format_with_js_value_1(val); - self - } pub fn format_with_js_value_2(self, val: &str) -> Self { self.inner.set_format_with_js_value_2(val); self @@ -61358,6 +61768,10 @@ impl RequestInitCfPropertiesImageBuilder { self.inner.set_format_with_js_value_6(val); self } + pub fn format_with_js_value_7(self, val: &str) -> Self { + self.inner.set_format_with_js_value_7(val); + self + } pub fn anim(self, val: bool) -> Self { self.inner.set_anim(val); self @@ -61370,8 +61784,8 @@ impl RequestInitCfPropertiesImageBuilder { self.inner.set_metadata_with_js_value(val); self } - pub fn metadata_with_js_value_1(self, val: &str) -> Self { - self.inner.set_metadata_with_js_value_1(val); + pub fn metadata_with_js_value_2(self, val: &str) -> Self { + self.inner.set_metadata_with_js_value_2(val); self } pub fn sharpen(self, val: f64) -> Self { @@ -61418,8 +61832,8 @@ impl RequestInitCfPropertiesImageBuilder { self.inner.set_flip_with_js_value(val); self } - pub fn flip_with_js_value_1(self, val: &str) -> Self { - self.inner.set_flip_with_js_value_1(val); + pub fn flip_with_js_value_2(self, val: &str) -> Self { + self.inner.set_flip_with_js_value_2(val); self } pub fn compression(self, val: &str) -> Self { @@ -61512,7 +61926,7 @@ impl RequestInitCfPropertiesR2Builder { } } #[allow(dead_code)] -pub type IncomingRequestCfProperties = JsValue; +pub type IncomingRequestCfProperties = JsValue; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] @@ -61571,22 +61985,22 @@ extern "C" { val: f64, ); #[wasm_bindgen(method, setter, js_name = "edgeRequestKeepAliveStatus")] - pub fn set_edge_request_keep_alive_status_with_js_value_1( + pub fn set_edge_request_keep_alive_status_with_js_value_2( this: &IncomingRequestCfPropertiesBase, val: f64, ); #[wasm_bindgen(method, setter, js_name = "edgeRequestKeepAliveStatus")] - pub fn set_edge_request_keep_alive_status_with_js_value_2( + pub fn set_edge_request_keep_alive_status_with_js_value_3( this: &IncomingRequestCfPropertiesBase, val: f64, ); #[wasm_bindgen(method, setter, js_name = "edgeRequestKeepAliveStatus")] - pub fn set_edge_request_keep_alive_status_with_js_value_3( + pub fn set_edge_request_keep_alive_status_with_js_value_4( this: &IncomingRequestCfPropertiesBase, val: f64, ); #[wasm_bindgen(method, setter, js_name = "edgeRequestKeepAliveStatus")] - pub fn set_edge_request_keep_alive_status_with_js_value_4( + pub fn set_edge_request_keep_alive_status_with_js_value_5( this: &IncomingRequestCfPropertiesBase, val: f64, ); @@ -61972,7 +62386,9 @@ impl IncomingRequestCfPropertiesBotManagementEnterpriseBuilder { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type IncomingRequestCfPropertiesCloudflareForSaaSEnterprise; + pub type IncomingRequestCfPropertiesCloudflareForSaaSEnterprise< + HostMetadata: ::wasm_bindgen::JsGeneric, + >; #[doc = " Custom metadata set per-host in [Cloudflare for SaaS](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/)."] #[doc = ""] #[doc = " This field is only present if you have Cloudflare for SaaS enabled on your account"] @@ -63655,7 +64071,7 @@ pub enum ContinentCode { Sa, } #[allow(dead_code)] -pub type CfProperties = JsValue; +pub type CfProperties = JsValue; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] @@ -63858,7 +64274,7 @@ impl D1ResponseBuilder { } } #[allow(dead_code)] -pub type D1Result = JsValue; +pub type D1Result = JsValue; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] @@ -63920,10 +64336,10 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "prepare")] pub fn try_prepare(this: &D1Database, query: &str) -> Result; #[wasm_bindgen(method, catch)] - pub async fn batch( + pub async fn batch( this: &D1Database, statements: &Array, - ) -> Result, JsValue>; + ) -> Result>, JsValue>; #[wasm_bindgen(method, catch)] pub async fn exec(this: &D1Database, query: &str) -> Result; #[doc = " Creates a new D1 Session anchored at the given constraint or the bookmark."] @@ -64009,10 +64425,10 @@ extern "C" { query: &str, ) -> Result; #[wasm_bindgen(method, catch)] - pub async fn batch( + pub async fn batch( this: &D1DatabaseSession, statements: &Array, - ) -> Result, JsValue>; + ) -> Result>, JsValue>; #[doc = " If no query has been executed yet, `null` is returned."] #[doc = ""] #[doc = " ## Returns"] @@ -64041,27 +64457,36 @@ extern "C" { values: &[JsValue], ) -> Result; #[wasm_bindgen(method, catch)] - pub async fn first(this: &D1PreparedStatement, col_name: &str) -> Result; + pub async fn first( + this: &D1PreparedStatement, + col_name: &str, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch, js_name = "first")] - pub async fn first_1(this: &D1PreparedStatement) -> Result; + pub async fn first_2( + this: &D1PreparedStatement, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch)] - pub async fn run(this: &D1PreparedStatement) -> Result; + pub async fn run( + this: &D1PreparedStatement, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch)] - pub async fn all(this: &D1PreparedStatement) -> Result; + pub async fn all( + this: &D1PreparedStatement, + ) -> Result, JsValue>; #[wasm_bindgen(method, catch)] - pub async fn raw( + pub async fn raw( this: &D1PreparedStatement, options: &D1PreparedStatementOptions, - ) -> Result, Array)>, JsValue>; + ) -> Result, Array)>, JsValue>; #[wasm_bindgen(method, catch, js_name = "raw")] - pub async fn raw_1( + pub async fn raw_2( this: &D1PreparedStatement, - ) -> Result, Array)>, JsValue>; + ) -> Result, Array)>, JsValue>; #[wasm_bindgen(method, catch, js_name = "raw")] - pub async fn raw_with_d_1_prepared_statement_options_2( + pub async fn raw_with_d_1_prepared_statement_options_2( this: &D1PreparedStatement, options: &D1PreparedStatementOptions2, - ) -> Result, Array)>, JsValue>; + ) -> Result, Array)>, JsValue>; } #[wasm_bindgen] extern "C" { @@ -64198,7 +64623,7 @@ extern "C" { pub type ForwardableEmailMessage; #[doc = " Stream of the email message content."] #[wasm_bindgen(method, getter)] - pub fn raw(this: &ForwardableEmailMessage) -> ReadableStream; + pub fn raw(this: &ForwardableEmailMessage) -> ReadableStream; #[doc = " An [Headers object](https://developer.mozilla.org/en-US/docs/Web/API/Headers)."] #[wasm_bindgen(method, getter)] pub fn headers(this: &ForwardableEmailMessage) -> Headers; @@ -64811,8 +65236,9 @@ extern "C" { pub fn message(this: &EmailEvent) -> ForwardableEmailMessage; } #[allow(dead_code)] -pub type EmailExportedHandler = - Function JsOption>>; +pub type EmailExportedHandler = Function< + fn(ForwardableEmailMessage, Env, ExecutionContext) -> JsOption>, +>; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] @@ -64982,13 +65408,13 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "fit")] pub fn set_fit_with_js_value(this: &ImageTransform, val: &str); #[wasm_bindgen(method, setter, js_name = "fit")] - pub fn set_fit_with_js_value_1(this: &ImageTransform, val: &str); - #[wasm_bindgen(method, setter, js_name = "fit")] pub fn set_fit_with_js_value_2(this: &ImageTransform, val: &str); #[wasm_bindgen(method, setter, js_name = "fit")] pub fn set_fit_with_js_value_3(this: &ImageTransform, val: &str); #[wasm_bindgen(method, setter, js_name = "fit")] pub fn set_fit_with_js_value_4(this: &ImageTransform, val: &str); + #[wasm_bindgen(method, setter, js_name = "fit")] + pub fn set_fit_with_js_value_5(this: &ImageTransform, val: &str); #[wasm_bindgen(method, getter)] pub fn flip(this: &ImageTransform) -> Option; #[wasm_bindgen(method, setter)] @@ -64996,7 +65422,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "flip")] pub fn set_flip_with_js_value(this: &ImageTransform, val: &str); #[wasm_bindgen(method, setter, js_name = "flip")] - pub fn set_flip_with_js_value_1(this: &ImageTransform, val: &str); + pub fn set_flip_with_js_value_2(this: &ImageTransform, val: &str); #[wasm_bindgen(method, getter)] pub fn gamma(this: &ImageTransform) -> Option; #[wasm_bindgen(method, setter)] @@ -65012,8 +65438,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "gravity")] pub fn set_gravity_with_js_value(this: &ImageTransform, val: &str); #[wasm_bindgen(method, setter, js_name = "gravity")] - pub fn set_gravity_with_js_value_1(this: &ImageTransform, val: &str); - #[wasm_bindgen(method, setter, js_name = "gravity")] pub fn set_gravity_with_js_value_2(this: &ImageTransform, val: &str); #[wasm_bindgen(method, setter, js_name = "gravity")] pub fn set_gravity_with_js_value_3(this: &ImageTransform, val: &str); @@ -65024,6 +65448,8 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "gravity")] pub fn set_gravity_with_js_value_6(this: &ImageTransform, val: &str); #[wasm_bindgen(method, setter, js_name = "gravity")] + pub fn set_gravity_with_js_value_7(this: &ImageTransform, val: &str); + #[wasm_bindgen(method, setter, js_name = "gravity")] pub fn set_gravity_with_object(this: &ImageTransform, val: &Object); #[wasm_bindgen(method, getter)] pub fn rotate(this: &ImageTransform) -> Option; @@ -65032,9 +65458,9 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "rotate")] pub fn set_rotate_with_js_value(this: &ImageTransform, val: f64); #[wasm_bindgen(method, setter, js_name = "rotate")] - pub fn set_rotate_with_js_value_1(this: &ImageTransform, val: f64); - #[wasm_bindgen(method, setter, js_name = "rotate")] pub fn set_rotate_with_js_value_2(this: &ImageTransform, val: f64); + #[wasm_bindgen(method, setter, js_name = "rotate")] + pub fn set_rotate_with_js_value_3(this: &ImageTransform, val: f64); #[wasm_bindgen(method, getter)] pub fn saturation(this: &ImageTransform) -> Option; #[wasm_bindgen(method, setter)] @@ -65100,10 +65526,6 @@ impl ImageTransformBuilder { self.inner.set_fit_with_js_value(val); self } - pub fn fit_with_js_value_1(self, val: &str) -> Self { - self.inner.set_fit_with_js_value_1(val); - self - } pub fn fit_with_js_value_2(self, val: &str) -> Self { self.inner.set_fit_with_js_value_2(val); self @@ -65116,6 +65538,10 @@ impl ImageTransformBuilder { self.inner.set_fit_with_js_value_4(val); self } + pub fn fit_with_js_value_5(self, val: &str) -> Self { + self.inner.set_fit_with_js_value_5(val); + self + } pub fn flip(self, val: &str) -> Self { self.inner.set_flip(val); self @@ -65124,8 +65550,8 @@ impl ImageTransformBuilder { self.inner.set_flip_with_js_value(val); self } - pub fn flip_with_js_value_1(self, val: &str) -> Self { - self.inner.set_flip_with_js_value_1(val); + pub fn flip_with_js_value_2(self, val: &str) -> Self { + self.inner.set_flip_with_js_value_2(val); self } pub fn gamma(self, val: f64) -> Self { @@ -65144,10 +65570,6 @@ impl ImageTransformBuilder { self.inner.set_gravity_with_js_value(val); self } - pub fn gravity_with_js_value_1(self, val: &str) -> Self { - self.inner.set_gravity_with_js_value_1(val); - self - } pub fn gravity_with_js_value_2(self, val: &str) -> Self { self.inner.set_gravity_with_js_value_2(val); self @@ -65168,6 +65590,10 @@ impl ImageTransformBuilder { self.inner.set_gravity_with_js_value_6(val); self } + pub fn gravity_with_js_value_7(self, val: &str) -> Self { + self.inner.set_gravity_with_js_value_7(val); + self + } pub fn gravity_with_object(self, val: &Object) -> Self { self.inner.set_gravity_with_object(val); self @@ -65180,14 +65606,14 @@ impl ImageTransformBuilder { self.inner.set_rotate_with_js_value(val); self } - pub fn rotate_with_js_value_1(self, val: f64) -> Self { - self.inner.set_rotate_with_js_value_1(val); - self - } pub fn rotate_with_js_value_2(self, val: f64) -> Self { self.inner.set_rotate_with_js_value_2(val); self } + pub fn rotate_with_js_value_3(self, val: f64) -> Self { + self.inner.set_rotate_with_js_value_3(val); + self + } pub fn saturation(self, val: f64) -> Self { self.inner.set_saturation(val); self @@ -65330,8 +65756,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "format")] pub fn set_format_with_js_value(this: &ImageOutputOptions, val: &str); #[wasm_bindgen(method, setter, js_name = "format")] - pub fn set_format_with_js_value_1(this: &ImageOutputOptions, val: &str); - #[wasm_bindgen(method, setter, js_name = "format")] pub fn set_format_with_js_value_2(this: &ImageOutputOptions, val: &str); #[wasm_bindgen(method, setter, js_name = "format")] pub fn set_format_with_js_value_3(this: &ImageOutputOptions, val: &str); @@ -65339,6 +65763,8 @@ extern "C" { pub fn set_format_with_js_value_4(this: &ImageOutputOptions, val: &str); #[wasm_bindgen(method, setter, js_name = "format")] pub fn set_format_with_js_value_5(this: &ImageOutputOptions, val: &str); + #[wasm_bindgen(method, setter, js_name = "format")] + pub fn set_format_with_js_value_6(this: &ImageOutputOptions, val: &str); #[wasm_bindgen(method, getter)] pub fn quality(this: &ImageOutputOptions) -> Option; #[wasm_bindgen(method, setter)] @@ -65416,7 +65842,7 @@ impl ImageOutputOptions { #[doc = " * `format: \"image/gif\"`"] pub fn builder_imagegif() -> ImageOutputOptionsBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_format_with_js_value_1("image/gif"); + inner.set_format_with_js_value_2("image/gif"); ImageOutputOptionsBuilder { inner } } #[doc = " ## Inlined fields"] @@ -65424,7 +65850,7 @@ impl ImageOutputOptions { #[doc = " * `format: \"image/webp\"`"] pub fn builder_imagewebp() -> ImageOutputOptionsBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_format_with_js_value_2("image/webp"); + inner.set_format_with_js_value_3("image/webp"); ImageOutputOptionsBuilder { inner } } #[doc = " ## Inlined fields"] @@ -65432,7 +65858,7 @@ impl ImageOutputOptions { #[doc = " * `format: \"image/avif\"`"] pub fn builder_imageavif() -> ImageOutputOptionsBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_format_with_js_value_3("image/avif"); + inner.set_format_with_js_value_4("image/avif"); ImageOutputOptionsBuilder { inner } } #[doc = " ## Inlined fields"] @@ -65440,7 +65866,7 @@ impl ImageOutputOptions { #[doc = " * `format: \"rgb\"`"] pub fn builder_rgb() -> ImageOutputOptionsBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_format_with_js_value_4("rgb"); + inner.set_format_with_js_value_5("rgb"); ImageOutputOptionsBuilder { inner } } #[doc = " ## Inlined fields"] @@ -65448,7 +65874,7 @@ impl ImageOutputOptions { #[doc = " * `format: \"rgba\"`"] pub fn builder_rgba() -> ImageOutputOptionsBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_format_with_js_value_5("rgba"); + inner.set_format_with_js_value_6("rgba"); ImageOutputOptionsBuilder { inner } } } @@ -65827,7 +66253,7 @@ extern "C" { pub async fn image( this: &HostedImagesBinding, image_id: &str, - ) -> Result, JsValue>; + ) -> Result>, JsValue>; #[doc = " Upload a new hosted image"] #[doc = ""] #[doc = " ## Arguments"] @@ -65845,7 +66271,7 @@ extern "C" { #[wasm_bindgen(method, catch)] pub async fn upload( this: &HostedImagesBinding, - image: &ReadableStream, + image: &ReadableStream, ) -> Result; #[doc = " Upload a new hosted image"] #[doc = ""] @@ -65883,7 +66309,7 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "upload")] pub async fn upload_with_js_value_and_options( this: &HostedImagesBinding, - image: &ReadableStream, + image: &ReadableStream, options: &ImageUploadOptions, ) -> Result; #[doc = " Upload a new hosted image"] @@ -65988,7 +66414,7 @@ extern "C" { #[wasm_bindgen(method, catch)] pub async fn info( this: &ImagesBinding, - stream: &ReadableStream, + stream: &ReadableStream, ) -> Result; #[doc = " Get image metadata (type, width and height)"] #[doc = ""] @@ -66002,7 +66428,7 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "info")] pub async fn info_with_options( this: &ImagesBinding, - stream: &ReadableStream, + stream: &ReadableStream, options: &ImageInputOptions, ) -> Result; #[doc = " Begin applying a series of transformations to an image"] @@ -66015,7 +66441,7 @@ extern "C" { #[doc = ""] #[doc = " A transform handle"] #[wasm_bindgen(method)] - pub fn input(this: &ImagesBinding, stream: &ReadableStream) -> ImageTransformer; + pub fn input(this: &ImagesBinding, stream: &ReadableStream) -> ImageTransformer; #[doc = " Begin applying a series of transformations to an image"] #[doc = ""] #[doc = " ## Arguments"] @@ -66028,7 +66454,7 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "input")] pub fn try_input( this: &ImagesBinding, - stream: &ReadableStream, + stream: &ReadableStream, ) -> Result; #[doc = " Begin applying a series of transformations to an image"] #[doc = ""] @@ -66042,7 +66468,7 @@ extern "C" { #[wasm_bindgen(method, js_name = "input")] pub fn input_with_options( this: &ImagesBinding, - stream: &ReadableStream, + stream: &ReadableStream, options: &ImageInputOptions, ) -> ImageTransformer; #[doc = " Begin applying a series of transformations to an image"] @@ -66057,7 +66483,7 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "input")] pub fn try_input_with_options( this: &ImagesBinding, - stream: &ReadableStream, + stream: &ReadableStream, options: &ImageInputOptions, ) -> Result; #[doc = " Access hosted images CRUD operations"] @@ -66096,7 +66522,7 @@ extern "C" { #[doc = " * `image` - The image (or transformer that will give the image) to draw"] #[doc = " * `options` - The options configuring how to draw the image"] #[wasm_bindgen(method)] - pub fn draw(this: &ImageTransformer, image: &ReadableStream) -> ImageTransformer; + pub fn draw(this: &ImageTransformer, image: &ReadableStream) -> ImageTransformer; #[doc = " Draw an image on this transformer, returning a transform handle."] #[doc = " You can then apply more transformations, draw, or retrieve the output."] #[doc = ""] @@ -66107,7 +66533,7 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "draw")] pub fn try_draw( this: &ImageTransformer, - image: &ReadableStream, + image: &ReadableStream, ) -> Result; #[doc = " Draw an image on this transformer, returning a transform handle."] #[doc = " You can then apply more transformations, draw, or retrieve the output."] @@ -66143,7 +66569,7 @@ extern "C" { #[wasm_bindgen(method, js_name = "draw")] pub fn draw_with_js_value_and_options( this: &ImageTransformer, - image: &ReadableStream, + image: &ReadableStream, options: &ImageDrawOptions, ) -> ImageTransformer; #[doc = " Draw an image on this transformer, returning a transform handle."] @@ -66156,7 +66582,7 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "draw")] pub fn try_draw_with_js_value_and_options( this: &ImageTransformer, - image: &ReadableStream, + image: &ReadableStream, options: &ImageDrawOptions, ) -> Result; #[doc = " Draw an image on this transformer, returning a transform handle."] @@ -66248,22 +66674,24 @@ extern "C" { pub fn try_content_type(this: &ImageTransformationResult) -> Result; #[doc = " The bytes of the response"] #[wasm_bindgen(method)] - pub fn image(this: &ImageTransformationResult) -> ReadableStream; + pub fn image(this: &ImageTransformationResult) -> ReadableStream; #[doc = " The bytes of the response"] #[wasm_bindgen(method, catch, js_name = "image")] - pub fn try_image(this: &ImageTransformationResult) -> Result; + pub fn try_image( + this: &ImageTransformationResult, + ) -> Result, JsValue>; #[doc = " The bytes of the response"] #[wasm_bindgen(method, js_name = "image")] pub fn image_with_options( this: &ImageTransformationResult, options: &ImageTransformationOutputOptions, - ) -> ReadableStream; + ) -> ReadableStream; #[doc = " The bytes of the response"] #[wasm_bindgen(method, catch, js_name = "image")] pub fn try_image_with_options( this: &ImageTransformationResult, options: &ImageTransformationOutputOptions, - ) -> Result; + ) -> Result, JsValue>; } #[wasm_bindgen] extern "C" { @@ -66301,7 +66729,7 @@ extern "C" { #[doc = ""] #[doc = " A MediaTransformer instance for applying transformations"] #[wasm_bindgen(method)] - pub fn input(this: &MediaBinding, media: &ReadableStream) -> MediaTransformer; + pub fn input(this: &MediaBinding, media: &ReadableStream) -> MediaTransformer; #[doc = " Creates a media transformer from an input stream."] #[doc = ""] #[doc = " ## Arguments"] @@ -66314,7 +66742,7 @@ extern "C" { #[wasm_bindgen(method, catch, js_name = "input")] pub fn try_input( this: &MediaBinding, - media: &ReadableStream, + media: &ReadableStream, ) -> Result; } #[wasm_bindgen] @@ -66492,7 +66920,9 @@ extern "C" { #[doc = ""] #[doc = " A promise containing a readable stream with the transformed media"] #[wasm_bindgen(method, catch)] - pub async fn media(this: &MediaTransformationResult) -> Result; + pub async fn media( + this: &MediaTransformationResult, + ) -> Result, JsValue>; #[doc = " Returns the transformed media as an HTTP response object."] #[doc = ""] #[doc = " ## Returns"] @@ -66521,7 +66951,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "fit")] pub fn set_fit_with_js_value(this: &MediaTransformationInputOptions, val: &str); #[wasm_bindgen(method, setter, js_name = "fit")] - pub fn set_fit_with_js_value_1(this: &MediaTransformationInputOptions, val: &str); + pub fn set_fit_with_js_value_2(this: &MediaTransformationInputOptions, val: &str); #[doc = " Target width in pixels"] #[wasm_bindgen(method, getter)] pub fn width(this: &MediaTransformationInputOptions) -> Option; @@ -66555,8 +66985,8 @@ impl MediaTransformationInputOptionsBuilder { self.inner.set_fit_with_js_value(val); self } - pub fn fit_with_js_value_1(self, val: &str) -> Self { - self.inner.set_fit_with_js_value_1(val); + pub fn fit_with_js_value_2(self, val: &str) -> Self { + self.inner.set_fit_with_js_value_2(val); self } pub fn width(self, val: f64) -> Self { @@ -66584,9 +67014,9 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "mode")] pub fn set_mode_with_js_value(this: &MediaTransformationOutputOptions, val: &str); #[wasm_bindgen(method, setter, js_name = "mode")] - pub fn set_mode_with_js_value_1(this: &MediaTransformationOutputOptions, val: &str); - #[wasm_bindgen(method, setter, js_name = "mode")] pub fn set_mode_with_js_value_2(this: &MediaTransformationOutputOptions, val: &str); + #[wasm_bindgen(method, setter, js_name = "mode")] + pub fn set_mode_with_js_value_3(this: &MediaTransformationOutputOptions, val: &str); #[doc = " Whether to include audio in the output"] #[wasm_bindgen(method, getter)] pub fn audio(this: &MediaTransformationOutputOptions) -> Option; @@ -66615,7 +67045,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "format")] pub fn set_format_with_js_value(this: &MediaTransformationOutputOptions, val: &str); #[wasm_bindgen(method, setter, js_name = "format")] - pub fn set_format_with_js_value_1(this: &MediaTransformationOutputOptions, val: &str); + pub fn set_format_with_js_value_2(this: &MediaTransformationOutputOptions, val: &str); } impl MediaTransformationOutputOptions { pub fn new() -> MediaTransformationOutputOptions { @@ -66639,14 +67069,14 @@ impl MediaTransformationOutputOptionsBuilder { self.inner.set_mode_with_js_value(val); self } - pub fn mode_with_js_value_1(self, val: &str) -> Self { - self.inner.set_mode_with_js_value_1(val); - self - } pub fn mode_with_js_value_2(self, val: &str) -> Self { self.inner.set_mode_with_js_value_2(val); self } + pub fn mode_with_js_value_3(self, val: &str) -> Self { + self.inner.set_mode_with_js_value_3(val); + self + } pub fn audio(self, val: bool) -> Self { self.inner.set_audio(val); self @@ -66671,8 +67101,8 @@ impl MediaTransformationOutputOptionsBuilder { self.inner.set_format_with_js_value(val); self } - pub fn format_with_js_value_1(self, val: &str) -> Self { - self.inner.set_format_with_js_value_1(val); + pub fn format_with_js_value_2(self, val: &str) -> Self { + self.inner.set_format_with_js_value_2(val); self } pub fn build(self) -> MediaTransformationOutputOptions { @@ -66701,16 +67131,19 @@ impl MediaError { } } #[allow(dead_code)] -pub type Params = Object; +pub type Params

= Object; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] pub type EventContext; #[wasm_bindgen(method, getter)] - pub fn request(this: &EventContext) -> Request; + pub fn request(this: &EventContext) -> Request>; #[wasm_bindgen(method, setter)] - pub fn set_request(this: &EventContext, val: &Request); + pub fn set_request( + this: &EventContext, + val: &Request>, + ); #[wasm_bindgen(method, getter, js_name = "functionPath")] pub fn function_path(this: &EventContext) -> String; #[wasm_bindgen(method, setter, js_name = "functionPath")] @@ -66735,9 +67168,9 @@ extern "C" { #[wasm_bindgen(method, setter)] pub fn set_env(this: &EventContext, val: &JsValue); #[wasm_bindgen(method, getter)] - pub fn params(this: &EventContext) -> Params; + pub fn params(this: &EventContext) -> Params

; #[wasm_bindgen(method, setter)] - pub fn set_params(this: &EventContext, val: &Params); + pub fn set_params(this: &EventContext, val: &Params

); #[wasm_bindgen(method, getter)] pub fn data(this: &EventContext) -> Data; #[wasm_bindgen(method, setter)] @@ -66755,13 +67188,13 @@ impl EventContext { #[doc = " * `params`"] #[doc = " * `data`"] pub fn new( - request: &Request, + request: &Request>, function_path: &str, wait_until: &Function Undefined>, pass_through_on_exception: &Function Undefined>, next: &Function Promise>, env: &JsValue, - params: &Params, + params: &Params

, data: &Data, ) -> EventContext { Self::builder( @@ -66787,13 +67220,13 @@ impl EventContext { #[doc = " * `params`"] #[doc = " * `data`"] pub fn builder( - request: &Request, + request: &Request>, function_path: &str, wait_until: &Function Undefined>, pass_through_on_exception: &Function Undefined>, next: &Function Promise>, env: &JsValue, - params: &Params, + params: &Params

, data: &Data, ) -> EventContextBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); @@ -66817,16 +67250,21 @@ impl EventContextBuilder { } } #[allow(dead_code)] -pub type PagesFunction = Function JsValue>; +pub type PagesFunction = Function JsValue>; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] pub type EventPluginContext; #[wasm_bindgen(method, getter)] - pub fn request(this: &EventPluginContext) -> Request; + pub fn request( + this: &EventPluginContext, + ) -> Request>; #[wasm_bindgen(method, setter)] - pub fn set_request(this: &EventPluginContext, val: &Request); + pub fn set_request( + this: &EventPluginContext, + val: &Request>, + ); #[wasm_bindgen(method, getter, js_name = "functionPath")] pub fn function_path(this: &EventPluginContext) -> String; #[wasm_bindgen(method, setter, js_name = "functionPath")] @@ -66856,9 +67294,9 @@ extern "C" { #[wasm_bindgen(method, setter)] pub fn set_env(this: &EventPluginContext, val: &JsValue); #[wasm_bindgen(method, getter)] - pub fn params(this: &EventPluginContext) -> Params; + pub fn params(this: &EventPluginContext) -> Params

; #[wasm_bindgen(method, setter)] - pub fn set_params(this: &EventPluginContext, val: &Params); + pub fn set_params(this: &EventPluginContext, val: &Params

); #[wasm_bindgen(method, getter)] pub fn data(this: &EventPluginContext) -> Data; #[wasm_bindgen(method, setter)] @@ -66881,13 +67319,13 @@ impl EventPluginContext { #[doc = " * `data`"] #[doc = " * `plugin_args`"] pub fn new( - request: &Request, + request: &Request>, function_path: &str, wait_until: &Function Undefined>, pass_through_on_exception: &Function Undefined>, next: &Function Promise>, env: &JsValue, - params: &Params, + params: &Params

, data: &Data, plugin_args: &PluginArgs, ) -> EventPluginContext { @@ -66916,13 +67354,13 @@ impl EventPluginContext { #[doc = " * `data`"] #[doc = " * `plugin_args`"] pub fn builder( - request: &Request, + request: &Request>, function_path: &str, wait_until: &Function Undefined>, pass_through_on_exception: &Function Undefined>, next: &Function Promise>, env: &JsValue, - params: &Params, + params: &Params

, data: &Data, plugin_args: &PluginArgs, ) -> EventPluginContextBuilder { @@ -66948,7 +67386,8 @@ impl EventPluginContextBuilder { } } #[allow(dead_code)] -pub type PagesPluginFunction = Function JsValue>; +pub type PagesPluginFunction = + Function JsValue>; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = Object)] @@ -67155,11 +67594,13 @@ pub mod rpc { extern "C" { # [wasm_bindgen (extends = Disposable , extends = Object , js_namespace = "Rpc")] #[derive(Debug, Clone, PartialEq, Eq)] - pub type StubBase; + pub type StubBase; #[wasm_bindgen(method)] - pub fn dup(this: &StubBase) -> JsValue; + pub fn dup(this: &StubBase) -> JsValue; #[wasm_bindgen(method, catch, js_name = "dup")] - pub fn try_dup(this: &StubBase) -> Result; + pub fn try_dup( + this: &StubBase, + ) -> Result; } } pub mod cloudflare { @@ -67198,81 +67639,96 @@ pub mod cloudflare_workers_module { extern "C" { # [wasm_bindgen (extends = Object , js_namespace = "CloudflareWorkersModule")] #[derive(Debug, Clone, PartialEq, Eq)] - pub type WorkerEntrypoint; + pub type WorkerEntrypoint< + Env: ::wasm_bindgen::JsGeneric, + Props: ::wasm_bindgen::JsGeneric, + >; #[wasm_bindgen(method, getter)] - pub fn ctx(this: &WorkerEntrypoint) -> ExecutionContext; + pub fn ctx(this: &WorkerEntrypoint) -> ExecutionContext; #[wasm_bindgen(method, setter)] - pub fn set_ctx(this: &WorkerEntrypoint, val: &ExecutionContext); + pub fn set_ctx(this: &WorkerEntrypoint, val: &ExecutionContext); #[wasm_bindgen(method, getter)] pub fn env(this: &WorkerEntrypoint) -> Env; #[wasm_bindgen(method, setter)] pub fn set_env(this: &WorkerEntrypoint, val: &Env); #[wasm_bindgen(method)] - pub fn email( - this: &WorkerEntrypoint, + pub fn email( + this: &WorkerEntrypoint, message: &ForwardableEmailMessage, ) -> Option>; #[wasm_bindgen(method, catch, js_name = "email")] - pub fn try_email( - this: &WorkerEntrypoint, + pub fn try_email( + this: &WorkerEntrypoint, message: &ForwardableEmailMessage, ) -> Result>, JsValue>; #[wasm_bindgen(method)] - pub fn fetch(this: &WorkerEntrypoint, request: &Request) -> JsValue; + pub fn fetch( + this: &WorkerEntrypoint, + request: &Request, + ) -> JsValue; #[wasm_bindgen(method, catch, js_name = "fetch")] - pub fn try_fetch(this: &WorkerEntrypoint, request: &Request) -> Result; + pub fn try_fetch( + this: &WorkerEntrypoint, + request: &Request, + ) -> Result; #[wasm_bindgen(method)] - pub fn queue(this: &WorkerEntrypoint, batch: &MessageBatch) -> Option>; + pub fn queue( + this: &WorkerEntrypoint, + batch: &MessageBatch, + ) -> Option>; #[wasm_bindgen(method, catch, js_name = "queue")] - pub fn try_queue( - this: &WorkerEntrypoint, - batch: &MessageBatch, + pub fn try_queue( + this: &WorkerEntrypoint, + batch: &MessageBatch, ) -> Result>, JsValue>; #[wasm_bindgen(method)] - pub fn scheduled( - this: &WorkerEntrypoint, + pub fn scheduled( + this: &WorkerEntrypoint, controller: &ScheduledController, ) -> Option>; #[wasm_bindgen(method, catch, js_name = "scheduled")] - pub fn try_scheduled( - this: &WorkerEntrypoint, + pub fn try_scheduled( + this: &WorkerEntrypoint, controller: &ScheduledController, ) -> Result>, JsValue>; #[wasm_bindgen(method)] - pub fn tail( - this: &WorkerEntrypoint, + pub fn tail( + this: &WorkerEntrypoint, events: &Array, ) -> Option>; #[wasm_bindgen(method, catch, js_name = "tail")] - pub fn try_tail( - this: &WorkerEntrypoint, + pub fn try_tail( + this: &WorkerEntrypoint, events: &Array, ) -> Result>, JsValue>; #[wasm_bindgen(method, js_name = "tailStream")] - pub fn tail_stream(this: &WorkerEntrypoint, event: &TailEvent) -> JsValue; + pub fn tail_stream( + this: &WorkerEntrypoint, + event: &TailEvent, + ) -> JsValue; #[wasm_bindgen(method, catch, js_name = "tailStream")] - pub fn try_tail_stream( - this: &WorkerEntrypoint, + pub fn try_tail_stream( + this: &WorkerEntrypoint, event: &TailEvent, ) -> Result; #[wasm_bindgen(method)] - pub fn test( - this: &WorkerEntrypoint, + pub fn test( + this: &WorkerEntrypoint, controller: &TestController, ) -> Option>; #[wasm_bindgen(method, catch, js_name = "test")] - pub fn try_test( - this: &WorkerEntrypoint, + pub fn try_test( + this: &WorkerEntrypoint, controller: &TestController, ) -> Result>, JsValue>; #[wasm_bindgen(method)] - pub fn trace( - this: &WorkerEntrypoint, + pub fn trace( + this: &WorkerEntrypoint, traces: &Array, ) -> Option>; #[wasm_bindgen(method, catch, js_name = "trace")] - pub fn try_trace( - this: &WorkerEntrypoint, + pub fn try_trace( + this: &WorkerEntrypoint, traces: &Array, ) -> Result>, JsValue>; } @@ -67280,82 +67736,116 @@ pub mod cloudflare_workers_module { extern "C" { # [wasm_bindgen (extends = Object , js_namespace = "CloudflareWorkersModule")] #[derive(Debug, Clone, PartialEq, Eq)] - pub type DurableObject; + pub type DurableObject; #[wasm_bindgen(method, getter)] - pub fn ctx(this: &DurableObject) -> DurableObjectState; + pub fn ctx(this: &DurableObject) -> DurableObjectState; #[wasm_bindgen(method, setter)] - pub fn set_ctx(this: &DurableObject, val: &DurableObjectState); + pub fn set_ctx(this: &DurableObject, val: &DurableObjectState); #[wasm_bindgen(method, getter)] pub fn env(this: &DurableObject) -> Env; #[wasm_bindgen(method, setter)] pub fn set_env(this: &DurableObject, val: &Env); #[wasm_bindgen(method)] - pub fn alarm(this: &DurableObject) -> Option>; + pub fn alarm( + this: &DurableObject, + ) -> Option>; #[wasm_bindgen(method, catch, js_name = "alarm")] - pub fn try_alarm(this: &DurableObject) -> Result>, JsValue>; + pub fn try_alarm( + this: &DurableObject, + ) -> Result>, JsValue>; #[wasm_bindgen(method, js_name = "alarm")] - pub fn alarm_with_alarm_info( - this: &DurableObject, + pub fn alarm_with_alarm_info< + Env: ::wasm_bindgen::JsGeneric, + Props: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObject, alarm_info: &AlarmInvocationInfo, ) -> Option>; #[wasm_bindgen(method, catch, js_name = "alarm")] - pub fn try_alarm_with_alarm_info( - this: &DurableObject, + pub fn try_alarm_with_alarm_info< + Env: ::wasm_bindgen::JsGeneric, + Props: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObject, alarm_info: &AlarmInvocationInfo, ) -> Result>, JsValue>; #[wasm_bindgen(method)] - pub fn fetch(this: &DurableObject, request: &Request) -> JsValue; + pub fn fetch( + this: &DurableObject, + request: &Request, + ) -> JsValue; #[wasm_bindgen(method, catch, js_name = "fetch")] - pub fn try_fetch(this: &DurableObject, request: &Request) -> Result; + pub fn try_fetch( + this: &DurableObject, + request: &Request, + ) -> Result; #[wasm_bindgen(method, js_name = "webSocketMessage")] - pub fn web_socket_message( - this: &DurableObject, + pub fn web_socket_message< + Env: ::wasm_bindgen::JsGeneric, + Props: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObject, ws: &WebSocket, message: &str, ) -> Option>; #[wasm_bindgen(method, catch, js_name = "webSocketMessage")] - pub fn try_web_socket_message( - this: &DurableObject, + pub fn try_web_socket_message< + Env: ::wasm_bindgen::JsGeneric, + Props: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObject, ws: &WebSocket, message: &str, ) -> Result>, JsValue>; #[wasm_bindgen(method, js_name = "webSocketMessage")] - pub fn web_socket_message_with_array_buffer( - this: &DurableObject, + pub fn web_socket_message_with_array_buffer< + Env: ::wasm_bindgen::JsGeneric, + Props: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObject, ws: &WebSocket, message: &ArrayBuffer, ) -> Option>; #[wasm_bindgen(method, catch, js_name = "webSocketMessage")] - pub fn try_web_socket_message_with_array_buffer( - this: &DurableObject, + pub fn try_web_socket_message_with_array_buffer< + Env: ::wasm_bindgen::JsGeneric, + Props: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObject, ws: &WebSocket, message: &ArrayBuffer, ) -> Result>, JsValue>; #[wasm_bindgen(method, js_name = "webSocketClose")] - pub fn web_socket_close( - this: &DurableObject, + pub fn web_socket_close( + this: &DurableObject, ws: &WebSocket, code: f64, reason: &str, was_clean: bool, ) -> Option>; #[wasm_bindgen(method, catch, js_name = "webSocketClose")] - pub fn try_web_socket_close( - this: &DurableObject, + pub fn try_web_socket_close< + Env: ::wasm_bindgen::JsGeneric, + Props: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObject, ws: &WebSocket, code: f64, reason: &str, was_clean: bool, ) -> Result>, JsValue>; #[wasm_bindgen(method, js_name = "webSocketError")] - pub fn web_socket_error( - this: &DurableObject, + pub fn web_socket_error( + this: &DurableObject, ws: &WebSocket, error: &JsValue, ) -> Option>; #[wasm_bindgen(method, catch, js_name = "webSocketError")] - pub fn try_web_socket_error( - this: &DurableObject, + pub fn try_web_socket_error< + Env: ::wasm_bindgen::JsGeneric, + Props: ::wasm_bindgen::JsGeneric, + >( + this: &DurableObject, ws: &WebSocket, error: &JsValue, ) -> Result>, JsValue>; @@ -67578,18 +68068,18 @@ pub mod cloudflare_workers_module { #[derive(Debug, Clone, PartialEq, Eq)] pub type WorkflowStep; #[wasm_bindgen(method, catch)] - pub async fn r#do( + pub async fn r#do( this: &WorkflowStep, name: &str, callback: &Function Promise>, - ) -> Result; + ) -> Result; #[wasm_bindgen(method, catch, js_name = "do")] - pub async fn do_with_config( + pub async fn do_with_config( this: &WorkflowStep, name: &str, config: &JsValue, callback: &Function Promise>, - ) -> Result; + ) -> Result; #[wasm_bindgen(method, getter)] pub fn sleep(this: &WorkflowStep) -> Function Promise>; #[wasm_bindgen(method, setter)] @@ -67607,7 +68097,7 @@ pub mod cloudflare_workers_module { val: &Function Promise>, ); #[wasm_bindgen(method, catch, js_name = "waitForEvent")] - pub async fn wait_for_event( + pub async fn wait_for_event( this: &WorkflowStep, name: &str, options: &WorkflowStepOptions, @@ -67687,7 +68177,7 @@ pub mod cloudflare_workers_module { extern "C" { # [wasm_bindgen (extends = Object , js_namespace = "CloudflareWorkersModule")] #[derive(Debug, Clone, PartialEq, Eq)] - pub type WorkflowEntrypoint; + pub type WorkflowEntrypoint; #[wasm_bindgen(method, getter)] pub fn ctx(this: &WorkflowEntrypoint) -> ExecutionContext; #[wasm_bindgen(method, setter)] @@ -67697,8 +68187,8 @@ pub mod cloudflare_workers_module { #[wasm_bindgen(method, setter)] pub fn set_env(this: &WorkflowEntrypoint, val: &Env); #[wasm_bindgen(method, catch)] - pub async fn run( - this: &WorkflowEntrypoint, + pub async fn run( + this: &WorkflowEntrypoint, event: &Readonly, step: &WorkflowStep, ) -> Result; @@ -69335,7 +69825,7 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value(this: &StreamCaption, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] - pub fn set_status_with_js_value_1(this: &StreamCaption, val: &str); + pub fn set_status_with_js_value_2(this: &StreamCaption, val: &str); } impl StreamCaption { #[doc = " ## Arguments"] @@ -69372,8 +69862,8 @@ impl StreamCaptionBuilder { self.inner.set_status_with_js_value(val); self } - pub fn status_with_js_value_1(self, val: &str) -> Self { - self.inner.set_status_with_js_value_1(val); + pub fn status_with_js_value_2(self, val: &str) -> Self { + self.inner.set_status_with_js_value_2(val); self } pub fn build(self) -> StreamCaption { @@ -70386,13 +70876,13 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "descriptionLanguage")] pub fn set_description_language_with_js_value(this: &ImageConversionOptions, val: &str); #[wasm_bindgen(method, setter, js_name = "descriptionLanguage")] - pub fn set_description_language_with_js_value_1(this: &ImageConversionOptions, val: &str); - #[wasm_bindgen(method, setter, js_name = "descriptionLanguage")] pub fn set_description_language_with_js_value_2(this: &ImageConversionOptions, val: &str); #[wasm_bindgen(method, setter, js_name = "descriptionLanguage")] pub fn set_description_language_with_js_value_3(this: &ImageConversionOptions, val: &str); #[wasm_bindgen(method, setter, js_name = "descriptionLanguage")] pub fn set_description_language_with_js_value_4(this: &ImageConversionOptions, val: &str); + #[wasm_bindgen(method, setter, js_name = "descriptionLanguage")] + pub fn set_description_language_with_js_value_5(this: &ImageConversionOptions, val: &str); } impl ImageConversionOptions { pub fn new() -> ImageConversionOptions { @@ -70416,10 +70906,6 @@ impl ImageConversionOptionsBuilder { self.inner.set_description_language_with_js_value(val); self } - pub fn description_language_with_js_value_1(self, val: &str) -> Self { - self.inner.set_description_language_with_js_value_1(val); - self - } pub fn description_language_with_js_value_2(self, val: &str) -> Self { self.inner.set_description_language_with_js_value_2(val); self @@ -70432,6 +70918,10 @@ impl ImageConversionOptionsBuilder { self.inner.set_description_language_with_js_value_4(val); self } + pub fn description_language_with_js_value_5(self, val: &str) -> Self { + self.inner.set_description_language_with_js_value_5(val); + self + } pub fn build(self) -> ImageConversionOptions { self.inner } @@ -71220,7 +71710,7 @@ pub mod tail_stream { extern "C" { # [wasm_bindgen (extends = Object , js_namespace = "TailStream")] #[derive(Debug, Clone, PartialEq, Eq)] - pub type TailEvent; + pub type TailEvent; #[wasm_bindgen(method, getter, js_name = "invocationId")] pub fn invocation_id(this: &TailEvent) -> String; #[wasm_bindgen(method, getter, js_name = "spanContext")] @@ -72481,7 +72971,7 @@ extern "C" { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type Workflow; + pub type Workflow; #[doc = " Get a handle to an existing instance of the Workflow."] #[doc = ""] #[doc = " ## Arguments"] @@ -72492,7 +72982,10 @@ extern "C" { #[doc = ""] #[doc = " A promise that resolves with a handle for the Instance"] #[wasm_bindgen(method, catch)] - pub async fn get(this: &Workflow, id: &str) -> Result; + pub async fn get( + this: &Workflow, + id: &str, + ) -> Result; #[doc = " Create a new instance and return a handle to it. If a provided id exists, an error will be thrown."] #[doc = ""] #[doc = " ## Arguments"] @@ -72503,7 +72996,9 @@ extern "C" { #[doc = ""] #[doc = " A promise that resolves with a handle for the Instance"] #[wasm_bindgen(method, catch)] - pub async fn create(this: &Workflow) -> Result; + pub async fn create( + this: &Workflow, + ) -> Result; #[doc = " Create a new instance and return a handle to it. If a provided id exists, an error will be thrown."] #[doc = ""] #[doc = " ## Arguments"] @@ -72514,9 +73009,9 @@ extern "C" { #[doc = ""] #[doc = " A promise that resolves with a handle for the Instance"] #[wasm_bindgen(method, catch, js_name = "create")] - pub async fn create_with_options( - this: &Workflow, - options: &WorkflowInstanceCreateOptions, + pub async fn create_with_options( + this: &Workflow, + options: &WorkflowInstanceCreateOptions, ) -> Result; #[doc = " Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown."] #[doc = " `createBatch` is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached."] @@ -72529,9 +73024,9 @@ extern "C" { #[doc = ""] #[doc = " A promise that resolves with a list of handles for the created instances."] #[wasm_bindgen(method, catch, js_name = "createBatch")] - pub async fn create_batch( - this: &Workflow, - batch: &Array, + pub async fn create_batch( + this: &Workflow, + batch: &Array>, ) -> Result, JsValue>; } #[wasm_bindgen] @@ -72558,7 +73053,7 @@ pub type WorkflowSleepDuration = JsValue; extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type WorkflowInstanceCreateOptions; + pub type WorkflowInstanceCreateOptions; #[doc = " An id for your Workflow instance. Must be unique within the Workflow."] #[wasm_bindgen(method, getter)] pub fn id(this: &WorkflowInstanceCreateOptions) -> Option; @@ -72618,8 +73113,6 @@ extern "C" { #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value(this: &InstanceStatus, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] - pub fn set_status_with_js_value_1(this: &InstanceStatus, val: &str); - #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value_2(this: &InstanceStatus, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value_3(this: &InstanceStatus, val: &str); @@ -72631,6 +73124,8 @@ extern "C" { pub fn set_status_with_js_value_6(this: &InstanceStatus, val: &str); #[wasm_bindgen(method, setter, js_name = "status")] pub fn set_status_with_js_value_7(this: &InstanceStatus, val: &str); + #[wasm_bindgen(method, setter, js_name = "status")] + pub fn set_status_with_js_value_8(this: &InstanceStatus, val: &str); #[wasm_bindgen(method, getter)] pub fn error(this: &InstanceStatus) -> Option; #[wasm_bindgen(method, setter)] @@ -72716,7 +73211,7 @@ impl InstanceStatus { #[doc = " * `status: \"paused\"`"] pub fn builder_paused() -> InstanceStatusBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_status_with_js_value_1("paused"); + inner.set_status_with_js_value_2("paused"); InstanceStatusBuilder { inner } } #[doc = " ## Inlined fields"] @@ -72724,7 +73219,7 @@ impl InstanceStatus { #[doc = " * `status: \"errored\"`"] pub fn builder_errored() -> InstanceStatusBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_status_with_js_value_2("errored"); + inner.set_status_with_js_value_3("errored"); InstanceStatusBuilder { inner } } #[doc = " ## Inlined fields"] @@ -72732,7 +73227,7 @@ impl InstanceStatus { #[doc = " * `status: \"terminated\"`"] pub fn builder_terminated() -> InstanceStatusBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_status_with_js_value_3("terminated"); + inner.set_status_with_js_value_4("terminated"); InstanceStatusBuilder { inner } } #[doc = " ## Inlined fields"] @@ -72740,7 +73235,7 @@ impl InstanceStatus { #[doc = " * `status: \"complete\"`"] pub fn builder_complete() -> InstanceStatusBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_status_with_js_value_4("complete"); + inner.set_status_with_js_value_5("complete"); InstanceStatusBuilder { inner } } #[doc = " ## Inlined fields"] @@ -72748,7 +73243,7 @@ impl InstanceStatus { #[doc = " * `status: \"waiting\"`"] pub fn builder_waiting() -> InstanceStatusBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_status_with_js_value_5("waiting"); + inner.set_status_with_js_value_6("waiting"); InstanceStatusBuilder { inner } } #[doc = " ## Inlined fields"] @@ -72756,7 +73251,7 @@ impl InstanceStatus { #[doc = " * `status: \"waitingForPause\"`"] pub fn builder_waiting_for_pause() -> InstanceStatusBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_status_with_js_value_6("waitingForPause"); + inner.set_status_with_js_value_7("waitingForPause"); InstanceStatusBuilder { inner } } #[doc = " ## Inlined fields"] @@ -72764,7 +73259,7 @@ impl InstanceStatus { #[doc = " * `status: \"unknown\"`"] pub fn builder_unknown() -> InstanceStatusBuilder { let inner: Self = JsCast::unchecked_into(js_sys::Object::new()); - inner.set_status_with_js_value_7("unknown"); + inner.set_status_with_js_value_8("unknown"); InstanceStatusBuilder { inner } } } @@ -72960,7 +73455,11 @@ pub mod pipelines { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type PipelineTransformationEntrypoint; + pub type PipelineTransformationEntrypoint< + Env: ::wasm_bindgen::JsGeneric, + I: ::wasm_bindgen::JsGeneric, + O: ::wasm_bindgen::JsGeneric, + >; #[wasm_bindgen(method, getter)] pub fn env(this: &PipelineTransformationEntrypoint) -> Env; #[wasm_bindgen(method, setter)] @@ -72981,8 +73480,12 @@ pub mod pipelines { #[doc = ""] #[doc = " A promise containing the transformed PipelineRecord array"] #[wasm_bindgen(method, catch)] - pub async fn run( - this: &PipelineTransformationEntrypoint, + pub async fn run< + Env: ::wasm_bindgen::JsGeneric, + I: ::wasm_bindgen::JsGeneric, + O: ::wasm_bindgen::JsGeneric, + >( + this: &PipelineTransformationEntrypoint, records: &Array, metadata: &PipelineBatchMetadata, ) -> Result, JsValue>; @@ -73034,14 +73537,17 @@ pub mod pipelines { extern "C" { # [wasm_bindgen (extends = Object)] #[derive(Debug, Clone, PartialEq, Eq)] - pub type Pipeline; + pub type Pipeline; #[doc = " The Pipeline interface represents the type of a binding to a Pipeline"] #[doc = ""] #[doc = " ## Arguments"] #[doc = ""] #[doc = " * `records` - The records to send to the pipeline"] #[wasm_bindgen(method, catch)] - pub async fn send(this: &Pipeline, records: &Array) -> Result; + pub async fn send( + this: &Pipeline, + records: &Array, + ) -> Result; } } pub mod sockets {