pub struct ModelStructuredOutputCapabilities { /* private fields */ }Expand description
Structured final-output support for one model binding.
Refusals, safety interruptions, and token truncation remain distinct terminal outcomes and need not satisfy a requested schema. Every nominally complete structured output is still locally parsed and validated.
Implementations§
Source§impl ModelStructuredOutputCapabilities
impl ModelStructuredOutputCapabilities
Sourcepub fn new(
level: ModelStructuredOutputLevel,
schema_profile: Option<SchemaReference>,
) -> Result<Self, ModelStructuredOutputCapabilitiesError>
pub fn new( level: ModelStructuredOutputLevel, schema_profile: Option<SchemaReference>, ) -> Result<Self, ModelStructuredOutputCapabilitiesError>
Constructs a structured-output declaration.
§Errors
Returns ModelStructuredOutputCapabilitiesError unless a schema
profile is present exactly for the JSON Schema capability level.
Sourcepub const fn unsupported() -> Self
pub const fn unsupported() -> Self
Constructs an unsupported structured-output declaration.
Sourcepub const fn json_schema(schema_profile: SchemaReference) -> Self
pub const fn json_schema(schema_profile: SchemaReference) -> Self
Constructs JSON Schema-constrained support.
Sourcepub const fn level(&self) -> ModelStructuredOutputLevel
pub const fn level(&self) -> ModelStructuredOutputLevel
Returns the structured-output support level.
Sourcepub const fn schema_profile(&self) -> Option<&SchemaReference>
pub const fn schema_profile(&self) -> Option<&SchemaReference>
Returns the accepted structured-output schema profile.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelStructuredOutputCapabilities
impl<'de> Deserialize<'de> for ModelStructuredOutputCapabilities
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ModelStructuredOutputCapabilities
Source§impl JsonSchema for ModelStructuredOutputCapabilities
impl JsonSchema for ModelStructuredOutputCapabilities
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for ModelStructuredOutputCapabilities
Auto Trait Implementations§
impl Forget for ModelStructuredOutputCapabilities
impl Freeze for ModelStructuredOutputCapabilities
impl Move for ModelStructuredOutputCapabilities
impl RefUnwindSafe for ModelStructuredOutputCapabilities
impl Send for ModelStructuredOutputCapabilities
impl Sync for ModelStructuredOutputCapabilities
impl Unpin for ModelStructuredOutputCapabilities
impl UnsafeUnpin for ModelStructuredOutputCapabilities
impl UnwindSafe for ModelStructuredOutputCapabilities
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