#[non_exhaustive]pub struct GenerateContentResponseBody {
pub error: Option<GenerateContentError>,
pub candidates: Option<Vec<Candidate>>,
pub prompt_feedback: Option<PromptFeedback>,
pub usage_metadata: Option<UsageMetadata>,
pub model_version: Option<String>,
pub response_id: Option<String>,
pub model_status: Option<ModelStatus>,
pub rest: Rest,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error: Option<GenerateContentError>A Google API error can arrive as a record inside a successful HTTP stream.
candidates: Option<Vec<Candidate>>§prompt_feedback: Option<PromptFeedback>§usage_metadata: Option<UsageMetadata>§model_version: Option<String>§response_id: Option<String>§model_status: Option<ModelStatus>§rest: RestImplementations§
Source§impl GenerateContentResponseBody
impl GenerateContentResponseBody
Sourcepub fn builder() -> GenerateContentResponseBodyBuilder
pub fn builder() -> GenerateContentResponseBodyBuilder
Start a builder by supplying the required fields in declaration order.
Trait Implementations§
Source§impl Clone for GenerateContentResponseBody
impl Clone for GenerateContentResponseBody
Source§impl CompleteResponse for GenerateContentResponseBody
impl CompleteResponse for GenerateContentResponseBody
type Event = GenerateContentResponseBody
fn events( self, _: IdNamespace, limits: EventLimits, ) -> Result<Converted<Vec<Self::Event>>, TransformError>
Source§impl Debug for GenerateContentResponseBody
impl Debug for GenerateContentResponseBody
Source§impl DeclaredFields for GenerateContentResponseBody
impl DeclaredFields for GenerateContentResponseBody
fn into_declared(self) -> Self
Source§impl<'de> Deserialize<'de> for GenerateContentResponseBody
impl<'de> Deserialize<'de> for GenerateContentResponseBody
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 FanoutEvent for GenerateContentResponseBody
impl FanoutEvent for GenerateContentResponseBody
fn project( &mut self, index: usize, id: &str, _: &mut Option<i64>, ) -> Result<(), TransformError>
fn aggregate( values: Vec<Self::Full>, id: String, report: &mut Report, ) -> Result<Self::Full, TransformError>
fn tail(value: &Self::Full, _: bool) -> Result<Option<Self>, TransformError>
fn equivalent(a: &Self::Full, b: &Self::Full) -> bool
fn visible(&self) -> bool
Source§impl NativeEvent for GenerateContentResponseBody
impl NativeEvent for GenerateContentResponseBody
const DIALECT: Dialect = Dialect::Gemini
type Full = GenerateContentResponseBody
type Collector = GeminiStreamCollector
fn collector( _: IdentityFlow, _: TargetIdPolicy, limits: EventLimits, ) -> Self::Collector
fn collect( collector: &mut Self::Collector, event: Self, ) -> Result<(), TransformError>
fn collected( collector: Self::Collector, ) -> Result<Converted<Collected<Self::Full>>, TransformError>
fn event_name(&self) -> Option<&'static str>
fn is_terminal(&self) -> bool
Source§fn tool_declarations(
&self,
_complete_tool_names: bool,
) -> Vec<(String, ToolCallKind, Option<String>)>
fn tool_declarations( &self, _complete_tool_names: bool, ) -> Vec<(String, ToolCallKind, Option<String>)>
Complete emitted ID, actual call kind, and complete name if already known.
fn responses_history( _value: &Self::Full, ) -> Option<&GenerateContentResponseBody>
const DONE: bool = false
fn decode(value: Value) -> Result<Self, TransformError>
fn collect_done(_collector: &mut Self::Collector) -> Result<(), TransformError>
fn is_usage_only(&self) -> bool
impl StructuralPartialEq for GenerateContentResponseBody
Auto Trait Implementations§
impl Freeze for GenerateContentResponseBody
impl RefUnwindSafe for GenerateContentResponseBody
impl Send for GenerateContentResponseBody
impl Sync for GenerateContentResponseBody
impl Unpin for GenerateContentResponseBody
impl UnsafeUnpin for GenerateContentResponseBody
impl UnwindSafe for GenerateContentResponseBody
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