pub struct FunctionBindgenBuilder<'a, S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<'a, S: State> FunctionBindgenBuilder<'a, S>
impl<'a, S: State> FunctionBindgenBuilder<'a, S>
Sourcepub fn build(self) -> FunctionBindgen<'a>where
S: IsComplete,
pub fn build(self) -> FunctionBindgen<'a>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn resource_map(
self,
value: &'a ResourceMap,
) -> FunctionBindgenBuilder<'a, SetResourceMap<S>>where
S::ResourceMap: IsUnset,
pub fn resource_map(
self,
value: &'a ResourceMap,
) -> FunctionBindgenBuilder<'a, SetResourceMap<S>>where
S::ResourceMap: IsUnset,
Required.
Mapping of resources for types that have corresponding definitions locally
Sourcepub fn clear_resource_borrows(
self,
value: bool,
) -> FunctionBindgenBuilder<'a, SetClearResourceBorrows<S>>where
S::ClearResourceBorrows: IsUnset,
pub fn clear_resource_borrows(
self,
value: bool,
) -> FunctionBindgenBuilder<'a, SetClearResourceBorrows<S>>where
S::ClearResourceBorrows: IsUnset,
Required.
Whether current resource borrows need to be deactivated
Sourcepub fn intrinsics(
self,
value: &'a mut BTreeSet<Intrinsic>,
) -> FunctionBindgenBuilder<'a, SetIntrinsics<S>>where
S::Intrinsics: IsUnset,
pub fn intrinsics(
self,
value: &'a mut BTreeSet<Intrinsic>,
) -> FunctionBindgenBuilder<'a, SetIntrinsics<S>>where
S::Intrinsics: IsUnset,
Required.
Set of intrinsics
Sourcepub fn valid_lifting_optimization(
self,
value: bool,
) -> FunctionBindgenBuilder<'a, SetValidLiftingOptimization<S>>where
S::ValidLiftingOptimization: IsUnset,
pub fn valid_lifting_optimization(
self,
value: bool,
) -> FunctionBindgenBuilder<'a, SetValidLiftingOptimization<S>>where
S::ValidLiftingOptimization: IsUnset,
Required.
Whether to perform valid lifting optimization
Sourcepub fn sizes(
self,
value: &'a SizeAlign,
) -> FunctionBindgenBuilder<'a, SetSizes<S>>where
S::Sizes: IsUnset,
pub fn sizes(
self,
value: &'a SizeAlign,
) -> FunctionBindgenBuilder<'a, SetSizes<S>>where
S::Sizes: IsUnset,
Required.
Sizes and alignments for sub elements
Sourcepub fn err(self, value: ErrHandling) -> FunctionBindgenBuilder<'a, SetErr<S>>where
S::Err: IsUnset,
pub fn err(self, value: ErrHandling) -> FunctionBindgenBuilder<'a, SetErr<S>>where
S::Err: IsUnset,
Required.
Method of error handling
Sourcepub fn tmp(self, value: usize) -> FunctionBindgenBuilder<'a, SetTmp<S>>where
S::Tmp: IsUnset,
pub fn tmp(self, value: usize) -> FunctionBindgenBuilder<'a, SetTmp<S>>where
S::Tmp: IsUnset,
Required.
Temporary values
Sourcepub fn src(self, value: Source) -> FunctionBindgenBuilder<'a, SetSrc<S>>where
S::Src: IsUnset,
pub fn src(self, value: Source) -> FunctionBindgenBuilder<'a, SetSrc<S>>where
S::Src: IsUnset,
Required.
Source code of the function
Sourcepub fn block_storage(
self,
value: Vec<Source>,
) -> FunctionBindgenBuilder<'a, SetBlockStorage<S>>where
S::BlockStorage: IsUnset,
pub fn block_storage(
self,
value: Vec<Source>,
) -> FunctionBindgenBuilder<'a, SetBlockStorage<S>>where
S::BlockStorage: IsUnset,
Required.
Block storage
Sourcepub fn blocks(
self,
value: Vec<(String, Vec<String>)>,
) -> FunctionBindgenBuilder<'a, SetBlocks<S>>where
S::Blocks: IsUnset,
pub fn blocks(
self,
value: Vec<(String, Vec<String>)>,
) -> FunctionBindgenBuilder<'a, SetBlocks<S>>where
S::Blocks: IsUnset,
Required.
Blocks of the function
Sourcepub fn params(
self,
value: Vec<String>,
) -> FunctionBindgenBuilder<'a, SetParams<S>>where
S::Params: IsUnset,
pub fn params(
self,
value: Vec<String>,
) -> FunctionBindgenBuilder<'a, SetParams<S>>where
S::Params: IsUnset,
Required.
Parameters of the function
Sourcepub fn memory(
self,
value: &'a String,
) -> FunctionBindgenBuilder<'a, SetMemory<S>>where
S::Memory: IsUnset,
pub fn memory(
self,
value: &'a String,
) -> FunctionBindgenBuilder<'a, SetMemory<S>>where
S::Memory: IsUnset,
Sourcepub fn maybe_memory(
self,
value: Option<&'a String>,
) -> FunctionBindgenBuilder<'a, SetMemory<S>>where
S::Memory: IsUnset,
pub fn maybe_memory(
self,
value: Option<&'a String>,
) -> FunctionBindgenBuilder<'a, SetMemory<S>>where
S::Memory: IsUnset,
Sourcepub fn realloc(
self,
value: &'a String,
) -> FunctionBindgenBuilder<'a, SetRealloc<S>>where
S::Realloc: IsUnset,
pub fn realloc(
self,
value: &'a String,
) -> FunctionBindgenBuilder<'a, SetRealloc<S>>where
S::Realloc: IsUnset,
Sourcepub fn maybe_realloc(
self,
value: Option<&'a String>,
) -> FunctionBindgenBuilder<'a, SetRealloc<S>>where
S::Realloc: IsUnset,
pub fn maybe_realloc(
self,
value: Option<&'a String>,
) -> FunctionBindgenBuilder<'a, SetRealloc<S>>where
S::Realloc: IsUnset,
Sourcepub fn post_return(
self,
value: &'a String,
) -> FunctionBindgenBuilder<'a, SetPostReturn<S>>where
S::PostReturn: IsUnset,
pub fn post_return(
self,
value: &'a String,
) -> FunctionBindgenBuilder<'a, SetPostReturn<S>>where
S::PostReturn: IsUnset,
Sourcepub fn maybe_post_return(
self,
value: Option<&'a String>,
) -> FunctionBindgenBuilder<'a, SetPostReturn<S>>where
S::PostReturn: IsUnset,
pub fn maybe_post_return(
self,
value: Option<&'a String>,
) -> FunctionBindgenBuilder<'a, SetPostReturn<S>>where
S::PostReturn: IsUnset,
Sourcepub fn tracing_prefix(
self,
value: &'a String,
) -> FunctionBindgenBuilder<'a, SetTracingPrefix<S>>where
S::TracingPrefix: IsUnset,
pub fn tracing_prefix(
self,
value: &'a String,
) -> FunctionBindgenBuilder<'a, SetTracingPrefix<S>>where
S::TracingPrefix: IsUnset,
Required.
Prefix to use when printing tracing information
Sourcepub fn tracing_enabled(
self,
value: bool,
) -> FunctionBindgenBuilder<'a, SetTracingEnabled<S>>where
S::TracingEnabled: IsUnset,
pub fn tracing_enabled(
self,
value: bool,
) -> FunctionBindgenBuilder<'a, SetTracingEnabled<S>>where
S::TracingEnabled: IsUnset,
Required.
Whether tracing is enabled
Sourcepub fn encoding(
self,
value: StringEncoding,
) -> FunctionBindgenBuilder<'a, SetEncoding<S>>where
S::Encoding: IsUnset,
pub fn encoding(
self,
value: StringEncoding,
) -> FunctionBindgenBuilder<'a, SetEncoding<S>>where
S::Encoding: IsUnset,
Required.
Method if string encoding
Sourcepub fn callee(self, value: &'a str) -> FunctionBindgenBuilder<'a, SetCallee<S>>where
S::Callee: IsUnset,
pub fn callee(self, value: &'a str) -> FunctionBindgenBuilder<'a, SetCallee<S>>where
S::Callee: IsUnset,
Required.
Callee of the function
Sourcepub fn callee_resource_dynamic(
self,
value: bool,
) -> FunctionBindgenBuilder<'a, SetCalleeResourceDynamic<S>>where
S::CalleeResourceDynamic: IsUnset,
pub fn callee_resource_dynamic(
self,
value: bool,
) -> FunctionBindgenBuilder<'a, SetCalleeResourceDynamic<S>>where
S::CalleeResourceDynamic: IsUnset,
Required.
Whether the callee is dynamic (i.e. has multiple operands)
Sourcepub fn resolve(
self,
value: &'a Resolve,
) -> FunctionBindgenBuilder<'a, SetResolve<S>>where
S::Resolve: IsUnset,
pub fn resolve(
self,
value: &'a Resolve,
) -> FunctionBindgenBuilder<'a, SetResolve<S>>where
S::Resolve: IsUnset,
Required.
The [wit_bindgen::Resolve] containing extracted WIT information
Sourcepub fn requires_async_porcelain(
self,
value: bool,
) -> FunctionBindgenBuilder<'a, SetRequiresAsyncPorcelain<S>>where
S::RequiresAsyncPorcelain: IsUnset,
pub fn requires_async_porcelain(
self,
value: bool,
) -> FunctionBindgenBuilder<'a, SetRequiresAsyncPorcelain<S>>where
S::RequiresAsyncPorcelain: IsUnset,
Required.
Whether the function requires async porcelain
In the case of an import this likely implies the use of JSPI and in the case of an export this is simply code generation metadata.
Sourcepub fn is_async(self, value: bool) -> FunctionBindgenBuilder<'a, SetIsAsync<S>>where
S::IsAsync: IsUnset,
pub fn is_async(self, value: bool) -> FunctionBindgenBuilder<'a, SetIsAsync<S>>where
S::IsAsync: IsUnset,
Required.
Whether the function is guest async lifted (i.e. WASI P3)
Sourcepub fn iface_name(
self,
value: &'a str,
) -> FunctionBindgenBuilder<'a, SetIfaceName<S>>where
S::IfaceName: IsUnset,
pub fn iface_name(
self,
value: &'a str,
) -> FunctionBindgenBuilder<'a, SetIfaceName<S>>where
S::IfaceName: IsUnset,
Sourcepub fn maybe_iface_name(
self,
value: Option<&'a str>,
) -> FunctionBindgenBuilder<'a, SetIfaceName<S>>where
S::IfaceName: IsUnset,
pub fn maybe_iface_name(
self,
value: Option<&'a str>,
) -> FunctionBindgenBuilder<'a, SetIfaceName<S>>where
S::IfaceName: IsUnset,
Sourcepub fn asmjs(self, value: bool) -> FunctionBindgenBuilder<'a, SetAsmjs<S>>where
S::Asmjs: IsUnset,
pub fn asmjs(self, value: bool) -> FunctionBindgenBuilder<'a, SetAsmjs<S>>where
S::Asmjs: IsUnset,
Required.
Whether the callee was transpiled from Wasm to JS (asm.js) and thus needs shimming for i64