pub struct ArrayOutput<T> { /* private fields */ }Expand description
An array of schema-validated elements, wrapped in { "elements": [...] }
on the wire.
Implementations§
Source§impl<T> ArrayOutput<T>
impl<T> ArrayOutput<T>
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Describes the output.
Trait Implementations§
Source§impl<T> Debug for ArrayOutput<T>
impl<T> Debug for ArrayOutput<T>
Source§impl<T: DeserializeOwned + Send + Sync + 'static> OutputHandler<Vec<T>> for ArrayOutput<T>
impl<T: DeserializeOwned + Send + Sync + 'static> OutputHandler<Vec<T>> for ArrayOutput<T>
Source§fn validate_configuration(&self) -> Result<(), Error>
fn validate_configuration(&self) -> Result<(), Error>
Validates strategy settings before a model request is made. Read more
Source§fn max_elements(&self) -> Option<usize>
fn max_elements(&self) -> Option<usize>
Maximum number of elements an array stream may publish.
Source§fn response_format(&self) -> Option<ResponseFormat>
fn response_format(&self) -> Option<ResponseFormat>
The response format sent to the model.
Source§fn parse_complete(
&self,
text: &str,
ctx: &OutputContext,
) -> Result<Vec<T>, Error>
fn parse_complete( &self, text: &str, ctx: &OutputContext, ) -> Result<Vec<T>, Error>
Parses the complete text of the final step. Read more
Source§fn parse_partial(&self, text: &str) -> Option<JsonValue>
fn parse_partial(&self, text: &str) -> Option<JsonValue>
Parses partial text during streaming;
None when nothing usable is
available yet.Source§fn typed_partial(&self, value: &JsonValue) -> Option<Vec<T>>
fn typed_partial(&self, value: &JsonValue) -> Option<Vec<T>>
Converts a partial JSON value into the typed output when it already
satisfies the schema.
Source§fn parse_elements(&self, text: &str) -> Option<Vec<JsonValue>>
fn parse_elements(&self, text: &str) -> Option<Vec<JsonValue>>
Array strategies: the complete, validated elements contained in the
partial text so far.
Source§fn parse_typed_elements(&self, text: &str) -> Option<Vec<T>>
fn parse_typed_elements(&self, text: &str) -> Option<Vec<T>>
Returns completed typed array elements after schema validation.
Source§fn wants_output(&self) -> bool
fn wants_output(&self) -> bool
Whether the call must produce an output (
false only for NoOutput).Auto Trait Implementations§
impl<T> !RefUnwindSafe for ArrayOutput<T>
impl<T> !UnwindSafe for ArrayOutput<T>
impl<T> Freeze for ArrayOutput<T>
impl<T> Send for ArrayOutput<T>
impl<T> Sync for ArrayOutput<T>
impl<T> Unpin for ArrayOutput<T>
impl<T> UnsafeUnpin for ArrayOutput<T>where
Schema<T>: UnsafeUnpin,
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