Cargo Features

[dependencies]
axum-codec = { version = "0.0.13", default-features = false, features = ["full-codecs", "macros", "aide", "validator", "pretty-errors", "bincode", "bitcode", "cbor", "json", "msgpack", "toml", "yaml", "serde"] }
default = json, macros, pretty-errors

These default features are set whenever axum-codec is added without default-features = false somewhere in the dependency tree.

full-codecs = bincode, bitcode, cbor, json, msgpack, toml, yaml

Enables all codecs

macros default pretty-errors

Enables debug of axum-codec-macros and derive of optional bincode, optional bitcode, optional schemars, optional serde, and optional validator

bitcode:

0.6.3 added the #[bitcode(crate = "...")] option

aide

Enables support for {get,put,..}_with and relevant chaning methods to add documentation to routes

Enables aide, schemars, form, json, matched-path, original-uri, query and tokio of axum, aide of axum-codec-macros

Affects handler::Input, response::IntoCodecResponse

validator

Enables support for validator, adds an additional validator::Validate bound to T in Codec<T>

Enables validator, validator of axum-codec-macros

pretty-errors default = macros

Enables more verbose (and expensive) error handling machinery, but significantly improves the quality of error messages for consumers of the API.

Affects rejection::Message

bincode full-codecs?

Enables bincode, bincode of axum-codec-macros

bitcode full-codecs?

Enables bitcode, bitcode of axum-codec-macros

cbor full-codecs? = serde

Enables ciborium

json default full-codecs? = serde

Enables serde_json

msgpack full-codecs? = serde

Enables rmp-serde

toml full-codecs? = serde

Enables toml

yaml full-codecs? = serde

Enables serde_yaml

serde cbor? json msgpack? toml? yaml?

Should not be manually enabled, but will not cause any issues if it is.

Enables serde, serde of axum-codec-macros