rstructor 0.2.5

Rust equivalent of Python's Instructor + Pydantic: Extract structured, validated data from LLMs (OpenAI, Anthropic, Grok, Gemini) using type-safe Rust structs and enums
Documentation
[dependencies.async-trait]
version = "0.1"

[dependencies.chrono]
version = "0.4"

[dependencies.reqwest]
default-features = false
features = ["json", "rustls-tls"]
optional = true
version = "0.12.15"

[dependencies.rstructor_derive]
optional = true
version = "0.2.5"

[dependencies.serde]
features = ["derive"]
version = "1.0"

[dependencies.serde_json]
version = "1.0"

[dependencies.thiserror]
version = "2.0.12"

[dependencies.tokio]
features = ["rt", "macros", "rt-multi-thread", "io-std"]
optional = true
version = "1.0"

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-futures]
optional = true
version = "0.2"

[dependencies.tracing-subscriber]
features = ["env-filter"]
optional = true
version = "0.3"

[[example]]
name = "container_attributes_example"
path = "examples/container_attributes_example.rs"

[[example]]
name = "container_description_example"
path = "examples/container_description_example.rs"

[[example]]
name = "custom_type_example"
path = "examples/custom_type_example.rs"

[[example]]
name = "enum_example"
path = "examples/enum_example.rs"

[[example]]
name = "enum_with_data_example"
path = "examples/enum_with_data_example.rs"

[[example]]
name = "event_planner"
path = "examples/event_planner.rs"

[[example]]
name = "logging_example"
path = "examples/logging_example.rs"

[[example]]
name = "manual_implementation"
path = "examples/manual_implementation.rs"

[[example]]
name = "medical_example"
path = "examples/medical_example.rs"

[[example]]
name = "movie_example"
path = "examples/movie_example.rs"

[[example]]
name = "nested_enum_example"
path = "examples/nested_enum_example.rs"

[[example]]
name = "nested_objects_example"
path = "examples/nested_objects_example.rs"

[[example]]
name = "news_article_categorizer"
path = "examples/news_article_categorizer.rs"

[[example]]
name = "recipe_extractor"
path = "examples/recipe_extractor.rs"

[[example]]
name = "structured_movie_info"
path = "examples/structured_movie_info.rs"

[[example]]
name = "validation_example"
path = "examples/validation_example.rs"

[[example]]
name = "weather_example"
path = "examples/weather_example.rs"

[features]
anthropic = ["reqwest", "tokio"]
default = ["openai", "anthropic", "grok", "gemini", "derive", "logging"]
derive = ["rstructor_derive"]
gemini = ["reqwest", "tokio"]
grok = ["reqwest", "tokio"]
logging = ["tracing-subscriber", "tracing-futures"]
openai = ["reqwest", "tokio"]

[lib]
name = "rstructor"
path = "src/lib.rs"

[package]
authors = ["Clifton King <cliftonk@gmail.com>"]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = false
categories = ["api-bindings", "web-programming", "parsing", "data-structures", "text-processing"]
description = "Rust equivalent of Python's Instructor + Pydantic: Extract structured, validated data from LLMs (OpenAI, Anthropic, Grok, Gemini) using type-safe Rust structs and enums"
documentation = "https://docs.rs/rstructor"
edition = "2024"
exclude = ["release.sh", "*.sh", "CLAUDE.md", "EXAMPLES.md", ".github/", ".gitignore", ".gitattributes", ".claude/", "tmp/", "*.orig", "*.bak"]
keywords = ["pydantic", "instructor", "structured-output", "llm", "openai"]
license = "MIT"
name = "rstructor"
readme = "README.md"
repository = "https://github.com/clifton/rstructor"
version = "0.2.5"

[[test]]
name = "anthropic_validation_test"
path = "tests/anthropic_validation_test.rs"

[[test]]
name = "container_attributes_tests"
path = "tests/container_attributes_tests.rs"

[[test]]
name = "container_description_tests"
path = "tests/container_description_tests.rs"

[[test]]
name = "conversation_history_tests"
path = "tests/conversation_history_tests.rs"

[[test]]
name = "custom_type_schema_tests"
path = "tests/custom_type_schema_tests.rs"

[[test]]
name = "derive_macro_tests"
path = "tests/derive_macro_tests.rs"

[[test]]
name = "error_tests"
path = "tests/error_tests.rs"

[[test]]
name = "example_validation_tests"
path = "tests/example_validation_tests.rs"

[[test]]
name = "grok_validation_test"
path = "tests/grok_validation_test.rs"

[[test]]
name = "instructor_tests"
path = "tests/instructor_tests.rs"

[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"

[[test]]
name = "llm_integration_tests"
path = "tests/llm_integration_tests.rs"

[[test]]
name = "model_string_test"
path = "tests/model_string_test.rs"

[[test]]
name = "nested_enum_tests"
path = "tests/nested_enum_tests.rs"

[[test]]
name = "nested_struct_tests"
path = "tests/nested_struct_tests.rs"

[[test]]
name = "openai_validation_test"
path = "tests/openai_validation_test.rs"

[[test]]
name = "schema_builder_tests"
path = "tests/schema_builder_tests.rs"

[[test]]
name = "schema_validation_tests"
path = "tests/schema_validation_tests.rs"

[[test]]
name = "timeout_tests"
path = "tests/timeout_tests.rs"

[[test]]
name = "validate_method_tests"
path = "tests/validate_method_tests.rs"

[[test]]
name = "validation_tests"
path = "tests/validation_tests.rs"