[−][src]Struct gwasm_api::task::ComputedTask
Struct representing computed gWasm task
This struct in addition to storing some information about the
computed task such as its name, or timeouts, it first and foremost
contains a Vec
of ComputedSubtask
s.
Example:
use gwasm_api::task::{GWasmBinary, TaskBuilder, ComputedTask}; use std::path::Path; use tempfile::tempdir; use std::convert::TryInto; let binary = GWasmBinary { js: &[], wasm: &[], }; let workspace = tempdir().unwrap(); let task = TaskBuilder::try_new(&workspace, binary).unwrap().build().unwrap(); let computed_task: Result<ComputedTask, _> = task.try_into(); assert!(computed_task.is_ok()); assert!(computed_task.unwrap().subtasks.is_empty());
Fields
name: String
Task's name
bid: f64
Used task bid value
timeout: Timeout
Used task Timeout
value
subtask_timeout: Timeout
Used subtask Timeout
value
subtasks: Vec<ComputedSubtask>
Vec
of ComputedSubtask
s, ordered by subtask data insertion
using TaskBuilder::push_subtask_data
Trait Implementations
impl Debug for ComputedTask
[src]
impl TryFrom<Task> for ComputedTask
[src]
Auto Trait Implementations
impl RefUnwindSafe for ComputedTask
impl Send for ComputedTask
impl Sync for ComputedTask
impl Unpin for ComputedTask
impl UnwindSafe for ComputedTask
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,