# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "api-error"
version = "0.1.2"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A derive macro for attaching HTTP status codes and user-facing messages to Rust error types."
homepage = "https://github.com/centreon/rs-api-error"
readme = "README.md"
keywords = [
    "derive",
    "error",
    "error-handling",
    "http",
]
categories = ["rust-patterns"]
license = "Apache-2.0"
repository = "https://github.com/centreon/rs-api-error"

[features]
axum = [
    "dep:axum-core",
    "dep:serde_core",
    "dep:serde_json",
    "api-error-derive?/axum",
]
default = ["derive"]
derive = ["dep:api-error-derive"]

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

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

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

[dependencies.api-error-derive]
version = "0.1"
optional = true

[dependencies.axum-core]
version = "0.5"
optional = true
default-features = false

[dependencies.http]
version = "1"

[dependencies.serde_core]
version = "1"
optional = true

[dependencies.serde_json]
version = "1"
optional = true

[dev-dependencies.axum]
version = "0.8"
default-features = false

[dev-dependencies.thiserror]
version = "2"

[dev-dependencies.trybuild]
version = "1"
