pub struct FunctionConfig {Show 15 fields
pub ffi: Option<FunctionFfi>,
pub ref: Option<String>,
pub name: Option<String>,
pub readonly: Option<bool>,
pub bindgen: Option<Bindgen>,
pub toolchain: Option<FunctionToolchain>,
pub build: Option<Vec<Vec<String>>>,
pub bin: Option<String>,
pub protected: Option<bool>,
pub access: Option<Vec<FunctionAccessPermission>>,
pub input: Option<Kind>,
pub output: Option<Kind>,
pub cache: Option<StoredCache>,
pub variables: Option<Vec<String>>,
pub timeout: Option<u16>,
}Expand description
Configuration parameters for Ordinary Functions.
Fields§
§ffi: Option<FunctionFfi>Foreign function interface config
ref: Option<String>Refers to the template config in another location
name: Option<String>Function name. Must be unique.
readonly: Option<bool>§bindgen: Option<Bindgen>which language the input binding WebAssembly Component should be compiled from.
Note: because the bindings are compiled to a WebAssembly Component, with a companion WIT file, the resulting bindings can be used by any language that has WIT support.
i.e. bindings compiled from Rust can be plugged into a Golang WebAssembly component.
Important: if your FFI serialization format
is JSON, or you are comfortable writing your own
FlexBuffer vector accessors it is not necessary
to generate the bindings (other than for reference
in the FlexBuffer vector accessing case).
toolchain: Option<FunctionToolchain>language for which the function builds
build: Option<Vec<Vec<String>>>build scripts for ensuring the WebAssembly components are composed properly at build time.
bin: Option<String>path to the WASM component binary
protected: Option<bool>What to check the token fields against. If unset function is public.
access: Option<Vec<FunctionAccessPermission>>Which Ordinary Application resources and host extensions this function has access to.
input: Option<Kind>Input definition for the action.
output: Option<Kind>Output definition for the action.
cache: Option<StoredCache>Persistent result cache configuration for readonly
functions.
variables: Option<Vec<String>>List of build time environment variables.
format in template: {{ YOUR_VAR }}
timeout: Option<u16>Max duration for the action.
Unit: seconds
Implementations§
Source§impl FunctionConfig
impl FunctionConfig
pub fn load_bindgen(&mut self)
Sourcepub fn ffi_validated(&self) -> &FunctionFfi
pub fn ffi_validated(&self) -> &FunctionFfi
§Panics
This method panics if the ffi field has not been validated to be present
Sourcepub fn name_validated(&self) -> &str
pub fn name_validated(&self) -> &str
§Panics
This method panics if the name field has not been validated to be present
Sourcepub fn input_validated(&self) -> &Kind
pub fn input_validated(&self) -> &Kind
§Panics
This method panics if the accepts field has not been validated to be present
Sourcepub fn output_validated(&self) -> &Kind
pub fn output_validated(&self) -> &Kind
§Panics
This method panics if the returns field has not been validated to be present
Trait Implementations§
Source§impl Clone for FunctionConfig
impl Clone for FunctionConfig
Source§fn clone(&self) -> FunctionConfig
fn clone(&self) -> FunctionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for FunctionConfig
Available on crate feature utoipa only.
impl ComposeSchema for FunctionConfig
utoipa only.Source§impl Debug for FunctionConfig
impl Debug for FunctionConfig
Source§impl Default for FunctionConfig
impl Default for FunctionConfig
Source§fn default() -> FunctionConfig
fn default() -> FunctionConfig
Source§impl<'de> Deserialize<'de> for FunctionConfig
impl<'de> Deserialize<'de> for FunctionConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for FunctionConfig
Available on crate feature docs only.
impl JsonSchema for FunctionConfig
docs only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more