pub enum NativeStructuredSupport {
None,
ForcedTool,
JsonSchema,
JsonObject,
}Expand description
Provider-native structured-output capability.
Each LlmClient reports this so the structured engine can request the
strongest enforcement the provider actually supports. Defaults to
NativeStructuredSupport::None for clients that don’t override it.
Variants§
None
No native enforcement — rely on prompt instructions + lenient extraction.
ForcedTool
Can force a specific tool call (Anthropic tool_choice, OpenAI function
tool_choice). Guarantees the model emits the structured tool call
instead of free-form prose.
JsonSchema
Supports OpenAI-style response_format (json_object and
json_schema + strict) in addition to forced tool calls.
JsonObject
Supports OpenAI-style response_format: { type: "json_object" },
but cannot combine it with a forced tool_choice (for example,
DeepSeek reasoning models). This is deliberately separate from
JsonSchema: callers can still get provider-side
syntactic JSON guarantees without sending a request the model rejects.
Trait Implementations§
Source§impl Clone for NativeStructuredSupport
impl Clone for NativeStructuredSupport
Source§fn clone(&self) -> NativeStructuredSupport
fn clone(&self) -> NativeStructuredSupport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NativeStructuredSupport
Source§impl Debug for NativeStructuredSupport
impl Debug for NativeStructuredSupport
impl Eq for NativeStructuredSupport
Source§impl PartialEq for NativeStructuredSupport
impl PartialEq for NativeStructuredSupport
impl StructuralPartialEq for NativeStructuredSupport
Auto Trait Implementations§
impl Freeze for NativeStructuredSupport
impl RefUnwindSafe for NativeStructuredSupport
impl Send for NativeStructuredSupport
impl Sync for NativeStructuredSupport
impl Unpin for NativeStructuredSupport
impl UnsafeUnpin for NativeStructuredSupport
impl UnwindSafe for NativeStructuredSupport
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more