pub struct BatchObject {
pub id: String,
pub endpoint: Option<String>,
pub model: Option<String>,
pub status: BatchStatus,
pub request_counts: Option<RequestCounts>,
pub usage: Option<BatchUsage>,
pub results: Option<Vec<BatchResultLine>>,
pub error: Option<Value>,
pub created_at: Option<i64>,
pub finalized_at: Option<i64>,
pub provider_request_id: Option<String>,
}Expand description
The batch object returned by both submit (202, validating) and poll.
Fields§
§id: String§endpoint: Option<String>§model: Option<String>§status: BatchStatus§request_counts: Option<RequestCounts>§usage: Option<BatchUsage>§results: Option<Vec<BatchResultLine>>Inline result lines, decoded per line (see BatchResultLine);
None for every non-completed status. There is no separate
results-download endpoint.
error: Option<Value>§created_at: Option<i64>§finalized_at: Option<i64>§provider_request_id: Option<String>Provider request identifier from the HTTP response header.
Implementations§
Source§impl BatchObject
impl BatchObject
Sourcepub fn batch_age_seconds(&self) -> Option<i64>
pub fn batch_age_seconds(&self) -> Option<i64>
Seconds since created_at — the operator-visible batch age
(context/11 provider_batch_age_seconds).
Trait Implementations§
Source§impl Clone for BatchObject
impl Clone for BatchObject
Source§fn clone(&self) -> BatchObject
fn clone(&self) -> BatchObject
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchObject
impl Debug for BatchObject
Source§impl<'de> Deserialize<'de> for BatchObject
impl<'de> Deserialize<'de> for BatchObject
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BatchObject
impl RefUnwindSafe for BatchObject
impl Send for BatchObject
impl Sync for BatchObject
impl Unpin for BatchObject
impl UnsafeUnpin for BatchObject
impl UnwindSafe for BatchObject
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