pub struct GenerationSchema { /* private fields */ }Expand description
A validated FoundationModels generation schema encoded as JSON Schema.
Implementations§
Source§impl GenerationSchema
impl GenerationSchema
Sourcepub fn from_dynamic(
root: DynamicGenerationSchema,
dependencies: impl IntoIterator<Item = DynamicGenerationSchema>,
) -> Result<Self, FMError>
pub fn from_dynamic( root: DynamicGenerationSchema, dependencies: impl IntoIterator<Item = DynamicGenerationSchema>, ) -> Result<Self, FMError>
Sourcepub fn json_schema(&self) -> &str
pub fn json_schema(&self) -> &str
The JSON Schema payload accepted by Apple’s GenerationSchema.
Sourcepub fn generated_content() -> Self
pub fn generated_content() -> Self
A schema for arbitrary JSON (GeneratedContent).
Trait Implementations§
Source§impl Clone for GenerationSchema
impl Clone for GenerationSchema
Source§fn clone(&self) -> GenerationSchema
fn clone(&self) -> GenerationSchema
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 GenerationSchema
impl Debug for GenerationSchema
Source§impl PartialEq for GenerationSchema
impl PartialEq for GenerationSchema
Source§fn eq(&self, other: &GenerationSchema) -> bool
fn eq(&self, other: &GenerationSchema) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for GenerationSchema
impl StructuralPartialEq for GenerationSchema
Auto Trait Implementations§
impl Freeze for GenerationSchema
impl RefUnwindSafe for GenerationSchema
impl Send for GenerationSchema
impl Sync for GenerationSchema
impl Unpin for GenerationSchema
impl UnsafeUnpin for GenerationSchema
impl UnwindSafe for GenerationSchema
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