pub struct PartialModelResponse {
    pub delta: Option<ContentDelta>,
    pub usage: Option<ModelUsage>,
    pub cost: Option<f64>,
}Expand description
Represents a partial response from the language model, useful for streaming output via async generator.
Fields§
§delta: Option<ContentDelta>§usage: Option<ModelUsage>§cost: Option<f64>Trait Implementations§
Source§impl Clone for PartialModelResponse
 
impl Clone for PartialModelResponse
Source§fn clone(&self) -> PartialModelResponse
 
fn clone(&self) -> PartialModelResponse
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 moreSource§impl Debug for PartialModelResponse
 
impl Debug for PartialModelResponse
Source§impl Default for PartialModelResponse
 
impl Default for PartialModelResponse
Source§fn default() -> PartialModelResponse
 
fn default() -> PartialModelResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PartialModelResponse
 
impl<'de> Deserialize<'de> for PartialModelResponse
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
Source§impl From<PartialModelResponse> for MockStreamResult
 
impl From<PartialModelResponse> for MockStreamResult
Source§fn from(partial: PartialModelResponse) -> Self
 
fn from(partial: PartialModelResponse) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PartialModelResponse
 
impl PartialEq for PartialModelResponse
Source§impl Serialize for PartialModelResponse
 
impl Serialize for PartialModelResponse
impl StructuralPartialEq for PartialModelResponse
Auto Trait Implementations§
impl Freeze for PartialModelResponse
impl RefUnwindSafe for PartialModelResponse
impl Send for PartialModelResponse
impl Sync for PartialModelResponse
impl Unpin for PartialModelResponse
impl UnwindSafe for PartialModelResponse
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