Path: blob/main/crates/component-macro/tests/expanded/integers_concurrent.rs
1692 views
/// Auto-generated bindings for a pre-instantiated version of a1/// component which implements the world `the-world`.2///3/// This structure is created through [`TheWorldPre::new`] which4/// takes a [`InstancePre`](wasmtime::component::InstancePre) that5/// has been created through a [`Linker`](wasmtime::component::Linker).6///7/// For more information see [`TheWorld`] as well.8pub struct TheWorldPre<T: 'static> {9instance_pre: wasmtime::component::InstancePre<T>,10indices: TheWorldIndices,11}12impl<T: 'static> Clone for TheWorldPre<T> {13fn clone(&self) -> Self {14Self {15instance_pre: self.instance_pre.clone(),16indices: self.indices.clone(),17}18}19}20impl<_T: 'static> TheWorldPre<_T> {21/// Creates a new copy of `TheWorldPre` bindings which can then22/// be used to instantiate into a particular store.23///24/// This method may fail if the component behind `instance_pre`25/// does not have the required exports.26pub fn new(27instance_pre: wasmtime::component::InstancePre<_T>,28) -> wasmtime::Result<Self> {29let indices = TheWorldIndices::new(&instance_pre)?;30Ok(Self { instance_pre, indices })31}32pub fn engine(&self) -> &wasmtime::Engine {33self.instance_pre.engine()34}35pub fn instance_pre(&self) -> &wasmtime::component::InstancePre<_T> {36&self.instance_pre37}38/// Instantiates a new instance of [`TheWorld`] within the39/// `store` provided.40///41/// This function will use `self` as the pre-instantiated42/// instance to perform instantiation. Afterwards the preloaded43/// indices in `self` are used to lookup all exports on the44/// resulting instance.45pub fn instantiate(46&self,47mut store: impl wasmtime::AsContextMut<Data = _T>,48) -> wasmtime::Result<TheWorld> {49let mut store = store.as_context_mut();50let instance = self.instance_pre.instantiate(&mut store)?;51self.indices.load(&mut store, &instance)52}53}54impl<_T: Send + 'static> TheWorldPre<_T> {55/// Same as [`Self::instantiate`], except with `async`.56pub async fn instantiate_async(57&self,58mut store: impl wasmtime::AsContextMut<Data = _T>,59) -> wasmtime::Result<TheWorld> {60let mut store = store.as_context_mut();61let instance = self.instance_pre.instantiate_async(&mut store).await?;62self.indices.load(&mut store, &instance)63}64}65/// Auto-generated bindings for index of the exports of66/// `the-world`.67///68/// This is an implementation detail of [`TheWorldPre`] and can69/// be constructed if needed as well.70///71/// For more information see [`TheWorld`] as well.72#[derive(Clone)]73pub struct TheWorldIndices {74interface0: exports::foo::foo::integers::GuestIndices,75}76/// Auto-generated bindings for an instance a component which77/// implements the world `the-world`.78///79/// This structure can be created through a number of means80/// depending on your requirements and what you have on hand:81///82/// * The most convenient way is to use83/// [`TheWorld::instantiate`] which only needs a84/// [`Store`], [`Component`], and [`Linker`].85///86/// * Alternatively you can create a [`TheWorldPre`] ahead of87/// time with a [`Component`] to front-load string lookups88/// of exports once instead of per-instantiation. This89/// method then uses [`TheWorldPre::instantiate`] to90/// create a [`TheWorld`].91///92/// * If you've instantiated the instance yourself already93/// then you can use [`TheWorld::new`].94///95/// These methods are all equivalent to one another and move96/// around the tradeoff of what work is performed when.97///98/// [`Store`]: wasmtime::Store99/// [`Component`]: wasmtime::component::Component100/// [`Linker`]: wasmtime::component::Linker101pub struct TheWorld {102interface0: exports::foo::foo::integers::Guest,103}104const _: () = {105#[allow(unused_imports)]106use wasmtime::component::__internal::anyhow;107impl TheWorldIndices {108/// Creates a new copy of `TheWorldIndices` bindings which can then109/// be used to instantiate into a particular store.110///111/// This method may fail if the component does not have the112/// required exports.113pub fn new<_T>(114_instance_pre: &wasmtime::component::InstancePre<_T>,115) -> wasmtime::Result<Self> {116let _component = _instance_pre.component();117let _instance_type = _instance_pre.instance_type();118let interface0 = exports::foo::foo::integers::GuestIndices::new(119_instance_pre,120)?;121Ok(TheWorldIndices { interface0 })122}123/// Uses the indices stored in `self` to load an instance124/// of [`TheWorld`] from the instance provided.125///126/// Note that at this time this method will additionally127/// perform type-checks of all exports.128pub fn load(129&self,130mut store: impl wasmtime::AsContextMut,131instance: &wasmtime::component::Instance,132) -> wasmtime::Result<TheWorld> {133let _ = &mut store;134let _instance = instance;135let interface0 = self.interface0.load(&mut store, &_instance)?;136Ok(TheWorld { interface0 })137}138}139impl TheWorld {140/// Convenience wrapper around [`TheWorldPre::new`] and141/// [`TheWorldPre::instantiate`].142pub fn instantiate<_T>(143store: impl wasmtime::AsContextMut<Data = _T>,144component: &wasmtime::component::Component,145linker: &wasmtime::component::Linker<_T>,146) -> wasmtime::Result<TheWorld> {147let pre = linker.instantiate_pre(component)?;148TheWorldPre::new(pre)?.instantiate(store)149}150/// Convenience wrapper around [`TheWorldIndices::new`] and151/// [`TheWorldIndices::load`].152pub fn new(153mut store: impl wasmtime::AsContextMut,154instance: &wasmtime::component::Instance,155) -> wasmtime::Result<TheWorld> {156let indices = TheWorldIndices::new(&instance.instance_pre(&store))?;157indices.load(&mut store, instance)158}159/// Convenience wrapper around [`TheWorldPre::new`] and160/// [`TheWorldPre::instantiate_async`].161pub async fn instantiate_async<_T>(162store: impl wasmtime::AsContextMut<Data = _T>,163component: &wasmtime::component::Component,164linker: &wasmtime::component::Linker<_T>,165) -> wasmtime::Result<TheWorld>166where167_T: Send,168{169let pre = linker.instantiate_pre(component)?;170TheWorldPre::new(pre)?.instantiate_async(store).await171}172pub fn add_to_linker<T, D>(173linker: &mut wasmtime::component::Linker<T>,174host_getter: fn(&mut T) -> D::Data<'_>,175) -> wasmtime::Result<()>176where177D: foo::foo::integers::HostWithStore + Send,178for<'a> D::Data<'a>: foo::foo::integers::Host + Send,179T: 'static + Send,180{181foo::foo::integers::add_to_linker::<T, D>(linker, host_getter)?;182Ok(())183}184pub fn foo_foo_integers(&self) -> &exports::foo::foo::integers::Guest {185&self.interface0186}187}188};189pub mod foo {190pub mod foo {191#[allow(clippy::all)]192pub mod integers {193#[allow(unused_imports)]194use wasmtime::component::__internal::{anyhow, Box};195pub trait HostWithStore: wasmtime::component::HasData + Send {196fn a1<T>(197accessor: &wasmtime::component::Accessor<T, Self>,198x: u8,199) -> impl ::core::future::Future<Output = ()> + Send;200fn a2<T>(201accessor: &wasmtime::component::Accessor<T, Self>,202x: i8,203) -> impl ::core::future::Future<Output = ()> + Send;204fn a3<T>(205accessor: &wasmtime::component::Accessor<T, Self>,206x: u16,207) -> impl ::core::future::Future<Output = ()> + Send;208fn a4<T>(209accessor: &wasmtime::component::Accessor<T, Self>,210x: i16,211) -> impl ::core::future::Future<Output = ()> + Send;212fn a5<T>(213accessor: &wasmtime::component::Accessor<T, Self>,214x: u32,215) -> impl ::core::future::Future<Output = ()> + Send;216fn a6<T>(217accessor: &wasmtime::component::Accessor<T, Self>,218x: i32,219) -> impl ::core::future::Future<Output = ()> + Send;220fn a7<T>(221accessor: &wasmtime::component::Accessor<T, Self>,222x: u64,223) -> impl ::core::future::Future<Output = ()> + Send;224fn a8<T>(225accessor: &wasmtime::component::Accessor<T, Self>,226x: i64,227) -> impl ::core::future::Future<Output = ()> + Send;228fn a9<T>(229accessor: &wasmtime::component::Accessor<T, Self>,230p1: u8,231p2: i8,232p3: u16,233p4: i16,234p5: u32,235p6: i32,236p7: u64,237p8: i64,238) -> impl ::core::future::Future<Output = ()> + Send;239fn r1<T>(240accessor: &wasmtime::component::Accessor<T, Self>,241) -> impl ::core::future::Future<Output = u8> + Send;242fn r2<T>(243accessor: &wasmtime::component::Accessor<T, Self>,244) -> impl ::core::future::Future<Output = i8> + Send;245fn r3<T>(246accessor: &wasmtime::component::Accessor<T, Self>,247) -> impl ::core::future::Future<Output = u16> + Send;248fn r4<T>(249accessor: &wasmtime::component::Accessor<T, Self>,250) -> impl ::core::future::Future<Output = i16> + Send;251fn r5<T>(252accessor: &wasmtime::component::Accessor<T, Self>,253) -> impl ::core::future::Future<Output = u32> + Send;254fn r6<T>(255accessor: &wasmtime::component::Accessor<T, Self>,256) -> impl ::core::future::Future<Output = i32> + Send;257fn r7<T>(258accessor: &wasmtime::component::Accessor<T, Self>,259) -> impl ::core::future::Future<Output = u64> + Send;260fn r8<T>(261accessor: &wasmtime::component::Accessor<T, Self>,262) -> impl ::core::future::Future<Output = i64> + Send;263fn pair_ret<T>(264accessor: &wasmtime::component::Accessor<T, Self>,265) -> impl ::core::future::Future<Output = (i64, u8)> + Send;266}267pub trait Host: Send {}268impl<_T: Host + ?Sized + Send> Host for &mut _T {}269pub fn add_to_linker<T, D>(270linker: &mut wasmtime::component::Linker<T>,271host_getter: fn(&mut T) -> D::Data<'_>,272) -> wasmtime::Result<()>273where274D: HostWithStore,275for<'a> D::Data<'a>: Host,276T: 'static + Send,277{278let mut inst = linker.instance("foo:foo/integers")?;279inst.func_wrap_concurrent(280"a1",281move |caller: &wasmtime::component::Accessor<T>, (arg0,): (u8,)| {282wasmtime::component::__internal::Box::pin(async move {283let host = &caller.with_getter(host_getter);284let r = <D as HostWithStore>::a1(host, arg0).await;285Ok(r)286})287},288)?;289inst.func_wrap_concurrent(290"a2",291move |caller: &wasmtime::component::Accessor<T>, (arg0,): (i8,)| {292wasmtime::component::__internal::Box::pin(async move {293let host = &caller.with_getter(host_getter);294let r = <D as HostWithStore>::a2(host, arg0).await;295Ok(r)296})297},298)?;299inst.func_wrap_concurrent(300"a3",301move |caller: &wasmtime::component::Accessor<T>, (arg0,): (u16,)| {302wasmtime::component::__internal::Box::pin(async move {303let host = &caller.with_getter(host_getter);304let r = <D as HostWithStore>::a3(host, arg0).await;305Ok(r)306})307},308)?;309inst.func_wrap_concurrent(310"a4",311move |caller: &wasmtime::component::Accessor<T>, (arg0,): (i16,)| {312wasmtime::component::__internal::Box::pin(async move {313let host = &caller.with_getter(host_getter);314let r = <D as HostWithStore>::a4(host, arg0).await;315Ok(r)316})317},318)?;319inst.func_wrap_concurrent(320"a5",321move |caller: &wasmtime::component::Accessor<T>, (arg0,): (u32,)| {322wasmtime::component::__internal::Box::pin(async move {323let host = &caller.with_getter(host_getter);324let r = <D as HostWithStore>::a5(host, arg0).await;325Ok(r)326})327},328)?;329inst.func_wrap_concurrent(330"a6",331move |caller: &wasmtime::component::Accessor<T>, (arg0,): (i32,)| {332wasmtime::component::__internal::Box::pin(async move {333let host = &caller.with_getter(host_getter);334let r = <D as HostWithStore>::a6(host, arg0).await;335Ok(r)336})337},338)?;339inst.func_wrap_concurrent(340"a7",341move |caller: &wasmtime::component::Accessor<T>, (arg0,): (u64,)| {342wasmtime::component::__internal::Box::pin(async move {343let host = &caller.with_getter(host_getter);344let r = <D as HostWithStore>::a7(host, arg0).await;345Ok(r)346})347},348)?;349inst.func_wrap_concurrent(350"a8",351move |caller: &wasmtime::component::Accessor<T>, (arg0,): (i64,)| {352wasmtime::component::__internal::Box::pin(async move {353let host = &caller.with_getter(host_getter);354let r = <D as HostWithStore>::a8(host, arg0).await;355Ok(r)356})357},358)?;359inst.func_wrap_concurrent(360"a9",361move |362caller: &wasmtime::component::Accessor<T>,363(364arg0,365arg1,366arg2,367arg3,368arg4,369arg5,370arg6,371arg7,372): (u8, i8, u16, i16, u32, i32, u64, i64)|373{374wasmtime::component::__internal::Box::pin(async move {375let host = &caller.with_getter(host_getter);376let r = <D as HostWithStore>::a9(377host,378arg0,379arg1,380arg2,381arg3,382arg4,383arg5,384arg6,385arg7,386)387.await;388Ok(r)389})390},391)?;392inst.func_wrap_concurrent(393"r1",394move |caller: &wasmtime::component::Accessor<T>, (): ()| {395wasmtime::component::__internal::Box::pin(async move {396let host = &caller.with_getter(host_getter);397let r = <D as HostWithStore>::r1(host).await;398Ok((r,))399})400},401)?;402inst.func_wrap_concurrent(403"r2",404move |caller: &wasmtime::component::Accessor<T>, (): ()| {405wasmtime::component::__internal::Box::pin(async move {406let host = &caller.with_getter(host_getter);407let r = <D as HostWithStore>::r2(host).await;408Ok((r,))409})410},411)?;412inst.func_wrap_concurrent(413"r3",414move |caller: &wasmtime::component::Accessor<T>, (): ()| {415wasmtime::component::__internal::Box::pin(async move {416let host = &caller.with_getter(host_getter);417let r = <D as HostWithStore>::r3(host).await;418Ok((r,))419})420},421)?;422inst.func_wrap_concurrent(423"r4",424move |caller: &wasmtime::component::Accessor<T>, (): ()| {425wasmtime::component::__internal::Box::pin(async move {426let host = &caller.with_getter(host_getter);427let r = <D as HostWithStore>::r4(host).await;428Ok((r,))429})430},431)?;432inst.func_wrap_concurrent(433"r5",434move |caller: &wasmtime::component::Accessor<T>, (): ()| {435wasmtime::component::__internal::Box::pin(async move {436let host = &caller.with_getter(host_getter);437let r = <D as HostWithStore>::r5(host).await;438Ok((r,))439})440},441)?;442inst.func_wrap_concurrent(443"r6",444move |caller: &wasmtime::component::Accessor<T>, (): ()| {445wasmtime::component::__internal::Box::pin(async move {446let host = &caller.with_getter(host_getter);447let r = <D as HostWithStore>::r6(host).await;448Ok((r,))449})450},451)?;452inst.func_wrap_concurrent(453"r7",454move |caller: &wasmtime::component::Accessor<T>, (): ()| {455wasmtime::component::__internal::Box::pin(async move {456let host = &caller.with_getter(host_getter);457let r = <D as HostWithStore>::r7(host).await;458Ok((r,))459})460},461)?;462inst.func_wrap_concurrent(463"r8",464move |caller: &wasmtime::component::Accessor<T>, (): ()| {465wasmtime::component::__internal::Box::pin(async move {466let host = &caller.with_getter(host_getter);467let r = <D as HostWithStore>::r8(host).await;468Ok((r,))469})470},471)?;472inst.func_wrap_concurrent(473"pair-ret",474move |caller: &wasmtime::component::Accessor<T>, (): ()| {475wasmtime::component::__internal::Box::pin(async move {476let host = &caller.with_getter(host_getter);477let r = <D as HostWithStore>::pair_ret(host).await;478Ok((r,))479})480},481)?;482Ok(())483}484}485}486}487pub mod exports {488pub mod foo {489pub mod foo {490#[allow(clippy::all)]491pub mod integers {492#[allow(unused_imports)]493use wasmtime::component::__internal::{anyhow, Box};494pub struct Guest {495a1: wasmtime::component::Func,496a2: wasmtime::component::Func,497a3: wasmtime::component::Func,498a4: wasmtime::component::Func,499a5: wasmtime::component::Func,500a6: wasmtime::component::Func,501a7: wasmtime::component::Func,502a8: wasmtime::component::Func,503a9: wasmtime::component::Func,504r1: wasmtime::component::Func,505r2: wasmtime::component::Func,506r3: wasmtime::component::Func,507r4: wasmtime::component::Func,508r5: wasmtime::component::Func,509r6: wasmtime::component::Func,510r7: wasmtime::component::Func,511r8: wasmtime::component::Func,512pair_ret: wasmtime::component::Func,513}514#[derive(Clone)]515pub struct GuestIndices {516a1: wasmtime::component::ComponentExportIndex,517a2: wasmtime::component::ComponentExportIndex,518a3: wasmtime::component::ComponentExportIndex,519a4: wasmtime::component::ComponentExportIndex,520a5: wasmtime::component::ComponentExportIndex,521a6: wasmtime::component::ComponentExportIndex,522a7: wasmtime::component::ComponentExportIndex,523a8: wasmtime::component::ComponentExportIndex,524a9: wasmtime::component::ComponentExportIndex,525r1: wasmtime::component::ComponentExportIndex,526r2: wasmtime::component::ComponentExportIndex,527r3: wasmtime::component::ComponentExportIndex,528r4: wasmtime::component::ComponentExportIndex,529r5: wasmtime::component::ComponentExportIndex,530r6: wasmtime::component::ComponentExportIndex,531r7: wasmtime::component::ComponentExportIndex,532r8: wasmtime::component::ComponentExportIndex,533pair_ret: wasmtime::component::ComponentExportIndex,534}535impl GuestIndices {536/// Constructor for [`GuestIndices`] which takes a537/// [`Component`](wasmtime::component::Component) as input and can be executed538/// before instantiation.539///540/// This constructor can be used to front-load string lookups to find exports541/// within a component.542pub fn new<_T>(543_instance_pre: &wasmtime::component::InstancePre<_T>,544) -> wasmtime::Result<GuestIndices> {545let instance = _instance_pre546.component()547.get_export_index(None, "foo:foo/integers")548.ok_or_else(|| {549anyhow::anyhow!(550"no exported instance named `foo:foo/integers`"551)552})?;553let mut lookup = move |name| {554_instance_pre555.component()556.get_export_index(Some(&instance), name)557.ok_or_else(|| {558anyhow::anyhow!(559"instance export `foo:foo/integers` does \560not have export `{name}`"561)562})563};564let _ = &mut lookup;565let a1 = lookup("a1")?;566let a2 = lookup("a2")?;567let a3 = lookup("a3")?;568let a4 = lookup("a4")?;569let a5 = lookup("a5")?;570let a6 = lookup("a6")?;571let a7 = lookup("a7")?;572let a8 = lookup("a8")?;573let a9 = lookup("a9")?;574let r1 = lookup("r1")?;575let r2 = lookup("r2")?;576let r3 = lookup("r3")?;577let r4 = lookup("r4")?;578let r5 = lookup("r5")?;579let r6 = lookup("r6")?;580let r7 = lookup("r7")?;581let r8 = lookup("r8")?;582let pair_ret = lookup("pair-ret")?;583Ok(GuestIndices {584a1,585a2,586a3,587a4,588a5,589a6,590a7,591a8,592a9,593r1,594r2,595r3,596r4,597r5,598r6,599r7,600r8,601pair_ret,602})603}604pub fn load(605&self,606mut store: impl wasmtime::AsContextMut,607instance: &wasmtime::component::Instance,608) -> wasmtime::Result<Guest> {609let _instance = instance;610let _instance_pre = _instance.instance_pre(&store);611let _instance_type = _instance_pre.instance_type();612let mut store = store.as_context_mut();613let _ = &mut store;614let a1 = *_instance615.get_typed_func::<(u8,), ()>(&mut store, &self.a1)?616.func();617let a2 = *_instance618.get_typed_func::<(i8,), ()>(&mut store, &self.a2)?619.func();620let a3 = *_instance621.get_typed_func::<(u16,), ()>(&mut store, &self.a3)?622.func();623let a4 = *_instance624.get_typed_func::<(i16,), ()>(&mut store, &self.a4)?625.func();626let a5 = *_instance627.get_typed_func::<(u32,), ()>(&mut store, &self.a5)?628.func();629let a6 = *_instance630.get_typed_func::<(i32,), ()>(&mut store, &self.a6)?631.func();632let a7 = *_instance633.get_typed_func::<(u64,), ()>(&mut store, &self.a7)?634.func();635let a8 = *_instance636.get_typed_func::<(i64,), ()>(&mut store, &self.a8)?637.func();638let a9 = *_instance639.get_typed_func::<640(u8, i8, u16, i16, u32, i32, u64, i64),641(),642>(&mut store, &self.a9)?643.func();644let r1 = *_instance645.get_typed_func::<(), (u8,)>(&mut store, &self.r1)?646.func();647let r2 = *_instance648.get_typed_func::<(), (i8,)>(&mut store, &self.r2)?649.func();650let r3 = *_instance651.get_typed_func::<(), (u16,)>(&mut store, &self.r3)?652.func();653let r4 = *_instance654.get_typed_func::<(), (i16,)>(&mut store, &self.r4)?655.func();656let r5 = *_instance657.get_typed_func::<(), (u32,)>(&mut store, &self.r5)?658.func();659let r6 = *_instance660.get_typed_func::<(), (i32,)>(&mut store, &self.r6)?661.func();662let r7 = *_instance663.get_typed_func::<(), (u64,)>(&mut store, &self.r7)?664.func();665let r8 = *_instance666.get_typed_func::<(), (i64,)>(&mut store, &self.r8)?667.func();668let pair_ret = *_instance669.get_typed_func::<670(),671((i64, u8),),672>(&mut store, &self.pair_ret)?673.func();674Ok(Guest {675a1,676a2,677a3,678a4,679a5,680a6,681a7,682a8,683a9,684r1,685r2,686r3,687r4,688r5,689r6,690r7,691r8,692pair_ret,693})694}695}696impl Guest {697pub async fn call_a1<_T, _D>(698&self,699accessor: &wasmtime::component::Accessor<_T, _D>,700arg0: u8,701) -> wasmtime::Result<()>702where703_T: Send,704_D: wasmtime::component::HasData,705{706let callee = unsafe {707wasmtime::component::TypedFunc::<708(u8,),709(),710>::new_unchecked(self.a1)711};712let () = callee.call_concurrent(accessor, (arg0,)).await?;713Ok(())714}715pub async fn call_a2<_T, _D>(716&self,717accessor: &wasmtime::component::Accessor<_T, _D>,718arg0: i8,719) -> wasmtime::Result<()>720where721_T: Send,722_D: wasmtime::component::HasData,723{724let callee = unsafe {725wasmtime::component::TypedFunc::<726(i8,),727(),728>::new_unchecked(self.a2)729};730let () = callee.call_concurrent(accessor, (arg0,)).await?;731Ok(())732}733pub async fn call_a3<_T, _D>(734&self,735accessor: &wasmtime::component::Accessor<_T, _D>,736arg0: u16,737) -> wasmtime::Result<()>738where739_T: Send,740_D: wasmtime::component::HasData,741{742let callee = unsafe {743wasmtime::component::TypedFunc::<744(u16,),745(),746>::new_unchecked(self.a3)747};748let () = callee.call_concurrent(accessor, (arg0,)).await?;749Ok(())750}751pub async fn call_a4<_T, _D>(752&self,753accessor: &wasmtime::component::Accessor<_T, _D>,754arg0: i16,755) -> wasmtime::Result<()>756where757_T: Send,758_D: wasmtime::component::HasData,759{760let callee = unsafe {761wasmtime::component::TypedFunc::<762(i16,),763(),764>::new_unchecked(self.a4)765};766let () = callee.call_concurrent(accessor, (arg0,)).await?;767Ok(())768}769pub async fn call_a5<_T, _D>(770&self,771accessor: &wasmtime::component::Accessor<_T, _D>,772arg0: u32,773) -> wasmtime::Result<()>774where775_T: Send,776_D: wasmtime::component::HasData,777{778let callee = unsafe {779wasmtime::component::TypedFunc::<780(u32,),781(),782>::new_unchecked(self.a5)783};784let () = callee.call_concurrent(accessor, (arg0,)).await?;785Ok(())786}787pub async fn call_a6<_T, _D>(788&self,789accessor: &wasmtime::component::Accessor<_T, _D>,790arg0: i32,791) -> wasmtime::Result<()>792where793_T: Send,794_D: wasmtime::component::HasData,795{796let callee = unsafe {797wasmtime::component::TypedFunc::<798(i32,),799(),800>::new_unchecked(self.a6)801};802let () = callee.call_concurrent(accessor, (arg0,)).await?;803Ok(())804}805pub async fn call_a7<_T, _D>(806&self,807accessor: &wasmtime::component::Accessor<_T, _D>,808arg0: u64,809) -> wasmtime::Result<()>810where811_T: Send,812_D: wasmtime::component::HasData,813{814let callee = unsafe {815wasmtime::component::TypedFunc::<816(u64,),817(),818>::new_unchecked(self.a7)819};820let () = callee.call_concurrent(accessor, (arg0,)).await?;821Ok(())822}823pub async fn call_a8<_T, _D>(824&self,825accessor: &wasmtime::component::Accessor<_T, _D>,826arg0: i64,827) -> wasmtime::Result<()>828where829_T: Send,830_D: wasmtime::component::HasData,831{832let callee = unsafe {833wasmtime::component::TypedFunc::<834(i64,),835(),836>::new_unchecked(self.a8)837};838let () = callee.call_concurrent(accessor, (arg0,)).await?;839Ok(())840}841pub async fn call_a9<_T, _D>(842&self,843accessor: &wasmtime::component::Accessor<_T, _D>,844arg0: u8,845arg1: i8,846arg2: u16,847arg3: i16,848arg4: u32,849arg5: i32,850arg6: u64,851arg7: i64,852) -> wasmtime::Result<()>853where854_T: Send,855_D: wasmtime::component::HasData,856{857let callee = unsafe {858wasmtime::component::TypedFunc::<859(u8, i8, u16, i16, u32, i32, u64, i64),860(),861>::new_unchecked(self.a9)862};863let () = callee864.call_concurrent(865accessor,866(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7),867)868.await?;869Ok(())870}871pub async fn call_r1<_T, _D>(872&self,873accessor: &wasmtime::component::Accessor<_T, _D>,874) -> wasmtime::Result<u8>875where876_T: Send,877_D: wasmtime::component::HasData,878{879let callee = unsafe {880wasmtime::component::TypedFunc::<881(),882(u8,),883>::new_unchecked(self.r1)884};885let (ret0,) = callee.call_concurrent(accessor, ()).await?;886Ok(ret0)887}888pub async fn call_r2<_T, _D>(889&self,890accessor: &wasmtime::component::Accessor<_T, _D>,891) -> wasmtime::Result<i8>892where893_T: Send,894_D: wasmtime::component::HasData,895{896let callee = unsafe {897wasmtime::component::TypedFunc::<898(),899(i8,),900>::new_unchecked(self.r2)901};902let (ret0,) = callee.call_concurrent(accessor, ()).await?;903Ok(ret0)904}905pub async fn call_r3<_T, _D>(906&self,907accessor: &wasmtime::component::Accessor<_T, _D>,908) -> wasmtime::Result<u16>909where910_T: Send,911_D: wasmtime::component::HasData,912{913let callee = unsafe {914wasmtime::component::TypedFunc::<915(),916(u16,),917>::new_unchecked(self.r3)918};919let (ret0,) = callee.call_concurrent(accessor, ()).await?;920Ok(ret0)921}922pub async fn call_r4<_T, _D>(923&self,924accessor: &wasmtime::component::Accessor<_T, _D>,925) -> wasmtime::Result<i16>926where927_T: Send,928_D: wasmtime::component::HasData,929{930let callee = unsafe {931wasmtime::component::TypedFunc::<932(),933(i16,),934>::new_unchecked(self.r4)935};936let (ret0,) = callee.call_concurrent(accessor, ()).await?;937Ok(ret0)938}939pub async fn call_r5<_T, _D>(940&self,941accessor: &wasmtime::component::Accessor<_T, _D>,942) -> wasmtime::Result<u32>943where944_T: Send,945_D: wasmtime::component::HasData,946{947let callee = unsafe {948wasmtime::component::TypedFunc::<949(),950(u32,),951>::new_unchecked(self.r5)952};953let (ret0,) = callee.call_concurrent(accessor, ()).await?;954Ok(ret0)955}956pub async fn call_r6<_T, _D>(957&self,958accessor: &wasmtime::component::Accessor<_T, _D>,959) -> wasmtime::Result<i32>960where961_T: Send,962_D: wasmtime::component::HasData,963{964let callee = unsafe {965wasmtime::component::TypedFunc::<966(),967(i32,),968>::new_unchecked(self.r6)969};970let (ret0,) = callee.call_concurrent(accessor, ()).await?;971Ok(ret0)972}973pub async fn call_r7<_T, _D>(974&self,975accessor: &wasmtime::component::Accessor<_T, _D>,976) -> wasmtime::Result<u64>977where978_T: Send,979_D: wasmtime::component::HasData,980{981let callee = unsafe {982wasmtime::component::TypedFunc::<983(),984(u64,),985>::new_unchecked(self.r7)986};987let (ret0,) = callee.call_concurrent(accessor, ()).await?;988Ok(ret0)989}990pub async fn call_r8<_T, _D>(991&self,992accessor: &wasmtime::component::Accessor<_T, _D>,993) -> wasmtime::Result<i64>994where995_T: Send,996_D: wasmtime::component::HasData,997{998let callee = unsafe {999wasmtime::component::TypedFunc::<1000(),1001(i64,),1002>::new_unchecked(self.r8)1003};1004let (ret0,) = callee.call_concurrent(accessor, ()).await?;1005Ok(ret0)1006}1007pub async fn call_pair_ret<_T, _D>(1008&self,1009accessor: &wasmtime::component::Accessor<_T, _D>,1010) -> wasmtime::Result<(i64, u8)>1011where1012_T: Send,1013_D: wasmtime::component::HasData,1014{1015let callee = unsafe {1016wasmtime::component::TypedFunc::<1017(),1018((i64, u8),),1019>::new_unchecked(self.pair_ret)1020};1021let (ret0,) = callee.call_concurrent(accessor, ()).await?;1022Ok(ret0)1023}1024}1025}1026}1027}1028}102910301031