pub struct PartialObject<T> {
pub partial_json: String,
pub complete: Option<T>,
pub usage: Usage,
}Expand description
A partially-received structured object from a streaming response.
Fields§
§partial_json: StringThe raw JSON accumulated so far (may be incomplete).
complete: Option<T>Some(T) once the stream completes and the object passes
validation + deserialization.
usage: UsageAccumulated usage across retries and the final successful call.
Trait Implementations§
Source§impl<T: Clone> Clone for PartialObject<T>
impl<T: Clone> Clone for PartialObject<T>
Source§fn clone(&self) -> PartialObject<T>
fn clone(&self) -> PartialObject<T>
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<T> Freeze for PartialObject<T>where
T: Freeze,
impl<T> RefUnwindSafe for PartialObject<T>where
T: RefUnwindSafe,
impl<T> Send for PartialObject<T>where
T: Send,
impl<T> Sync for PartialObject<T>where
T: Sync,
impl<T> Unpin for PartialObject<T>where
T: Unpin,
impl<T> UnwindSafe for PartialObject<T>where
T: UnwindSafe,
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