pub struct GenerationSchemaProperty {
pub name: GenerationSchemaPropertyName,
pub description: Option<SchemaDescription>,
pub property_type: GenerationSchemaPropertyType,
pub requirement: GenerationSchemaPropertyRequirement,
}Expand description
A single property within a GenerationSchema.
Fields§
§name: GenerationSchemaPropertyNameProperty name (matches the JSON key in the model output).
description: Option<SchemaDescription>Optional human-readable hint that guides the model.
property_type: GenerationSchemaPropertyTypeThe expected type of this property.
requirement: GenerationSchemaPropertyRequirementWhether the model must include or may omit this property.
Implementations§
Source§impl GenerationSchemaProperty
impl GenerationSchemaProperty
Sourcepub fn new(
name: impl Into<GenerationSchemaPropertyName>,
property_type: GenerationSchemaPropertyType,
) -> Self
pub fn new( name: impl Into<GenerationSchemaPropertyName>, property_type: GenerationSchemaPropertyType, ) -> Self
Creates a required property with the given name and type.
Sourcepub fn description(self, description: impl Into<SchemaDescription>) -> Self
pub fn description(self, description: impl Into<SchemaDescription>) -> Self
Attaches a human-readable description that guides the model.
Trait Implementations§
Source§impl Clone for GenerationSchemaProperty
impl Clone for GenerationSchemaProperty
Source§fn clone(&self) -> GenerationSchemaProperty
fn clone(&self) -> GenerationSchemaProperty
Returns a duplicate of the value. Read more
1.0.0 · 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 GenerationSchemaProperty
impl Debug for GenerationSchemaProperty
Auto Trait Implementations§
impl Freeze for GenerationSchemaProperty
impl RefUnwindSafe for GenerationSchemaProperty
impl Send for GenerationSchemaProperty
impl Sync for GenerationSchemaProperty
impl Unpin for GenerationSchemaProperty
impl UnsafeUnpin for GenerationSchemaProperty
impl UnwindSafe for GenerationSchemaProperty
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