pub struct StructuredOutput<T> {
pub output: T,
pub response: Response,
}Expand description
Parsed structured output together with the underlying AI response.
Returned by
RequestBuilder::generate_structured;
the raw Response is kept so callers still have access to usage, model,
and finish reason.
Fields§
§output: TThe response content deserialized into T and schema-validated.
response: ResponseThe underlying provider response the value was parsed from.
Trait Implementations§
Source§impl<T: Clone> Clone for StructuredOutput<T>
impl<T: Clone> Clone for StructuredOutput<T>
Source§fn clone(&self) -> StructuredOutput<T>
fn clone(&self) -> StructuredOutput<T>
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 moreAuto Trait Implementations§
impl<T> Freeze for StructuredOutput<T>where
T: Freeze,
impl<T> RefUnwindSafe for StructuredOutput<T>where
T: RefUnwindSafe,
impl<T> Send for StructuredOutput<T>where
T: Send,
impl<T> Sync for StructuredOutput<T>where
T: Sync,
impl<T> Unpin for StructuredOutput<T>where
T: Unpin,
impl<T> UnsafeUnpin for StructuredOutput<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for StructuredOutput<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