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() -> TurnInput
pub fn text(text: impl Into<String>) -> TurnInput
pub fn items(items: impl IntoIterator<Item = InputItem>) -> TurnInput
pub fn with_image_blob(self, id: impl Into<String>, bytes: Vec<u8>) -> TurnInput
pub fn with_image_blobs<I, K>(self, image_blobs: I) -> TurnInput
pub fn with_image_ref(self, id: impl Into<String>, bytes: Vec<u8>) -> TurnInput
pub fn with_protocol_turn_options( self, options: ProtocolTurnOptions, ) -> TurnInput
pub fn with_trace_turn_id(self, trace_turn_id: impl Into<String>) -> TurnInput
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TurnInput
impl<'de> Deserialize<'de> for TurnInput
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TurnInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TurnInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TurnInput
impl Serialize for TurnInput
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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