pub struct TaskletBuilder<'a> { /* private fields */ }Expand description
Builder for configuring and launching a CPU tasklet.
Configure the fuel limit and input data, then call
launch to execute.
Implementations§
Source§impl<'a> TaskletBuilder<'a>
impl<'a> TaskletBuilder<'a>
Sourcepub fn fuel(self, n: u64) -> Self
pub fn fuel(self, n: u64) -> Self
Set the fuel limit for the tasklet.
Fuel is consumed by WASM instructions. The tasklet will be terminated when fuel runs out. Default is 1,000,000.
Sourcepub fn max_output(self, n: usize) -> Self
pub fn max_output(self, n: usize) -> Self
Set the maximum output buffer size.
Default is 4096 bytes. Increase if the tasklet produces more output.
Sourcepub fn launch(self) -> Result<TaskletResult>
pub fn launch(self) -> Result<TaskletResult>
Launch the tasklet and wait for completion.
§Errors
Returns crate::error::FabricError::Disconnected if the host connection fails,
or another crate::error::FabricError variant based on the host status code.
Auto Trait Implementations§
impl<'a> Freeze for TaskletBuilder<'a>
impl<'a> !RefUnwindSafe for TaskletBuilder<'a>
impl<'a> !Send for TaskletBuilder<'a>
impl<'a> !Sync for TaskletBuilder<'a>
impl<'a> Unpin for TaskletBuilder<'a>
impl<'a> !UnwindSafe for TaskletBuilder<'a>
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