pub struct GeminiMessage {
pub id: String,
pub timestamp: String,
pub message_type: String,
pub content: String,
pub thoughts: Vec<GeminiThought>,
pub tokens: Option<GeminiTokens>,
pub model: Option<String>,
pub tool_calls: Vec<Value>,
}Expand description
Single message within a Gemini session
Used both for the legacy messages[] entries and for JSONL events whose
type == "gemini". Non-assistant events ("user", "info", $set
meta-updates, …) are filtered out by the analyzer before reaching this
type, so fields such as content and model can stay absent without
breaking deserialisation.
Fields§
§id: StringMessage identifier.
timestamp: StringISO-8601 timestamp string for the message.
message_type: StringMessage type discriminator (e.g. gemini, user, info).
content: StringFlattened message text (string or joined {text} array blocks).
thoughts: Vec<GeminiThought>Reasoning steps recorded for the turn.
tokens: Option<GeminiTokens>Token-usage breakdown for the turn, when reported.
model: Option<String>Model that produced the turn, when reported.
tool_calls: Vec<Value>Raw tool-call entries for the turn.
Trait Implementations§
Source§impl Clone for GeminiMessage
impl Clone for GeminiMessage
Source§fn clone(&self) -> GeminiMessage
fn clone(&self) -> GeminiMessage
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 moreSource§impl Debug for GeminiMessage
impl Debug for GeminiMessage
Source§impl<'de> Deserialize<'de> for GeminiMessage
impl<'de> Deserialize<'de> for GeminiMessage
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
Auto Trait Implementations§
impl Freeze for GeminiMessage
impl RefUnwindSafe for GeminiMessage
impl Send for GeminiMessage
impl Sync for GeminiMessage
impl Unpin for GeminiMessage
impl UnsafeUnpin for GeminiMessage
impl UnwindSafe for GeminiMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more