pub struct Output<T> { /* private fields */ }Expand description
A structured output specification producing values of type T.
Implementations§
Source§impl<T> Output<T>
impl<T> Output<T>
Sourcepub fn custom(handler: impl OutputHandler<T>) -> Self
pub fn custom(handler: impl OutputHandler<T>) -> Self
Wraps a custom strategy.
Sourcepub fn handler(&self) -> Arc<dyn OutputHandler<T>> ⓘ
pub fn handler(&self) -> Arc<dyn OutputHandler<T>> ⓘ
The underlying handler.
Source§impl<T: DeserializeOwned + JsonSchema + Send + Sync + 'static> Output<T>
impl<T: DeserializeOwned + JsonSchema + Send + Sync + 'static> Output<T>
Source§impl<T: DeserializeOwned + Send + Sync + 'static> Output<T>
impl<T: DeserializeOwned + Send + Sync + 'static> Output<T>
Sourcepub fn object_with(schema: Schema<T>) -> Self
pub fn object_with(schema: Schema<T>) -> Self
A JSON object validated by schema.
Source§impl<T: DeserializeOwned + JsonSchema + Send + Sync + 'static> Output<Vec<T>>
impl<T: DeserializeOwned + JsonSchema + Send + Sync + 'static> Output<Vec<T>>
Source§impl<T: DeserializeOwned + Send + Sync + 'static> Output<Vec<T>>
impl<T: DeserializeOwned + Send + Sync + 'static> Output<Vec<T>>
Sourcepub fn array_with(element: Schema<T>) -> Self
pub fn array_with(element: Schema<T>) -> Self
An array of elements validated by element.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Output<T>
impl<T> !UnwindSafe for Output<T>
impl<T> Freeze for Output<T>
impl<T> Send for Output<T>
impl<T> Sync for Output<T>
impl<T> Unpin for Output<T>
impl<T> UnsafeUnpin for Output<T>
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