pub struct Answer<T> { /* private fields */ }Expand description
A function’s typed result with blocks after it: the model reads value
as JSON text first, then each block in order. Its output schema is
T’s.
Implementations§
Source§impl<T> Answer<T>
An answer starts from its value; each with method adds a block after
what it already holds.
impl<T> Answer<T>
An answer starts from its value; each with method adds a block after
what it already holds.
pub fn new(value: T) -> Self
pub fn with(self, content: Content) -> Self
Sourcepub fn with_image_file(self, path: impl Into<String>) -> Self
pub fn with_image_file(self, path: impl Into<String>) -> Self
Adds the image at path in the session volume, as
Content::image_file.
Trait Implementations§
impl<T: PartialEq> StructuralPartialEq for Answer<T>
Auto Trait Implementations§
impl<T> Freeze for Answer<T>where
T: Freeze,
impl<T> RefUnwindSafe for Answer<T>where
T: RefUnwindSafe,
impl<T> Send for Answer<T>where
T: Send,
impl<T> Sync for Answer<T>where
T: Sync,
impl<T> Unpin for Answer<T>where
T: Unpin,
impl<T> UnsafeUnpin for Answer<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Answer<T>where
T: UnwindSafe,
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