#[non_exhaustive]pub enum ExtractionMode {
Auto,
Native,
ForcedTool,
}Expand description
Controls how structured data is extracted from a provider response.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Auto
Automatically select the best strategy based on provider capabilities.
Prefers Native when structured output is explicitly supported,
otherwise falls back to ForcedTool when tool calls are explicitly
supported.
Native
Use the provider’s built-in structured output / JSON mode.
ForcedTool
Inject a synthetic tool and force the provider to call it, extracting the structured data from the tool call arguments.
Trait Implementations§
Source§impl Clone for ExtractionMode
impl Clone for ExtractionMode
Source§fn clone(&self) -> ExtractionMode
fn clone(&self) -> ExtractionMode
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 ExtractionMode
impl Debug for ExtractionMode
Source§impl Default for ExtractionMode
impl Default for ExtractionMode
Source§fn default() -> ExtractionMode
fn default() -> ExtractionMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExtractionMode
impl<'de> Deserialize<'de> for ExtractionMode
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
Source§impl PartialEq for ExtractionMode
impl PartialEq for ExtractionMode
Source§impl Serialize for ExtractionMode
impl Serialize for ExtractionMode
impl Copy for ExtractionMode
impl Eq for ExtractionMode
impl StructuralPartialEq for ExtractionMode
Auto Trait Implementations§
impl Freeze for ExtractionMode
impl RefUnwindSafe for ExtractionMode
impl Send for ExtractionMode
impl Sync for ExtractionMode
impl Unpin for ExtractionMode
impl UnsafeUnpin for ExtractionMode
impl UnwindSafe for ExtractionMode
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