pub struct SgrResponse<T> {
pub output: Option<T>,
pub tool_calls: Vec<ToolCall>,
pub raw_text: String,
pub usage: Option<Usage>,
pub rate_limit: Option<RateLimitInfo>,
}Expand description
Response from an SGR call — structured output + optional tool calls.
Fields§
§output: Option<T>Parsed structured output (SGR envelope).
None if the model only returned tool calls without structured content.
tool_calls: Vec<ToolCall>Tool calls the model wants to execute.
raw_text: StringRaw text (for streaming / debugging).
usage: Option<Usage>Token usage.
rate_limit: Option<RateLimitInfo>Rate limit info from response headers (if provider sends them).
Trait Implementations§
Source§impl<T: Clone> Clone for SgrResponse<T>
impl<T: Clone> Clone for SgrResponse<T>
Source§fn clone(&self) -> SgrResponse<T>
fn clone(&self) -> SgrResponse<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 SgrResponse<T>where
T: Freeze,
impl<T> RefUnwindSafe for SgrResponse<T>where
T: RefUnwindSafe,
impl<T> Send for SgrResponse<T>where
T: Send,
impl<T> Sync for SgrResponse<T>where
T: Sync,
impl<T> Unpin for SgrResponse<T>where
T: Unpin,
impl<T> UnsafeUnpin for SgrResponse<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SgrResponse<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