pub enum ThreadItem {
Message {
from: Speaker,
author: String,
text: String,
images: Vec<ImageData>,
},
Activity {
tool: String,
text: String,
call_id: Option<String>,
},
Result {
tool: String,
call_id: Option<String>,
ok: bool,
text: String,
image: Option<String>,
},
Run {
tool: String,
call_id: Option<String>,
ok: bool,
text: String,
run: CommandRun,
},
Suggestions {
replies: Vec<String>,
call_id: Option<String>,
},
Decision {
decision_id: Option<String>,
tool: String,
text: String,
},
Drawn {
surface: Box<DrawnSurface>,
},
DrawnRefused {
refusal: RefusedDrawing,
},
DrawnSent {
sent: DrawnSent,
},
App {
app: Box<AppView>,
},
TurnFailed {
text: String,
reason: Option<String>,
code: Option<String>,
},
}Expand description
One thing in a thread (spec 3.3 §5.1): a message, something an agent did, or a decision, which links to its inbox entry and is drawn from the card (§11 S-I1).
Variants§
Message
A message.
Fields
The author’s name: the agent’s display name, or “You”.
Activity
An agent used a tool.
Fields
Result
A tool’s result.
Fields
Run
A command or code an agent ran, and what it wrote: the shell’s bash or the sandbox’s
sandbox_exec (spec 3.3 §5.1). It stands for that call’s Result.
Fields
run: CommandRunThe run.
Suggestions
Replies the agent suggests the person might send next (spec 3.3 §5.1): tapping one fills the message box, and the person still sends it.
Fields
Decision
An agent asked first: a held call. Its card comes from the inbox entry.
Fields
Drawn
Something an agent drew (spec 3.3 §6.1 genui, §7.4 rule 5): a form, card, table or
screen on the normal card background, never a decision. Only a render tool’s result
with the reserved state key and the drawing’s digest makes one.
Fields
surface: Box<DrawnSurface>The drawing, its strings resolved on the server.
DrawnRefused
A drawing that was not shown: a plain notice (spec 3.3 §7.4 rule 5).
Fields
refusal: RefusedDrawingWhat the thread says, and the reason the developer panel shows.
DrawnSent
A person sent a drawn form: the call they asked for, held as the drawing agent for
their decision, or refused by its rules (spec 3.3 §7.4 rule 5). The decision’s own
Decision item follows it in the same entry.
App
An app an MCP server’s tool showed (spec 3.3 §6.1 genui-apps): on the normal card
background, labelled as unable to approve anything, framed sandboxed by the web home
and shown as its text result elsewhere. Only the event of the MCP tool’s own call, which
carries its adk.mcp.app record, makes one.
TurnFailed
The turn ended in an error, where the agent’s reply would have been: a failed model
call leaves no event of its own, so the source’s record of the turn says it
(Source::turn_failures). It follows the last event of
the session before the turn ended.
Trait Implementations§
Source§impl Clone for ThreadItem
impl Clone for ThreadItem
Source§impl Debug for ThreadItem
impl Debug for ThreadItem
Source§impl<'de> Deserialize<'de> for ThreadItem
impl<'de> Deserialize<'de> for ThreadItem
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>,
impl Eq for ThreadItem
Source§impl JsonSchema for ThreadItem
impl JsonSchema for ThreadItem
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ThreadItem
impl PartialEq for ThreadItem
Source§impl Serialize for ThreadItem
impl Serialize for ThreadItem
impl StructuralPartialEq for ThreadItem
Auto Trait Implementations§
impl Forget for ThreadItem
impl Freeze for ThreadItemwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<ImageData>: Freeze,
PhantomData<OutputLine>: Freeze,
PhantomData<String>: Freeze,
*const DrawnSurface is !null: Freeze,
PhantomData<DrawnSurface>: Freeze,
NonZero<i32>: Freeze,
Utc: Freeze,
*const AppView is !null: Freeze,
PhantomData<AppView>: Freeze,
impl Move for ThreadItem
impl RefUnwindSafe for ThreadItem
impl Send for ThreadItem
impl Sync for ThreadItem
impl Unpin for ThreadItem
impl UnsafeUnpin for ThreadItemwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ImageData>: UnsafeUnpin,
PhantomData<OutputLine>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const DrawnSurface is !null: UnsafeUnpin,
PhantomData<DrawnSurface>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
*const AppView is !null: UnsafeUnpin,
PhantomData<AppView>: UnsafeUnpin,
impl UnwindSafe for ThreadItemwhere
RawVecInner: UnwindSafe,
BoxRaw<DrawnSurface>: UnwindSafe,
NonZero<i32>: UnwindSafe,
Utc: UnwindSafe,
BoxRaw<AppView>: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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> ⓘ
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