pub enum TextFormat {
Text,
JsonObject,
JsonSchema {
name: String,
schema: Value,
},
}Expand description
The output format of the response.
Variants§
Text
Plain text (default).
JsonObject
JSON mode.
JsonSchema
Structured output conforming to the given JSON Schema.
Implementations§
Source§impl TextFormat
impl TextFormat
pub fn text() -> Self
pub fn json_object() -> Self
pub fn json_schema(name: impl Into<String>, schema: Value) -> Self
Trait Implementations§
Source§impl Clone for TextFormat
impl Clone for TextFormat
Source§fn clone(&self) -> TextFormat
fn clone(&self) -> TextFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextFormat
impl Debug for TextFormat
Source§impl PartialEq for TextFormat
impl PartialEq for TextFormat
Source§impl Serialize for TextFormat
impl Serialize for TextFormat
impl StructuralPartialEq for TextFormat
Auto Trait Implementations§
impl Freeze for TextFormat
impl RefUnwindSafe for TextFormat
impl Send for TextFormat
impl Sync for TextFormat
impl Unpin for TextFormat
impl UnsafeUnpin for TextFormat
impl UnwindSafe for TextFormat
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