objectiveai_sdk/functions/profiles/computations/response/unary/
function_execution.rs1use crate::functions::{self, profiles::computations::response};
2use schemars::JsonSchema;
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
6#[schemars(
7 rename = "functions.profiles.computations.response.unary.FunctionExecution"
8)]
9pub struct FunctionExecution {
10 pub index: u64,
11 pub dataset: u64,
12 pub n: u64,
13 pub retry: u64,
14 #[serde(flatten)]
15 pub inner: functions::executions::response::unary::FunctionExecution,
16}
17
18impl From<response::streaming::FunctionExecutionChunk> for FunctionExecution {
19 fn from(
20 response::streaming::FunctionExecutionChunk {
21 index,
22 dataset,
23 n,
24 retry,
25 inner,
26 }: response::streaming::FunctionExecutionChunk,
27 ) -> Self {
28 Self {
29 index,
30 dataset,
31 n,
32 retry,
33 inner: inner.into(),
34 }
35 }
36}