pub enum ExecutionPayload {
Source {
code: String,
},
GuestModule {
format: GuestModuleFormat,
bytes: Vec<u8>,
},
}Expand description
The code or module to execute.
Source payloads carry inline code strings. Guest module payloads carry
precompiled binary modules (e.g., .wasm files).
§Example
use adk_code::ExecutionPayload;
let payload = ExecutionPayload::Source {
code: "fn run(input: serde_json::Value) -> serde_json::Value { input }".to_string(),
};Variants§
Source
Inline source code to compile and/or interpret.
GuestModule
A precompiled guest module (e.g., WASM).
Fields
§
format: GuestModuleFormatThe binary format of the guest module.
Trait Implementations§
Source§impl Clone for ExecutionPayload
impl Clone for ExecutionPayload
Source§fn clone(&self) -> ExecutionPayload
fn clone(&self) -> ExecutionPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExecutionPayload
impl RefUnwindSafe for ExecutionPayload
impl Send for ExecutionPayload
impl Sync for ExecutionPayload
impl Unpin for ExecutionPayload
impl UnsafeUnpin for ExecutionPayload
impl UnwindSafe for ExecutionPayload
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
Mutably borrows from an owned value. Read more