update README.md

This commit is contained in:
gengteng
2023-09-29 17:25:34 +08:00
parent 1270a3654d
commit 6ec038e0ce

View File

@@ -145,28 +145,30 @@ async fn main() -> anyhow::Result<()> {
} }
``` ```
Current module documentation predominantly showcases `Valid` examples, the usage of `ValidEx` is analogous.
## Features ## Features
| Feature | Description | Default | Example | Tests | | Feature | Description | Module | Default | Example | Tests |
|------------------|------------------------------------------------------------------------------------------------------|---------|---------|-------| |------------------|------------------------------------------------------------------------------------------------------|-----------------------------------------|---------|---------|-------|
| default | Enables support for `Path`, `Query`, `Json` and `Form` | ✅ | ✅ | ✅ | | default | Enables support for `Path`, `Query`, `Json` and `Form` | [`path`], [`query`], [`json`], [`form`] | ✅ | ✅ | ✅ |
| json | Enables support for `Json` | ✅ | ✅ | ✅ | | json | Enables support for `Json` | [`json`] | ✅ | ✅ | ✅ |
| query | Enables support for `Query` | ✅ | ✅ | ✅ | | query | Enables support for `Query` | [`query`] | ✅ | ✅ | ✅ |
| form | Enables support for `Form` | ✅ | ✅ | ✅ | | form | Enables support for `Form` | [`form`] | ✅ | ✅ | ✅ |
| typed_header | Enables support for `TypedHeader` | ❌ | ✅ | ✅ | | typed_header | Enables support for `TypedHeader` | [`typed_header`] | ❌ | ✅ | ✅ |
| typed_multipart | Enables support for `TypedMultipart` and `BaseMultipart` from `axum_typed_multipart` | ❌ | ✅ | ✅ | | typed_multipart | Enables support for `TypedMultipart` and `BaseMultipart` from `axum_typed_multipart` | [`typed_multipart`] | ❌ | ✅ | ✅ |
| msgpack | Enables support for `MsgPack` and `MsgPackRaw` from `axum-msgpack` | ❌ | ✅ | ✅ | | msgpack | Enables support for `MsgPack` and `MsgPackRaw` from `axum-msgpack` | [`msgpack`] | ❌ | ✅ | ✅ |
| yaml | Enables support for `Yaml` from `axum-yaml` | ❌ | ✅ | ✅ | | yaml | Enables support for `Yaml` from `axum-yaml` | [`yaml`] | ❌ | ✅ | ✅ |
| extra | Enables support for `Cached`, `WithRejection` from `axum-extra` | ❌ | ✅ | ✅ | | extra | Enables support for `Cached`, `WithRejection` from `axum-extra` | [`extra`] | ❌ | ✅ | ✅ |
| extra_typed_path | Enables support for `T: TypedPath` from `axum-extra` | ❌ | ✅ | ✅ | | extra_typed_path | Enables support for `T: TypedPath` from `axum-extra` | [`extra::typed_path`] | ❌ | ✅ | ✅ |
| extra_query | Enables support for `Query` from `axum-extra` | ❌ | ✅ | ✅ | | extra_query | Enables support for `Query` from `axum-extra` | [`extra::query`] | ❌ | ✅ | ✅ |
| extra_form | Enables support for `Form` from `axum-extra` | ❌ | ✅ | ✅ | | extra_form | Enables support for `Form` from `axum-extra` | [`extra::form`] | ❌ | ✅ | ✅ |
| extra_protobuf | Enables support for `Protobuf` from `axum-extra` | ❌ | ✅ | ✅ | | extra_protobuf | Enables support for `Protobuf` from `axum-extra` | [`extra::protobuf`] | ❌ | ✅ | ✅ |
| all_extra_types | Enables support for all extractors above from `axum-extra` | ❌ | ✅ | ✅ | | all_extra_types | Enables support for all extractors above from `axum-extra` | N/A | ❌ | ✅ | ✅ |
| all_types | Enables support for all extractors above | ❌ | ✅ | ✅ | | all_types | Enables support for all extractors above | N/A | ❌ | ✅ | ✅ |
| 422 | Use `422 Unprocessable Entity` instead of `400 Bad Request` as the status code when validation fails | ❌ | ✅ | ✅ | | 422 | Use `422 Unprocessable Entity` instead of `400 Bad Request` as the status code when validation fails | [`VALIDATION_ERROR_STATUS`] | ❌ | ✅ | ✅ |
| into_json | Validation errors will be serialized into JSON format and returned as the HTTP body | ❌ | ✅ | ✅ | | into_json | Validation errors will be serialized into JSON format and returned as the HTTP body | N/A | ❌ | ✅ | ✅ |
| full | Enables all features | ❌ | ✅ | ✅ | | full | Enables all features | N/A | ❌ | ✅ | ✅ |
## Compatibility ## Compatibility