Path: blob/main/crates/component-macro/tests/expanded/lists_concurrent.rs
3071 views
/// Auto-generated bindings for a pre-instantiated version of a1/// component which implements the world `the-lists`.2///3/// This structure is created through [`TheListsPre::new`] which4/// takes a [`InstancePre`](wasmtime::component::InstancePre) that5/// has been created through a [`Linker`](wasmtime::component::Linker).6///7/// For more information see [`TheLists`] as well.8pub struct TheListsPre<T: 'static> {9instance_pre: wasmtime::component::InstancePre<T>,10indices: TheListsIndices,11}12impl<T: 'static> Clone for TheListsPre<T> {13fn clone(&self) -> Self {14Self {15instance_pre: self.instance_pre.clone(),16indices: self.indices.clone(),17}18}19}20impl<_T: 'static> TheListsPre<_T> {21/// Creates a new copy of `TheListsPre` 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 = TheListsIndices::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 [`TheLists`] 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<TheLists> {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> TheListsPre<_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<TheLists> {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-lists`.67///68/// This is an implementation detail of [`TheListsPre`] and can69/// be constructed if needed as well.70///71/// For more information see [`TheLists`] as well.72#[derive(Clone)]73pub struct TheListsIndices {74interface0: exports::foo::foo::lists::GuestIndices,75}76/// Auto-generated bindings for an instance a component which77/// implements the world `the-lists`.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/// [`TheLists::instantiate`] which only needs a84/// [`Store`], [`Component`], and [`Linker`].85///86/// * Alternatively you can create a [`TheListsPre`] ahead of87/// time with a [`Component`] to front-load string lookups88/// of exports once instead of per-instantiation. This89/// method then uses [`TheListsPre::instantiate`] to90/// create a [`TheLists`].91///92/// * If you've instantiated the instance yourself already93/// then you can use [`TheLists::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 TheLists {102interface0: exports::foo::foo::lists::Guest,103}104const _: () = {105impl TheListsIndices {106/// Creates a new copy of `TheListsIndices` bindings which can then107/// be used to instantiate into a particular store.108///109/// This method may fail if the component does not have the110/// required exports.111pub fn new<_T>(112_instance_pre: &wasmtime::component::InstancePre<_T>,113) -> wasmtime::Result<Self> {114let _component = _instance_pre.component();115let _instance_type = _instance_pre.instance_type();116let interface0 = exports::foo::foo::lists::GuestIndices::new(_instance_pre)?;117Ok(TheListsIndices { interface0 })118}119/// Uses the indices stored in `self` to load an instance120/// of [`TheLists`] from the instance provided.121///122/// Note that at this time this method will additionally123/// perform type-checks of all exports.124pub fn load(125&self,126mut store: impl wasmtime::AsContextMut,127instance: &wasmtime::component::Instance,128) -> wasmtime::Result<TheLists> {129let _ = &mut store;130let _instance = instance;131let interface0 = self.interface0.load(&mut store, &_instance)?;132Ok(TheLists { interface0 })133}134}135impl TheLists {136/// Convenience wrapper around [`TheListsPre::new`] and137/// [`TheListsPre::instantiate`].138pub fn instantiate<_T>(139store: impl wasmtime::AsContextMut<Data = _T>,140component: &wasmtime::component::Component,141linker: &wasmtime::component::Linker<_T>,142) -> wasmtime::Result<TheLists> {143let pre = linker.instantiate_pre(component)?;144TheListsPre::new(pre)?.instantiate(store)145}146/// Convenience wrapper around [`TheListsIndices::new`] and147/// [`TheListsIndices::load`].148pub fn new(149mut store: impl wasmtime::AsContextMut,150instance: &wasmtime::component::Instance,151) -> wasmtime::Result<TheLists> {152let indices = TheListsIndices::new(&instance.instance_pre(&store))?;153indices.load(&mut store, instance)154}155/// Convenience wrapper around [`TheListsPre::new`] and156/// [`TheListsPre::instantiate_async`].157pub async fn instantiate_async<_T>(158store: impl wasmtime::AsContextMut<Data = _T>,159component: &wasmtime::component::Component,160linker: &wasmtime::component::Linker<_T>,161) -> wasmtime::Result<TheLists>162where163_T: Send,164{165let pre = linker.instantiate_pre(component)?;166TheListsPre::new(pre)?.instantiate_async(store).await167}168pub fn add_to_linker<T, D>(169linker: &mut wasmtime::component::Linker<T>,170host_getter: fn(&mut T) -> D::Data<'_>,171) -> wasmtime::Result<()>172where173D: foo::foo::lists::HostWithStore + Send,174for<'a> D::Data<'a>: foo::foo::lists::Host + Send,175T: 'static + Send,176{177foo::foo::lists::add_to_linker::<T, D>(linker, host_getter)?;178Ok(())179}180pub fn foo_foo_lists(&self) -> &exports::foo::foo::lists::Guest {181&self.interface0182}183}184};185pub mod foo {186pub mod foo {187#[allow(clippy::all)]188pub mod lists {189#[allow(unused_imports)]190use wasmtime::component::__internal::Box;191#[derive(wasmtime::component::ComponentType)]192#[derive(wasmtime::component::Lift)]193#[derive(wasmtime::component::Lower)]194#[component(record)]195#[derive(Clone)]196pub struct OtherRecord {197#[component(name = "a1")]198pub a1: u32,199#[component(name = "a2")]200pub a2: u64,201#[component(name = "a3")]202pub a3: i32,203#[component(name = "a4")]204pub a4: i64,205#[component(name = "b")]206pub b: wasmtime::component::__internal::String,207#[component(name = "c")]208pub c: wasmtime::component::__internal::Vec<u8>,209}210impl core::fmt::Debug for OtherRecord {211fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {212f.debug_struct("OtherRecord")213.field("a1", &self.a1)214.field("a2", &self.a2)215.field("a3", &self.a3)216.field("a4", &self.a4)217.field("b", &self.b)218.field("c", &self.c)219.finish()220}221}222const _: () = {223assert!(22448 == < OtherRecord as wasmtime::component::ComponentType >::SIZE32225);226assert!(2278 == < OtherRecord as wasmtime::component::ComponentType >::ALIGN32228);229};230#[derive(wasmtime::component::ComponentType)]231#[derive(wasmtime::component::Lift)]232#[derive(wasmtime::component::Lower)]233#[component(record)]234#[derive(Clone)]235pub struct SomeRecord {236#[component(name = "x")]237pub x: wasmtime::component::__internal::String,238#[component(name = "y")]239pub y: OtherRecord,240#[component(name = "z")]241pub z: wasmtime::component::__internal::Vec<OtherRecord>,242#[component(name = "c1")]243pub c1: u32,244#[component(name = "c2")]245pub c2: u64,246#[component(name = "c3")]247pub c3: i32,248#[component(name = "c4")]249pub c4: i64,250}251impl core::fmt::Debug for SomeRecord {252fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {253f.debug_struct("SomeRecord")254.field("x", &self.x)255.field("y", &self.y)256.field("z", &self.z)257.field("c1", &self.c1)258.field("c2", &self.c2)259.field("c3", &self.c3)260.field("c4", &self.c4)261.finish()262}263}264const _: () = {265assert!(26696 == < SomeRecord as wasmtime::component::ComponentType >::SIZE32267);268assert!(2698 == < SomeRecord as wasmtime::component::ComponentType >::ALIGN32270);271};272#[derive(wasmtime::component::ComponentType)]273#[derive(wasmtime::component::Lift)]274#[derive(wasmtime::component::Lower)]275#[component(variant)]276#[derive(Clone)]277pub enum OtherVariant {278#[component(name = "a")]279A,280#[component(name = "b")]281B(u32),282#[component(name = "c")]283C(wasmtime::component::__internal::String),284}285impl core::fmt::Debug for OtherVariant {286fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {287match self {288OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),289OtherVariant::B(e) => {290f.debug_tuple("OtherVariant::B").field(e).finish()291}292OtherVariant::C(e) => {293f.debug_tuple("OtherVariant::C").field(e).finish()294}295}296}297}298const _: () = {299assert!(30012 == < OtherVariant as wasmtime::component::ComponentType >::SIZE32301);302assert!(3034 == < OtherVariant as wasmtime::component::ComponentType >::ALIGN32304);305};306#[derive(wasmtime::component::ComponentType)]307#[derive(wasmtime::component::Lift)]308#[derive(wasmtime::component::Lower)]309#[component(variant)]310#[derive(Clone)]311pub enum SomeVariant {312#[component(name = "a")]313A(wasmtime::component::__internal::String),314#[component(name = "b")]315B,316#[component(name = "c")]317C(u32),318#[component(name = "d")]319D(wasmtime::component::__internal::Vec<OtherVariant>),320}321impl core::fmt::Debug for SomeVariant {322fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {323match self {324SomeVariant::A(e) => {325f.debug_tuple("SomeVariant::A").field(e).finish()326}327SomeVariant::B => f.debug_tuple("SomeVariant::B").finish(),328SomeVariant::C(e) => {329f.debug_tuple("SomeVariant::C").field(e).finish()330}331SomeVariant::D(e) => {332f.debug_tuple("SomeVariant::D").field(e).finish()333}334}335}336}337const _: () = {338assert!(33912 == < SomeVariant as wasmtime::component::ComponentType >::SIZE32340);341assert!(3424 == < SomeVariant as wasmtime::component::ComponentType >::ALIGN32343);344};345pub type LoadStoreAllSizes = wasmtime::component::__internal::Vec<346(347wasmtime::component::__internal::String,348u8,349i8,350u16,351i16,352u32,353i32,354u64,355i64,356f32,357f64,358char,359),360>;361const _: () = {362assert!(3638 == < LoadStoreAllSizes as wasmtime::component::ComponentType364>::SIZE32365);366assert!(3674 == < LoadStoreAllSizes as wasmtime::component::ComponentType368>::ALIGN32369);370};371pub trait HostWithStore: wasmtime::component::HasData + Send {372fn list_u8_param<T: Send>(373accessor: &wasmtime::component::Accessor<T, Self>,374x: wasmtime::component::__internal::Vec<u8>,375) -> impl ::core::future::Future<Output = ()> + Send;376fn list_u16_param<T: Send>(377accessor: &wasmtime::component::Accessor<T, Self>,378x: wasmtime::component::__internal::Vec<u16>,379) -> impl ::core::future::Future<Output = ()> + Send;380fn list_u32_param<T: Send>(381accessor: &wasmtime::component::Accessor<T, Self>,382x: wasmtime::component::__internal::Vec<u32>,383) -> impl ::core::future::Future<Output = ()> + Send;384fn list_u64_param<T: Send>(385accessor: &wasmtime::component::Accessor<T, Self>,386x: wasmtime::component::__internal::Vec<u64>,387) -> impl ::core::future::Future<Output = ()> + Send;388fn list_s8_param<T: Send>(389accessor: &wasmtime::component::Accessor<T, Self>,390x: wasmtime::component::__internal::Vec<i8>,391) -> impl ::core::future::Future<Output = ()> + Send;392fn list_s16_param<T: Send>(393accessor: &wasmtime::component::Accessor<T, Self>,394x: wasmtime::component::__internal::Vec<i16>,395) -> impl ::core::future::Future<Output = ()> + Send;396fn list_s32_param<T: Send>(397accessor: &wasmtime::component::Accessor<T, Self>,398x: wasmtime::component::__internal::Vec<i32>,399) -> impl ::core::future::Future<Output = ()> + Send;400fn list_s64_param<T: Send>(401accessor: &wasmtime::component::Accessor<T, Self>,402x: wasmtime::component::__internal::Vec<i64>,403) -> impl ::core::future::Future<Output = ()> + Send;404fn list_f32_param<T: Send>(405accessor: &wasmtime::component::Accessor<T, Self>,406x: wasmtime::component::__internal::Vec<f32>,407) -> impl ::core::future::Future<Output = ()> + Send;408fn list_f64_param<T: Send>(409accessor: &wasmtime::component::Accessor<T, Self>,410x: wasmtime::component::__internal::Vec<f64>,411) -> impl ::core::future::Future<Output = ()> + Send;412fn list_u8_ret<T: Send>(413accessor: &wasmtime::component::Accessor<T, Self>,414) -> impl ::core::future::Future<415Output = wasmtime::component::__internal::Vec<u8>,416> + Send;417fn list_u16_ret<T: Send>(418accessor: &wasmtime::component::Accessor<T, Self>,419) -> impl ::core::future::Future<420Output = wasmtime::component::__internal::Vec<u16>,421> + Send;422fn list_u32_ret<T: Send>(423accessor: &wasmtime::component::Accessor<T, Self>,424) -> impl ::core::future::Future<425Output = wasmtime::component::__internal::Vec<u32>,426> + Send;427fn list_u64_ret<T: Send>(428accessor: &wasmtime::component::Accessor<T, Self>,429) -> impl ::core::future::Future<430Output = wasmtime::component::__internal::Vec<u64>,431> + Send;432fn list_s8_ret<T: Send>(433accessor: &wasmtime::component::Accessor<T, Self>,434) -> impl ::core::future::Future<435Output = wasmtime::component::__internal::Vec<i8>,436> + Send;437fn list_s16_ret<T: Send>(438accessor: &wasmtime::component::Accessor<T, Self>,439) -> impl ::core::future::Future<440Output = wasmtime::component::__internal::Vec<i16>,441> + Send;442fn list_s32_ret<T: Send>(443accessor: &wasmtime::component::Accessor<T, Self>,444) -> impl ::core::future::Future<445Output = wasmtime::component::__internal::Vec<i32>,446> + Send;447fn list_s64_ret<T: Send>(448accessor: &wasmtime::component::Accessor<T, Self>,449) -> impl ::core::future::Future<450Output = wasmtime::component::__internal::Vec<i64>,451> + Send;452fn list_f32_ret<T: Send>(453accessor: &wasmtime::component::Accessor<T, Self>,454) -> impl ::core::future::Future<455Output = wasmtime::component::__internal::Vec<f32>,456> + Send;457fn list_f64_ret<T: Send>(458accessor: &wasmtime::component::Accessor<T, Self>,459) -> impl ::core::future::Future<460Output = wasmtime::component::__internal::Vec<f64>,461> + Send;462fn tuple_list<T: Send>(463accessor: &wasmtime::component::Accessor<T, Self>,464x: wasmtime::component::__internal::Vec<(u8, i8)>,465) -> impl ::core::future::Future<466Output = wasmtime::component::__internal::Vec<(i64, u32)>,467> + Send;468fn string_list_arg<T: Send>(469accessor: &wasmtime::component::Accessor<T, Self>,470a: wasmtime::component::__internal::Vec<471wasmtime::component::__internal::String,472>,473) -> impl ::core::future::Future<Output = ()> + Send;474fn string_list_ret<T: Send>(475accessor: &wasmtime::component::Accessor<T, Self>,476) -> impl ::core::future::Future<477Output = wasmtime::component::__internal::Vec<478wasmtime::component::__internal::String,479>,480> + Send;481fn tuple_string_list<T: Send>(482accessor: &wasmtime::component::Accessor<T, Self>,483x: wasmtime::component::__internal::Vec<484(u8, wasmtime::component::__internal::String),485>,486) -> impl ::core::future::Future<487Output = wasmtime::component::__internal::Vec<488(wasmtime::component::__internal::String, u8),489>,490> + Send;491fn string_list<T: Send>(492accessor: &wasmtime::component::Accessor<T, Self>,493x: wasmtime::component::__internal::Vec<494wasmtime::component::__internal::String,495>,496) -> impl ::core::future::Future<497Output = wasmtime::component::__internal::Vec<498wasmtime::component::__internal::String,499>,500> + Send;501fn record_list<T: Send>(502accessor: &wasmtime::component::Accessor<T, Self>,503x: wasmtime::component::__internal::Vec<SomeRecord>,504) -> impl ::core::future::Future<505Output = wasmtime::component::__internal::Vec<OtherRecord>,506> + Send;507fn record_list_reverse<T: Send>(508accessor: &wasmtime::component::Accessor<T, Self>,509x: wasmtime::component::__internal::Vec<OtherRecord>,510) -> impl ::core::future::Future<511Output = wasmtime::component::__internal::Vec<SomeRecord>,512> + Send;513fn variant_list<T: Send>(514accessor: &wasmtime::component::Accessor<T, Self>,515x: wasmtime::component::__internal::Vec<SomeVariant>,516) -> impl ::core::future::Future<517Output = wasmtime::component::__internal::Vec<OtherVariant>,518> + Send;519fn load_store_everything<T: Send>(520accessor: &wasmtime::component::Accessor<T, Self>,521a: LoadStoreAllSizes,522) -> impl ::core::future::Future<Output = LoadStoreAllSizes> + Send;523}524pub trait Host: Send {}525impl<_T: Host + ?Sized + Send> Host for &mut _T {}526pub fn add_to_linker<T, D>(527linker: &mut wasmtime::component::Linker<T>,528host_getter: fn(&mut T) -> D::Data<'_>,529) -> wasmtime::Result<()>530where531D: HostWithStore,532for<'a> D::Data<'a>: Host,533T: 'static + Send,534{535let mut inst = linker.instance("foo:foo/lists")?;536inst.func_wrap_concurrent(537"list-u8-param",538move |539caller: &wasmtime::component::Accessor<T>,540(arg0,): (wasmtime::component::__internal::Vec<u8>,)|541{542wasmtime::component::__internal::Box::pin(async move {543let host = &caller.with_getter(host_getter);544let r = <D as HostWithStore>::list_u8_param(host, arg0)545.await;546Ok(r)547})548},549)?;550inst.func_wrap_concurrent(551"list-u16-param",552move |553caller: &wasmtime::component::Accessor<T>,554(arg0,): (wasmtime::component::__internal::Vec<u16>,)|555{556wasmtime::component::__internal::Box::pin(async move {557let host = &caller.with_getter(host_getter);558let r = <D as HostWithStore>::list_u16_param(host, arg0)559.await;560Ok(r)561})562},563)?;564inst.func_wrap_concurrent(565"list-u32-param",566move |567caller: &wasmtime::component::Accessor<T>,568(arg0,): (wasmtime::component::__internal::Vec<u32>,)|569{570wasmtime::component::__internal::Box::pin(async move {571let host = &caller.with_getter(host_getter);572let r = <D as HostWithStore>::list_u32_param(host, arg0)573.await;574Ok(r)575})576},577)?;578inst.func_wrap_concurrent(579"list-u64-param",580move |581caller: &wasmtime::component::Accessor<T>,582(arg0,): (wasmtime::component::__internal::Vec<u64>,)|583{584wasmtime::component::__internal::Box::pin(async move {585let host = &caller.with_getter(host_getter);586let r = <D as HostWithStore>::list_u64_param(host, arg0)587.await;588Ok(r)589})590},591)?;592inst.func_wrap_concurrent(593"list-s8-param",594move |595caller: &wasmtime::component::Accessor<T>,596(arg0,): (wasmtime::component::__internal::Vec<i8>,)|597{598wasmtime::component::__internal::Box::pin(async move {599let host = &caller.with_getter(host_getter);600let r = <D as HostWithStore>::list_s8_param(host, arg0)601.await;602Ok(r)603})604},605)?;606inst.func_wrap_concurrent(607"list-s16-param",608move |609caller: &wasmtime::component::Accessor<T>,610(arg0,): (wasmtime::component::__internal::Vec<i16>,)|611{612wasmtime::component::__internal::Box::pin(async move {613let host = &caller.with_getter(host_getter);614let r = <D as HostWithStore>::list_s16_param(host, arg0)615.await;616Ok(r)617})618},619)?;620inst.func_wrap_concurrent(621"list-s32-param",622move |623caller: &wasmtime::component::Accessor<T>,624(arg0,): (wasmtime::component::__internal::Vec<i32>,)|625{626wasmtime::component::__internal::Box::pin(async move {627let host = &caller.with_getter(host_getter);628let r = <D as HostWithStore>::list_s32_param(host, arg0)629.await;630Ok(r)631})632},633)?;634inst.func_wrap_concurrent(635"list-s64-param",636move |637caller: &wasmtime::component::Accessor<T>,638(arg0,): (wasmtime::component::__internal::Vec<i64>,)|639{640wasmtime::component::__internal::Box::pin(async move {641let host = &caller.with_getter(host_getter);642let r = <D as HostWithStore>::list_s64_param(host, arg0)643.await;644Ok(r)645})646},647)?;648inst.func_wrap_concurrent(649"list-f32-param",650move |651caller: &wasmtime::component::Accessor<T>,652(arg0,): (wasmtime::component::__internal::Vec<f32>,)|653{654wasmtime::component::__internal::Box::pin(async move {655let host = &caller.with_getter(host_getter);656let r = <D as HostWithStore>::list_f32_param(host, arg0)657.await;658Ok(r)659})660},661)?;662inst.func_wrap_concurrent(663"list-f64-param",664move |665caller: &wasmtime::component::Accessor<T>,666(arg0,): (wasmtime::component::__internal::Vec<f64>,)|667{668wasmtime::component::__internal::Box::pin(async move {669let host = &caller.with_getter(host_getter);670let r = <D as HostWithStore>::list_f64_param(host, arg0)671.await;672Ok(r)673})674},675)?;676inst.func_wrap_concurrent(677"list-u8-ret",678move |caller: &wasmtime::component::Accessor<T>, (): ()| {679wasmtime::component::__internal::Box::pin(async move {680let host = &caller.with_getter(host_getter);681let r = <D as HostWithStore>::list_u8_ret(host).await;682Ok((r,))683})684},685)?;686inst.func_wrap_concurrent(687"list-u16-ret",688move |caller: &wasmtime::component::Accessor<T>, (): ()| {689wasmtime::component::__internal::Box::pin(async move {690let host = &caller.with_getter(host_getter);691let r = <D as HostWithStore>::list_u16_ret(host).await;692Ok((r,))693})694},695)?;696inst.func_wrap_concurrent(697"list-u32-ret",698move |caller: &wasmtime::component::Accessor<T>, (): ()| {699wasmtime::component::__internal::Box::pin(async move {700let host = &caller.with_getter(host_getter);701let r = <D as HostWithStore>::list_u32_ret(host).await;702Ok((r,))703})704},705)?;706inst.func_wrap_concurrent(707"list-u64-ret",708move |caller: &wasmtime::component::Accessor<T>, (): ()| {709wasmtime::component::__internal::Box::pin(async move {710let host = &caller.with_getter(host_getter);711let r = <D as HostWithStore>::list_u64_ret(host).await;712Ok((r,))713})714},715)?;716inst.func_wrap_concurrent(717"list-s8-ret",718move |caller: &wasmtime::component::Accessor<T>, (): ()| {719wasmtime::component::__internal::Box::pin(async move {720let host = &caller.with_getter(host_getter);721let r = <D as HostWithStore>::list_s8_ret(host).await;722Ok((r,))723})724},725)?;726inst.func_wrap_concurrent(727"list-s16-ret",728move |caller: &wasmtime::component::Accessor<T>, (): ()| {729wasmtime::component::__internal::Box::pin(async move {730let host = &caller.with_getter(host_getter);731let r = <D as HostWithStore>::list_s16_ret(host).await;732Ok((r,))733})734},735)?;736inst.func_wrap_concurrent(737"list-s32-ret",738move |caller: &wasmtime::component::Accessor<T>, (): ()| {739wasmtime::component::__internal::Box::pin(async move {740let host = &caller.with_getter(host_getter);741let r = <D as HostWithStore>::list_s32_ret(host).await;742Ok((r,))743})744},745)?;746inst.func_wrap_concurrent(747"list-s64-ret",748move |caller: &wasmtime::component::Accessor<T>, (): ()| {749wasmtime::component::__internal::Box::pin(async move {750let host = &caller.with_getter(host_getter);751let r = <D as HostWithStore>::list_s64_ret(host).await;752Ok((r,))753})754},755)?;756inst.func_wrap_concurrent(757"list-f32-ret",758move |caller: &wasmtime::component::Accessor<T>, (): ()| {759wasmtime::component::__internal::Box::pin(async move {760let host = &caller.with_getter(host_getter);761let r = <D as HostWithStore>::list_f32_ret(host).await;762Ok((r,))763})764},765)?;766inst.func_wrap_concurrent(767"list-f64-ret",768move |caller: &wasmtime::component::Accessor<T>, (): ()| {769wasmtime::component::__internal::Box::pin(async move {770let host = &caller.with_getter(host_getter);771let r = <D as HostWithStore>::list_f64_ret(host).await;772Ok((r,))773})774},775)?;776inst.func_wrap_concurrent(777"tuple-list",778move |779caller: &wasmtime::component::Accessor<T>,780(arg0,): (wasmtime::component::__internal::Vec<(u8, i8)>,)|781{782wasmtime::component::__internal::Box::pin(async move {783let host = &caller.with_getter(host_getter);784let r = <D as HostWithStore>::tuple_list(host, arg0).await;785Ok((r,))786})787},788)?;789inst.func_wrap_concurrent(790"string-list-arg",791move |792caller: &wasmtime::component::Accessor<T>,793(794arg0,795): (796wasmtime::component::__internal::Vec<797wasmtime::component::__internal::String,798>,799)|800{801wasmtime::component::__internal::Box::pin(async move {802let host = &caller.with_getter(host_getter);803let r = <D as HostWithStore>::string_list_arg(host, arg0)804.await;805Ok(r)806})807},808)?;809inst.func_wrap_concurrent(810"string-list-ret",811move |caller: &wasmtime::component::Accessor<T>, (): ()| {812wasmtime::component::__internal::Box::pin(async move {813let host = &caller.with_getter(host_getter);814let r = <D as HostWithStore>::string_list_ret(host).await;815Ok((r,))816})817},818)?;819inst.func_wrap_concurrent(820"tuple-string-list",821move |822caller: &wasmtime::component::Accessor<T>,823(824arg0,825): (826wasmtime::component::__internal::Vec<827(u8, wasmtime::component::__internal::String),828>,829)|830{831wasmtime::component::__internal::Box::pin(async move {832let host = &caller.with_getter(host_getter);833let r = <D as HostWithStore>::tuple_string_list(host, arg0)834.await;835Ok((r,))836})837},838)?;839inst.func_wrap_concurrent(840"string-list",841move |842caller: &wasmtime::component::Accessor<T>,843(844arg0,845): (846wasmtime::component::__internal::Vec<847wasmtime::component::__internal::String,848>,849)|850{851wasmtime::component::__internal::Box::pin(async move {852let host = &caller.with_getter(host_getter);853let r = <D as HostWithStore>::string_list(host, arg0).await;854Ok((r,))855})856},857)?;858inst.func_wrap_concurrent(859"record-list",860move |861caller: &wasmtime::component::Accessor<T>,862(arg0,): (wasmtime::component::__internal::Vec<SomeRecord>,)|863{864wasmtime::component::__internal::Box::pin(async move {865let host = &caller.with_getter(host_getter);866let r = <D as HostWithStore>::record_list(host, arg0).await;867Ok((r,))868})869},870)?;871inst.func_wrap_concurrent(872"record-list-reverse",873move |874caller: &wasmtime::component::Accessor<T>,875(arg0,): (wasmtime::component::__internal::Vec<OtherRecord>,)|876{877wasmtime::component::__internal::Box::pin(async move {878let host = &caller.with_getter(host_getter);879let r = <D as HostWithStore>::record_list_reverse(host, arg0)880.await;881Ok((r,))882})883},884)?;885inst.func_wrap_concurrent(886"variant-list",887move |888caller: &wasmtime::component::Accessor<T>,889(arg0,): (wasmtime::component::__internal::Vec<SomeVariant>,)|890{891wasmtime::component::__internal::Box::pin(async move {892let host = &caller.with_getter(host_getter);893let r = <D as HostWithStore>::variant_list(host, arg0).await;894Ok((r,))895})896},897)?;898inst.func_wrap_concurrent(899"load-store-everything",900move |901caller: &wasmtime::component::Accessor<T>,902(arg0,): (LoadStoreAllSizes,)|903{904wasmtime::component::__internal::Box::pin(async move {905let host = &caller.with_getter(host_getter);906let r = <D as HostWithStore>::load_store_everything(907host,908arg0,909)910.await;911Ok((r,))912})913},914)?;915Ok(())916}917}918}919}920pub mod exports {921pub mod foo {922pub mod foo {923#[allow(clippy::all)]924pub mod lists {925#[allow(unused_imports)]926use wasmtime::component::__internal::Box;927#[derive(wasmtime::component::ComponentType)]928#[derive(wasmtime::component::Lift)]929#[derive(wasmtime::component::Lower)]930#[component(record)]931#[derive(Clone)]932pub struct OtherRecord {933#[component(name = "a1")]934pub a1: u32,935#[component(name = "a2")]936pub a2: u64,937#[component(name = "a3")]938pub a3: i32,939#[component(name = "a4")]940pub a4: i64,941#[component(name = "b")]942pub b: wasmtime::component::__internal::String,943#[component(name = "c")]944pub c: wasmtime::component::__internal::Vec<u8>,945}946impl core::fmt::Debug for OtherRecord {947fn fmt(948&self,949f: &mut core::fmt::Formatter<'_>,950) -> core::fmt::Result {951f.debug_struct("OtherRecord")952.field("a1", &self.a1)953.field("a2", &self.a2)954.field("a3", &self.a3)955.field("a4", &self.a4)956.field("b", &self.b)957.field("c", &self.c)958.finish()959}960}961const _: () = {962assert!(96348 == < OtherRecord as wasmtime::component::ComponentType964>::SIZE32965);966assert!(9678 == < OtherRecord as wasmtime::component::ComponentType968>::ALIGN32969);970};971#[derive(wasmtime::component::ComponentType)]972#[derive(wasmtime::component::Lift)]973#[derive(wasmtime::component::Lower)]974#[component(record)]975#[derive(Clone)]976pub struct SomeRecord {977#[component(name = "x")]978pub x: wasmtime::component::__internal::String,979#[component(name = "y")]980pub y: OtherRecord,981#[component(name = "z")]982pub z: wasmtime::component::__internal::Vec<OtherRecord>,983#[component(name = "c1")]984pub c1: u32,985#[component(name = "c2")]986pub c2: u64,987#[component(name = "c3")]988pub c3: i32,989#[component(name = "c4")]990pub c4: i64,991}992impl core::fmt::Debug for SomeRecord {993fn fmt(994&self,995f: &mut core::fmt::Formatter<'_>,996) -> core::fmt::Result {997f.debug_struct("SomeRecord")998.field("x", &self.x)999.field("y", &self.y)1000.field("z", &self.z)1001.field("c1", &self.c1)1002.field("c2", &self.c2)1003.field("c3", &self.c3)1004.field("c4", &self.c4)1005.finish()1006}1007}1008const _: () = {1009assert!(101096 == < SomeRecord as wasmtime::component::ComponentType1011>::SIZE321012);1013assert!(10148 == < SomeRecord as wasmtime::component::ComponentType1015>::ALIGN321016);1017};1018#[derive(wasmtime::component::ComponentType)]1019#[derive(wasmtime::component::Lift)]1020#[derive(wasmtime::component::Lower)]1021#[component(variant)]1022#[derive(Clone)]1023pub enum OtherVariant {1024#[component(name = "a")]1025A,1026#[component(name = "b")]1027B(u32),1028#[component(name = "c")]1029C(wasmtime::component::__internal::String),1030}1031impl core::fmt::Debug for OtherVariant {1032fn fmt(1033&self,1034f: &mut core::fmt::Formatter<'_>,1035) -> core::fmt::Result {1036match self {1037OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),1038OtherVariant::B(e) => {1039f.debug_tuple("OtherVariant::B").field(e).finish()1040}1041OtherVariant::C(e) => {1042f.debug_tuple("OtherVariant::C").field(e).finish()1043}1044}1045}1046}1047const _: () = {1048assert!(104912 == < OtherVariant as wasmtime::component::ComponentType1050>::SIZE321051);1052assert!(10534 == < OtherVariant as wasmtime::component::ComponentType1054>::ALIGN321055);1056};1057#[derive(wasmtime::component::ComponentType)]1058#[derive(wasmtime::component::Lift)]1059#[derive(wasmtime::component::Lower)]1060#[component(variant)]1061#[derive(Clone)]1062pub enum SomeVariant {1063#[component(name = "a")]1064A(wasmtime::component::__internal::String),1065#[component(name = "b")]1066B,1067#[component(name = "c")]1068C(u32),1069#[component(name = "d")]1070D(wasmtime::component::__internal::Vec<OtherVariant>),1071}1072impl core::fmt::Debug for SomeVariant {1073fn fmt(1074&self,1075f: &mut core::fmt::Formatter<'_>,1076) -> core::fmt::Result {1077match self {1078SomeVariant::A(e) => {1079f.debug_tuple("SomeVariant::A").field(e).finish()1080}1081SomeVariant::B => f.debug_tuple("SomeVariant::B").finish(),1082SomeVariant::C(e) => {1083f.debug_tuple("SomeVariant::C").field(e).finish()1084}1085SomeVariant::D(e) => {1086f.debug_tuple("SomeVariant::D").field(e).finish()1087}1088}1089}1090}1091const _: () = {1092assert!(109312 == < SomeVariant as wasmtime::component::ComponentType1094>::SIZE321095);1096assert!(10974 == < SomeVariant as wasmtime::component::ComponentType1098>::ALIGN321099);1100};1101pub type LoadStoreAllSizes = wasmtime::component::__internal::Vec<1102(1103wasmtime::component::__internal::String,1104u8,1105i8,1106u16,1107i16,1108u32,1109i32,1110u64,1111i64,1112f32,1113f64,1114char,1115),1116>;1117const _: () = {1118assert!(11198 == < LoadStoreAllSizes as wasmtime::component::ComponentType1120>::SIZE321121);1122assert!(11234 == < LoadStoreAllSizes as wasmtime::component::ComponentType1124>::ALIGN321125);1126};1127#[derive(Clone)]1128pub struct Guest {1129list_u8_param: wasmtime::component::Func,1130list_u16_param: wasmtime::component::Func,1131list_u32_param: wasmtime::component::Func,1132list_u64_param: wasmtime::component::Func,1133list_s8_param: wasmtime::component::Func,1134list_s16_param: wasmtime::component::Func,1135list_s32_param: wasmtime::component::Func,1136list_s64_param: wasmtime::component::Func,1137list_f32_param: wasmtime::component::Func,1138list_f64_param: wasmtime::component::Func,1139list_u8_ret: wasmtime::component::Func,1140list_u16_ret: wasmtime::component::Func,1141list_u32_ret: wasmtime::component::Func,1142list_u64_ret: wasmtime::component::Func,1143list_s8_ret: wasmtime::component::Func,1144list_s16_ret: wasmtime::component::Func,1145list_s32_ret: wasmtime::component::Func,1146list_s64_ret: wasmtime::component::Func,1147list_f32_ret: wasmtime::component::Func,1148list_f64_ret: wasmtime::component::Func,1149tuple_list: wasmtime::component::Func,1150string_list_arg: wasmtime::component::Func,1151string_list_ret: wasmtime::component::Func,1152tuple_string_list: wasmtime::component::Func,1153string_list: wasmtime::component::Func,1154record_list: wasmtime::component::Func,1155record_list_reverse: wasmtime::component::Func,1156variant_list: wasmtime::component::Func,1157load_store_everything: wasmtime::component::Func,1158}1159#[derive(Clone)]1160pub struct GuestIndices {1161list_u8_param: wasmtime::component::ComponentExportIndex,1162list_u16_param: wasmtime::component::ComponentExportIndex,1163list_u32_param: wasmtime::component::ComponentExportIndex,1164list_u64_param: wasmtime::component::ComponentExportIndex,1165list_s8_param: wasmtime::component::ComponentExportIndex,1166list_s16_param: wasmtime::component::ComponentExportIndex,1167list_s32_param: wasmtime::component::ComponentExportIndex,1168list_s64_param: wasmtime::component::ComponentExportIndex,1169list_f32_param: wasmtime::component::ComponentExportIndex,1170list_f64_param: wasmtime::component::ComponentExportIndex,1171list_u8_ret: wasmtime::component::ComponentExportIndex,1172list_u16_ret: wasmtime::component::ComponentExportIndex,1173list_u32_ret: wasmtime::component::ComponentExportIndex,1174list_u64_ret: wasmtime::component::ComponentExportIndex,1175list_s8_ret: wasmtime::component::ComponentExportIndex,1176list_s16_ret: wasmtime::component::ComponentExportIndex,1177list_s32_ret: wasmtime::component::ComponentExportIndex,1178list_s64_ret: wasmtime::component::ComponentExportIndex,1179list_f32_ret: wasmtime::component::ComponentExportIndex,1180list_f64_ret: wasmtime::component::ComponentExportIndex,1181tuple_list: wasmtime::component::ComponentExportIndex,1182string_list_arg: wasmtime::component::ComponentExportIndex,1183string_list_ret: wasmtime::component::ComponentExportIndex,1184tuple_string_list: wasmtime::component::ComponentExportIndex,1185string_list: wasmtime::component::ComponentExportIndex,1186record_list: wasmtime::component::ComponentExportIndex,1187record_list_reverse: wasmtime::component::ComponentExportIndex,1188variant_list: wasmtime::component::ComponentExportIndex,1189load_store_everything: wasmtime::component::ComponentExportIndex,1190}1191impl GuestIndices {1192/// Constructor for [`GuestIndices`] which takes a1193/// [`Component`](wasmtime::component::Component) as input and can be executed1194/// before instantiation.1195///1196/// This constructor can be used to front-load string lookups to find exports1197/// within a component.1198pub fn new<_T>(1199_instance_pre: &wasmtime::component::InstancePre<_T>,1200) -> wasmtime::Result<GuestIndices> {1201let instance = _instance_pre1202.component()1203.get_export_index(None, "foo:foo/lists")1204.ok_or_else(|| {1205wasmtime::format_err!(1206"no exported instance named `foo:foo/lists`"1207)1208})?;1209let mut lookup = move |name| {1210_instance_pre1211.component()1212.get_export_index(Some(&instance), name)1213.ok_or_else(|| {1214wasmtime::format_err!(1215"instance export `foo:foo/lists` does \1216not have export `{name}`"1217)1218})1219};1220let _ = &mut lookup;1221let list_u8_param = lookup("list-u8-param")?;1222let list_u16_param = lookup("list-u16-param")?;1223let list_u32_param = lookup("list-u32-param")?;1224let list_u64_param = lookup("list-u64-param")?;1225let list_s8_param = lookup("list-s8-param")?;1226let list_s16_param = lookup("list-s16-param")?;1227let list_s32_param = lookup("list-s32-param")?;1228let list_s64_param = lookup("list-s64-param")?;1229let list_f32_param = lookup("list-f32-param")?;1230let list_f64_param = lookup("list-f64-param")?;1231let list_u8_ret = lookup("list-u8-ret")?;1232let list_u16_ret = lookup("list-u16-ret")?;1233let list_u32_ret = lookup("list-u32-ret")?;1234let list_u64_ret = lookup("list-u64-ret")?;1235let list_s8_ret = lookup("list-s8-ret")?;1236let list_s16_ret = lookup("list-s16-ret")?;1237let list_s32_ret = lookup("list-s32-ret")?;1238let list_s64_ret = lookup("list-s64-ret")?;1239let list_f32_ret = lookup("list-f32-ret")?;1240let list_f64_ret = lookup("list-f64-ret")?;1241let tuple_list = lookup("tuple-list")?;1242let string_list_arg = lookup("string-list-arg")?;1243let string_list_ret = lookup("string-list-ret")?;1244let tuple_string_list = lookup("tuple-string-list")?;1245let string_list = lookup("string-list")?;1246let record_list = lookup("record-list")?;1247let record_list_reverse = lookup("record-list-reverse")?;1248let variant_list = lookup("variant-list")?;1249let load_store_everything = lookup("load-store-everything")?;1250Ok(GuestIndices {1251list_u8_param,1252list_u16_param,1253list_u32_param,1254list_u64_param,1255list_s8_param,1256list_s16_param,1257list_s32_param,1258list_s64_param,1259list_f32_param,1260list_f64_param,1261list_u8_ret,1262list_u16_ret,1263list_u32_ret,1264list_u64_ret,1265list_s8_ret,1266list_s16_ret,1267list_s32_ret,1268list_s64_ret,1269list_f32_ret,1270list_f64_ret,1271tuple_list,1272string_list_arg,1273string_list_ret,1274tuple_string_list,1275string_list,1276record_list,1277record_list_reverse,1278variant_list,1279load_store_everything,1280})1281}1282pub fn load(1283&self,1284mut store: impl wasmtime::AsContextMut,1285instance: &wasmtime::component::Instance,1286) -> wasmtime::Result<Guest> {1287let _instance = instance;1288let _instance_pre = _instance.instance_pre(&store);1289let _instance_type = _instance_pre.instance_type();1290let mut store = store.as_context_mut();1291let _ = &mut store;1292let list_u8_param = *_instance1293.get_typed_func::<1294(&[u8],),1295(),1296>(&mut store, &self.list_u8_param)?1297.func();1298let list_u16_param = *_instance1299.get_typed_func::<1300(&[u16],),1301(),1302>(&mut store, &self.list_u16_param)?1303.func();1304let list_u32_param = *_instance1305.get_typed_func::<1306(&[u32],),1307(),1308>(&mut store, &self.list_u32_param)?1309.func();1310let list_u64_param = *_instance1311.get_typed_func::<1312(&[u64],),1313(),1314>(&mut store, &self.list_u64_param)?1315.func();1316let list_s8_param = *_instance1317.get_typed_func::<1318(&[i8],),1319(),1320>(&mut store, &self.list_s8_param)?1321.func();1322let list_s16_param = *_instance1323.get_typed_func::<1324(&[i16],),1325(),1326>(&mut store, &self.list_s16_param)?1327.func();1328let list_s32_param = *_instance1329.get_typed_func::<1330(&[i32],),1331(),1332>(&mut store, &self.list_s32_param)?1333.func();1334let list_s64_param = *_instance1335.get_typed_func::<1336(&[i64],),1337(),1338>(&mut store, &self.list_s64_param)?1339.func();1340let list_f32_param = *_instance1341.get_typed_func::<1342(&[f32],),1343(),1344>(&mut store, &self.list_f32_param)?1345.func();1346let list_f64_param = *_instance1347.get_typed_func::<1348(&[f64],),1349(),1350>(&mut store, &self.list_f64_param)?1351.func();1352let list_u8_ret = *_instance1353.get_typed_func::<1354(),1355(wasmtime::component::__internal::Vec<u8>,),1356>(&mut store, &self.list_u8_ret)?1357.func();1358let list_u16_ret = *_instance1359.get_typed_func::<1360(),1361(wasmtime::component::__internal::Vec<u16>,),1362>(&mut store, &self.list_u16_ret)?1363.func();1364let list_u32_ret = *_instance1365.get_typed_func::<1366(),1367(wasmtime::component::__internal::Vec<u32>,),1368>(&mut store, &self.list_u32_ret)?1369.func();1370let list_u64_ret = *_instance1371.get_typed_func::<1372(),1373(wasmtime::component::__internal::Vec<u64>,),1374>(&mut store, &self.list_u64_ret)?1375.func();1376let list_s8_ret = *_instance1377.get_typed_func::<1378(),1379(wasmtime::component::__internal::Vec<i8>,),1380>(&mut store, &self.list_s8_ret)?1381.func();1382let list_s16_ret = *_instance1383.get_typed_func::<1384(),1385(wasmtime::component::__internal::Vec<i16>,),1386>(&mut store, &self.list_s16_ret)?1387.func();1388let list_s32_ret = *_instance1389.get_typed_func::<1390(),1391(wasmtime::component::__internal::Vec<i32>,),1392>(&mut store, &self.list_s32_ret)?1393.func();1394let list_s64_ret = *_instance1395.get_typed_func::<1396(),1397(wasmtime::component::__internal::Vec<i64>,),1398>(&mut store, &self.list_s64_ret)?1399.func();1400let list_f32_ret = *_instance1401.get_typed_func::<1402(),1403(wasmtime::component::__internal::Vec<f32>,),1404>(&mut store, &self.list_f32_ret)?1405.func();1406let list_f64_ret = *_instance1407.get_typed_func::<1408(),1409(wasmtime::component::__internal::Vec<f64>,),1410>(&mut store, &self.list_f64_ret)?1411.func();1412let tuple_list = *_instance1413.get_typed_func::<1414(&[(u8, i8)],),1415(wasmtime::component::__internal::Vec<(i64, u32)>,),1416>(&mut store, &self.tuple_list)?1417.func();1418let string_list_arg = *_instance1419.get_typed_func::<1420(&[wasmtime::component::__internal::String],),1421(),1422>(&mut store, &self.string_list_arg)?1423.func();1424let string_list_ret = *_instance1425.get_typed_func::<1426(),1427(1428wasmtime::component::__internal::Vec<1429wasmtime::component::__internal::String,1430>,1431),1432>(&mut store, &self.string_list_ret)?1433.func();1434let tuple_string_list = *_instance1435.get_typed_func::<1436(&[(u8, wasmtime::component::__internal::String)],),1437(1438wasmtime::component::__internal::Vec<1439(wasmtime::component::__internal::String, u8),1440>,1441),1442>(&mut store, &self.tuple_string_list)?1443.func();1444let string_list = *_instance1445.get_typed_func::<1446(&[wasmtime::component::__internal::String],),1447(1448wasmtime::component::__internal::Vec<1449wasmtime::component::__internal::String,1450>,1451),1452>(&mut store, &self.string_list)?1453.func();1454let record_list = *_instance1455.get_typed_func::<1456(&[SomeRecord],),1457(wasmtime::component::__internal::Vec<OtherRecord>,),1458>(&mut store, &self.record_list)?1459.func();1460let record_list_reverse = *_instance1461.get_typed_func::<1462(&[OtherRecord],),1463(wasmtime::component::__internal::Vec<SomeRecord>,),1464>(&mut store, &self.record_list_reverse)?1465.func();1466let variant_list = *_instance1467.get_typed_func::<1468(&[SomeVariant],),1469(wasmtime::component::__internal::Vec<OtherVariant>,),1470>(&mut store, &self.variant_list)?1471.func();1472let load_store_everything = *_instance1473.get_typed_func::<1474(&LoadStoreAllSizes,),1475(LoadStoreAllSizes,),1476>(&mut store, &self.load_store_everything)?1477.func();1478Ok(Guest {1479list_u8_param,1480list_u16_param,1481list_u32_param,1482list_u64_param,1483list_s8_param,1484list_s16_param,1485list_s32_param,1486list_s64_param,1487list_f32_param,1488list_f64_param,1489list_u8_ret,1490list_u16_ret,1491list_u32_ret,1492list_u64_ret,1493list_s8_ret,1494list_s16_ret,1495list_s32_ret,1496list_s64_ret,1497list_f32_ret,1498list_f64_ret,1499tuple_list,1500string_list_arg,1501string_list_ret,1502tuple_string_list,1503string_list,1504record_list,1505record_list_reverse,1506variant_list,1507load_store_everything,1508})1509}1510}1511impl Guest {1512pub async fn call_list_u8_param<_T, _D>(1513&self,1514accessor: &wasmtime::component::Accessor<_T, _D>,1515arg0: wasmtime::component::__internal::Vec<u8>,1516) -> wasmtime::Result<()>1517where1518_T: Send,1519_D: wasmtime::component::HasData,1520{1521let callee = unsafe {1522wasmtime::component::TypedFunc::<1523(wasmtime::component::__internal::Vec<u8>,),1524(),1525>::new_unchecked(self.list_u8_param)1526};1527let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1528Ok(())1529}1530pub async fn call_list_u16_param<_T, _D>(1531&self,1532accessor: &wasmtime::component::Accessor<_T, _D>,1533arg0: wasmtime::component::__internal::Vec<u16>,1534) -> wasmtime::Result<()>1535where1536_T: Send,1537_D: wasmtime::component::HasData,1538{1539let callee = unsafe {1540wasmtime::component::TypedFunc::<1541(wasmtime::component::__internal::Vec<u16>,),1542(),1543>::new_unchecked(self.list_u16_param)1544};1545let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1546Ok(())1547}1548pub async fn call_list_u32_param<_T, _D>(1549&self,1550accessor: &wasmtime::component::Accessor<_T, _D>,1551arg0: wasmtime::component::__internal::Vec<u32>,1552) -> wasmtime::Result<()>1553where1554_T: Send,1555_D: wasmtime::component::HasData,1556{1557let callee = unsafe {1558wasmtime::component::TypedFunc::<1559(wasmtime::component::__internal::Vec<u32>,),1560(),1561>::new_unchecked(self.list_u32_param)1562};1563let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1564Ok(())1565}1566pub async fn call_list_u64_param<_T, _D>(1567&self,1568accessor: &wasmtime::component::Accessor<_T, _D>,1569arg0: wasmtime::component::__internal::Vec<u64>,1570) -> wasmtime::Result<()>1571where1572_T: Send,1573_D: wasmtime::component::HasData,1574{1575let callee = unsafe {1576wasmtime::component::TypedFunc::<1577(wasmtime::component::__internal::Vec<u64>,),1578(),1579>::new_unchecked(self.list_u64_param)1580};1581let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1582Ok(())1583}1584pub async fn call_list_s8_param<_T, _D>(1585&self,1586accessor: &wasmtime::component::Accessor<_T, _D>,1587arg0: wasmtime::component::__internal::Vec<i8>,1588) -> wasmtime::Result<()>1589where1590_T: Send,1591_D: wasmtime::component::HasData,1592{1593let callee = unsafe {1594wasmtime::component::TypedFunc::<1595(wasmtime::component::__internal::Vec<i8>,),1596(),1597>::new_unchecked(self.list_s8_param)1598};1599let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1600Ok(())1601}1602pub async fn call_list_s16_param<_T, _D>(1603&self,1604accessor: &wasmtime::component::Accessor<_T, _D>,1605arg0: wasmtime::component::__internal::Vec<i16>,1606) -> wasmtime::Result<()>1607where1608_T: Send,1609_D: wasmtime::component::HasData,1610{1611let callee = unsafe {1612wasmtime::component::TypedFunc::<1613(wasmtime::component::__internal::Vec<i16>,),1614(),1615>::new_unchecked(self.list_s16_param)1616};1617let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1618Ok(())1619}1620pub async fn call_list_s32_param<_T, _D>(1621&self,1622accessor: &wasmtime::component::Accessor<_T, _D>,1623arg0: wasmtime::component::__internal::Vec<i32>,1624) -> wasmtime::Result<()>1625where1626_T: Send,1627_D: wasmtime::component::HasData,1628{1629let callee = unsafe {1630wasmtime::component::TypedFunc::<1631(wasmtime::component::__internal::Vec<i32>,),1632(),1633>::new_unchecked(self.list_s32_param)1634};1635let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1636Ok(())1637}1638pub async fn call_list_s64_param<_T, _D>(1639&self,1640accessor: &wasmtime::component::Accessor<_T, _D>,1641arg0: wasmtime::component::__internal::Vec<i64>,1642) -> wasmtime::Result<()>1643where1644_T: Send,1645_D: wasmtime::component::HasData,1646{1647let callee = unsafe {1648wasmtime::component::TypedFunc::<1649(wasmtime::component::__internal::Vec<i64>,),1650(),1651>::new_unchecked(self.list_s64_param)1652};1653let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1654Ok(())1655}1656pub async fn call_list_f32_param<_T, _D>(1657&self,1658accessor: &wasmtime::component::Accessor<_T, _D>,1659arg0: wasmtime::component::__internal::Vec<f32>,1660) -> wasmtime::Result<()>1661where1662_T: Send,1663_D: wasmtime::component::HasData,1664{1665let callee = unsafe {1666wasmtime::component::TypedFunc::<1667(wasmtime::component::__internal::Vec<f32>,),1668(),1669>::new_unchecked(self.list_f32_param)1670};1671let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1672Ok(())1673}1674pub async fn call_list_f64_param<_T, _D>(1675&self,1676accessor: &wasmtime::component::Accessor<_T, _D>,1677arg0: wasmtime::component::__internal::Vec<f64>,1678) -> wasmtime::Result<()>1679where1680_T: Send,1681_D: wasmtime::component::HasData,1682{1683let callee = unsafe {1684wasmtime::component::TypedFunc::<1685(wasmtime::component::__internal::Vec<f64>,),1686(),1687>::new_unchecked(self.list_f64_param)1688};1689let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1690Ok(())1691}1692pub async fn call_list_u8_ret<_T, _D>(1693&self,1694accessor: &wasmtime::component::Accessor<_T, _D>,1695) -> wasmtime::Result<wasmtime::component::__internal::Vec<u8>>1696where1697_T: Send,1698_D: wasmtime::component::HasData,1699{1700let callee = unsafe {1701wasmtime::component::TypedFunc::<1702(),1703(wasmtime::component::__internal::Vec<u8>,),1704>::new_unchecked(self.list_u8_ret)1705};1706let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1707Ok(ret0)1708}1709pub async fn call_list_u16_ret<_T, _D>(1710&self,1711accessor: &wasmtime::component::Accessor<_T, _D>,1712) -> wasmtime::Result<wasmtime::component::__internal::Vec<u16>>1713where1714_T: Send,1715_D: wasmtime::component::HasData,1716{1717let callee = unsafe {1718wasmtime::component::TypedFunc::<1719(),1720(wasmtime::component::__internal::Vec<u16>,),1721>::new_unchecked(self.list_u16_ret)1722};1723let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1724Ok(ret0)1725}1726pub async fn call_list_u32_ret<_T, _D>(1727&self,1728accessor: &wasmtime::component::Accessor<_T, _D>,1729) -> wasmtime::Result<wasmtime::component::__internal::Vec<u32>>1730where1731_T: Send,1732_D: wasmtime::component::HasData,1733{1734let callee = unsafe {1735wasmtime::component::TypedFunc::<1736(),1737(wasmtime::component::__internal::Vec<u32>,),1738>::new_unchecked(self.list_u32_ret)1739};1740let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1741Ok(ret0)1742}1743pub async fn call_list_u64_ret<_T, _D>(1744&self,1745accessor: &wasmtime::component::Accessor<_T, _D>,1746) -> wasmtime::Result<wasmtime::component::__internal::Vec<u64>>1747where1748_T: Send,1749_D: wasmtime::component::HasData,1750{1751let callee = unsafe {1752wasmtime::component::TypedFunc::<1753(),1754(wasmtime::component::__internal::Vec<u64>,),1755>::new_unchecked(self.list_u64_ret)1756};1757let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1758Ok(ret0)1759}1760pub async fn call_list_s8_ret<_T, _D>(1761&self,1762accessor: &wasmtime::component::Accessor<_T, _D>,1763) -> wasmtime::Result<wasmtime::component::__internal::Vec<i8>>1764where1765_T: Send,1766_D: wasmtime::component::HasData,1767{1768let callee = unsafe {1769wasmtime::component::TypedFunc::<1770(),1771(wasmtime::component::__internal::Vec<i8>,),1772>::new_unchecked(self.list_s8_ret)1773};1774let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1775Ok(ret0)1776}1777pub async fn call_list_s16_ret<_T, _D>(1778&self,1779accessor: &wasmtime::component::Accessor<_T, _D>,1780) -> wasmtime::Result<wasmtime::component::__internal::Vec<i16>>1781where1782_T: Send,1783_D: wasmtime::component::HasData,1784{1785let callee = unsafe {1786wasmtime::component::TypedFunc::<1787(),1788(wasmtime::component::__internal::Vec<i16>,),1789>::new_unchecked(self.list_s16_ret)1790};1791let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1792Ok(ret0)1793}1794pub async fn call_list_s32_ret<_T, _D>(1795&self,1796accessor: &wasmtime::component::Accessor<_T, _D>,1797) -> wasmtime::Result<wasmtime::component::__internal::Vec<i32>>1798where1799_T: Send,1800_D: wasmtime::component::HasData,1801{1802let callee = unsafe {1803wasmtime::component::TypedFunc::<1804(),1805(wasmtime::component::__internal::Vec<i32>,),1806>::new_unchecked(self.list_s32_ret)1807};1808let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1809Ok(ret0)1810}1811pub async fn call_list_s64_ret<_T, _D>(1812&self,1813accessor: &wasmtime::component::Accessor<_T, _D>,1814) -> wasmtime::Result<wasmtime::component::__internal::Vec<i64>>1815where1816_T: Send,1817_D: wasmtime::component::HasData,1818{1819let callee = unsafe {1820wasmtime::component::TypedFunc::<1821(),1822(wasmtime::component::__internal::Vec<i64>,),1823>::new_unchecked(self.list_s64_ret)1824};1825let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1826Ok(ret0)1827}1828pub async fn call_list_f32_ret<_T, _D>(1829&self,1830accessor: &wasmtime::component::Accessor<_T, _D>,1831) -> wasmtime::Result<wasmtime::component::__internal::Vec<f32>>1832where1833_T: Send,1834_D: wasmtime::component::HasData,1835{1836let callee = unsafe {1837wasmtime::component::TypedFunc::<1838(),1839(wasmtime::component::__internal::Vec<f32>,),1840>::new_unchecked(self.list_f32_ret)1841};1842let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1843Ok(ret0)1844}1845pub async fn call_list_f64_ret<_T, _D>(1846&self,1847accessor: &wasmtime::component::Accessor<_T, _D>,1848) -> wasmtime::Result<wasmtime::component::__internal::Vec<f64>>1849where1850_T: Send,1851_D: wasmtime::component::HasData,1852{1853let callee = unsafe {1854wasmtime::component::TypedFunc::<1855(),1856(wasmtime::component::__internal::Vec<f64>,),1857>::new_unchecked(self.list_f64_ret)1858};1859let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1860Ok(ret0)1861}1862pub async fn call_tuple_list<_T, _D>(1863&self,1864accessor: &wasmtime::component::Accessor<_T, _D>,1865arg0: wasmtime::component::__internal::Vec<(u8, i8)>,1866) -> wasmtime::Result<1867wasmtime::component::__internal::Vec<(i64, u32)>,1868>1869where1870_T: Send,1871_D: wasmtime::component::HasData,1872{1873let callee = unsafe {1874wasmtime::component::TypedFunc::<1875(wasmtime::component::__internal::Vec<(u8, i8)>,),1876(wasmtime::component::__internal::Vec<(i64, u32)>,),1877>::new_unchecked(self.tuple_list)1878};1879let ((ret0,), _) = callee1880.call_concurrent(accessor, (arg0,))1881.await?;1882Ok(ret0)1883}1884pub async fn call_string_list_arg<_T, _D>(1885&self,1886accessor: &wasmtime::component::Accessor<_T, _D>,1887arg0: wasmtime::component::__internal::Vec<1888wasmtime::component::__internal::String,1889>,1890) -> wasmtime::Result<()>1891where1892_T: Send,1893_D: wasmtime::component::HasData,1894{1895let callee = unsafe {1896wasmtime::component::TypedFunc::<1897(1898wasmtime::component::__internal::Vec<1899wasmtime::component::__internal::String,1900>,1901),1902(),1903>::new_unchecked(self.string_list_arg)1904};1905let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;1906Ok(())1907}1908pub async fn call_string_list_ret<_T, _D>(1909&self,1910accessor: &wasmtime::component::Accessor<_T, _D>,1911) -> wasmtime::Result<1912wasmtime::component::__internal::Vec<1913wasmtime::component::__internal::String,1914>,1915>1916where1917_T: Send,1918_D: wasmtime::component::HasData,1919{1920let callee = unsafe {1921wasmtime::component::TypedFunc::<1922(),1923(1924wasmtime::component::__internal::Vec<1925wasmtime::component::__internal::String,1926>,1927),1928>::new_unchecked(self.string_list_ret)1929};1930let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1931Ok(ret0)1932}1933pub async fn call_tuple_string_list<_T, _D>(1934&self,1935accessor: &wasmtime::component::Accessor<_T, _D>,1936arg0: wasmtime::component::__internal::Vec<1937(u8, wasmtime::component::__internal::String),1938>,1939) -> wasmtime::Result<1940wasmtime::component::__internal::Vec<1941(wasmtime::component::__internal::String, u8),1942>,1943>1944where1945_T: Send,1946_D: wasmtime::component::HasData,1947{1948let callee = unsafe {1949wasmtime::component::TypedFunc::<1950(1951wasmtime::component::__internal::Vec<1952(u8, wasmtime::component::__internal::String),1953>,1954),1955(1956wasmtime::component::__internal::Vec<1957(wasmtime::component::__internal::String, u8),1958>,1959),1960>::new_unchecked(self.tuple_string_list)1961};1962let ((ret0,), _) = callee1963.call_concurrent(accessor, (arg0,))1964.await?;1965Ok(ret0)1966}1967pub async fn call_string_list<_T, _D>(1968&self,1969accessor: &wasmtime::component::Accessor<_T, _D>,1970arg0: wasmtime::component::__internal::Vec<1971wasmtime::component::__internal::String,1972>,1973) -> wasmtime::Result<1974wasmtime::component::__internal::Vec<1975wasmtime::component::__internal::String,1976>,1977>1978where1979_T: Send,1980_D: wasmtime::component::HasData,1981{1982let callee = unsafe {1983wasmtime::component::TypedFunc::<1984(1985wasmtime::component::__internal::Vec<1986wasmtime::component::__internal::String,1987>,1988),1989(1990wasmtime::component::__internal::Vec<1991wasmtime::component::__internal::String,1992>,1993),1994>::new_unchecked(self.string_list)1995};1996let ((ret0,), _) = callee1997.call_concurrent(accessor, (arg0,))1998.await?;1999Ok(ret0)2000}2001pub async fn call_record_list<_T, _D>(2002&self,2003accessor: &wasmtime::component::Accessor<_T, _D>,2004arg0: wasmtime::component::__internal::Vec<SomeRecord>,2005) -> wasmtime::Result<2006wasmtime::component::__internal::Vec<OtherRecord>,2007>2008where2009_T: Send,2010_D: wasmtime::component::HasData,2011{2012let callee = unsafe {2013wasmtime::component::TypedFunc::<2014(wasmtime::component::__internal::Vec<SomeRecord>,),2015(wasmtime::component::__internal::Vec<OtherRecord>,),2016>::new_unchecked(self.record_list)2017};2018let ((ret0,), _) = callee2019.call_concurrent(accessor, (arg0,))2020.await?;2021Ok(ret0)2022}2023pub async fn call_record_list_reverse<_T, _D>(2024&self,2025accessor: &wasmtime::component::Accessor<_T, _D>,2026arg0: wasmtime::component::__internal::Vec<OtherRecord>,2027) -> wasmtime::Result<2028wasmtime::component::__internal::Vec<SomeRecord>,2029>2030where2031_T: Send,2032_D: wasmtime::component::HasData,2033{2034let callee = unsafe {2035wasmtime::component::TypedFunc::<2036(wasmtime::component::__internal::Vec<OtherRecord>,),2037(wasmtime::component::__internal::Vec<SomeRecord>,),2038>::new_unchecked(self.record_list_reverse)2039};2040let ((ret0,), _) = callee2041.call_concurrent(accessor, (arg0,))2042.await?;2043Ok(ret0)2044}2045pub async fn call_variant_list<_T, _D>(2046&self,2047accessor: &wasmtime::component::Accessor<_T, _D>,2048arg0: wasmtime::component::__internal::Vec<SomeVariant>,2049) -> wasmtime::Result<2050wasmtime::component::__internal::Vec<OtherVariant>,2051>2052where2053_T: Send,2054_D: wasmtime::component::HasData,2055{2056let callee = unsafe {2057wasmtime::component::TypedFunc::<2058(wasmtime::component::__internal::Vec<SomeVariant>,),2059(wasmtime::component::__internal::Vec<OtherVariant>,),2060>::new_unchecked(self.variant_list)2061};2062let ((ret0,), _) = callee2063.call_concurrent(accessor, (arg0,))2064.await?;2065Ok(ret0)2066}2067pub async fn call_load_store_everything<_T, _D>(2068&self,2069accessor: &wasmtime::component::Accessor<_T, _D>,2070arg0: LoadStoreAllSizes,2071) -> wasmtime::Result<LoadStoreAllSizes>2072where2073_T: Send,2074_D: wasmtime::component::HasData,2075{2076let callee = unsafe {2077wasmtime::component::TypedFunc::<2078(LoadStoreAllSizes,),2079(LoadStoreAllSizes,),2080>::new_unchecked(self.load_store_everything)2081};2082let ((ret0,), _) = callee2083.call_concurrent(accessor, (arg0,))2084.await?;2085Ok(ret0)2086}2087}2088}2089}2090}2091}209220932094