pub struct InvokeRequest {
pub export: Option<String>,
pub args: Vec<Value>,
}Expand description
Body of POST /functions/{id}/invoke and POST /functions/{id}/invoke-async.
Both fields are optional so callers that just want the default _start
→ main fallback can omit them entirely (an empty {} body remains
valid). When args is supplied each element is converted into a
WasmArg via WasmArg::from_json before being threaded into
TensorWasmExecutor::call_export_with_args.
#[serde(default)] plus deny_unknown_fields = false (the default)
keeps the schema forward-compatible: adding new optional fields later
will not break clients that send the legacy {} body, and clients
sending arbitrary extra fields are tolerated rather than rejected with
400.
Fields§
§export: Option<String>Optional export name override. When None, the handler tries
_start first and falls back to main, matching the historical
behaviour for WASI command modules.
args: Vec<Value>Optional JSON-array argument list. Each element is parsed into a
WasmArg; non-numeric elements surface as 400 invalid_args.
Trait Implementations§
Source§impl Debug for InvokeRequest
impl Debug for InvokeRequest
Source§impl Default for InvokeRequest
impl Default for InvokeRequest
Source§fn default() -> InvokeRequest
fn default() -> InvokeRequest
Source§impl<'de> Deserialize<'de> for InvokeRequest
impl<'de> Deserialize<'de> for InvokeRequest
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>,
Auto Trait Implementations§
impl Freeze for InvokeRequest
impl RefUnwindSafe for InvokeRequest
impl Send for InvokeRequest
impl Sync for InvokeRequest
impl Unpin for InvokeRequest
impl UnsafeUnpin for InvokeRequest
impl UnwindSafe for InvokeRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more