pub struct AsyncTaskResult {
pub task_id: TaskId,
pub task_type: String,
pub payload: Option<Box<dyn Any + Send>>,
pub metadata: TaskMetadata,
}Expand description
非同期Task の実行結果
Fields§
§task_id: TaskIdTask ID(発行元が結果を受け取るため)
task_type: Stringタスク種別(“web_search”, “llm_call” など)
payload: Option<Box<dyn Any + Send>>結果データ(型消去)
metadata: TaskMetadataメタデータ
Implementations§
Source§impl AsyncTaskResult
impl AsyncTaskResult
pub fn success<T: Any + Send + 'static>( task_id: TaskId, task_type: impl Into<String>, payload: T, duration: Duration, ) -> Self
pub fn failure( task_id: TaskId, task_type: impl Into<String>, error: String, duration: Duration, ) -> Self
pub fn timeout( task_id: TaskId, task_type: impl Into<String>, duration: Duration, ) -> Self
Auto Trait Implementations§
impl Freeze for AsyncTaskResult
impl !RefUnwindSafe for AsyncTaskResult
impl Send for AsyncTaskResult
impl !Sync for AsyncTaskResult
impl Unpin for AsyncTaskResult
impl !UnwindSafe for AsyncTaskResult
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> 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>
Converts
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>
Converts
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