pub struct TaskResult {
pub task_id: TaskId,
pub data: Option<Arc<RecordBatch>>,
pub execution_time_ms: u64,
pub error: Option<String>,
}Expand description
Result of a task execution.
Fields§
§task_id: TaskIdTask identifier.
data: Option<Arc<RecordBatch>>Resulting data as Arrow RecordBatch.
execution_time_ms: u64Execution time in milliseconds.
error: Option<String>Error message if task failed.
Implementations§
Source§impl TaskResult
impl TaskResult
Sourcepub fn success(
task_id: TaskId,
data: Arc<RecordBatch>,
execution_time_ms: u64,
) -> Self
pub fn success( task_id: TaskId, data: Arc<RecordBatch>, execution_time_ms: u64, ) -> Self
Create a successful task result.
Sourcepub fn failure(task_id: TaskId, error: String, execution_time_ms: u64) -> Self
pub fn failure(task_id: TaskId, error: String, execution_time_ms: u64) -> Self
Create a failed task result.
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if the result indicates success.
Sourcepub fn is_failure(&self) -> bool
pub fn is_failure(&self) -> bool
Check if the result indicates failure.
Trait Implementations§
Source§impl Clone for TaskResult
impl Clone for TaskResult
Source§fn clone(&self) -> TaskResult
fn clone(&self) -> TaskResult
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 TaskResult
impl !RefUnwindSafe for TaskResult
impl Send for TaskResult
impl Sync for TaskResult
impl Unpin for TaskResult
impl UnsafeUnpin for TaskResult
impl !UnwindSafe for TaskResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request