pub struct TurnInput {
pub items: Vec<InputItem>,
pub image_blobs: HashMap<String, Vec<u8>>,
pub protocol_turn_options: Option<ProtocolTurnOptions>,
pub trace_turn_id: Option<String>,
pub protocol_extension: Option<ProtocolTurnExtensionHandle>,
pub turn_context: TurnContext,
}Expand description
Host-provided per-turn input.
Fields§
§items: Vec<InputItem>§image_blobs: HashMap<String, Vec<u8>>§protocol_turn_options: Option<ProtocolTurnOptions>Per-turn override for protocol-owned turn options.
trace_turn_id: Option<String>Optional externally-stable trace turn id. Normal runtime callers leave this empty and the runtime generates one per outer turn.
protocol_extension: Option<ProtocolTurnExtensionHandle>§turn_context: TurnContextImplementations§
Source§impl TurnInput
impl TurnInput
pub fn empty() -> Self
pub fn text(text: impl Into<String>) -> Self
pub fn items(items: impl IntoIterator<Item = InputItem>) -> Self
pub fn with_image_blob(self, id: impl Into<String>, bytes: Vec<u8>) -> Self
pub fn with_image_blobs<I, K>(self, image_blobs: I) -> Self
pub fn with_image_ref(self, id: impl Into<String>, bytes: Vec<u8>) -> Self
pub fn with_protocol_turn_options(self, options: ProtocolTurnOptions) -> Self
pub fn with_trace_turn_id(self, trace_turn_id: impl Into<String>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TurnInput
impl<'de> Deserialize<'de> for TurnInput
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 !RefUnwindSafe for TurnInput
impl !UnwindSafe for TurnInput
impl Freeze for TurnInput
impl Send for TurnInput
impl Sync for TurnInput
impl Unpin for TurnInput
impl UnsafeUnpin for TurnInput
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