XML extractor for axum.
This crate provides struct Xml
that can be used to extract typed information from request's body.
Under the hood, quick-xml is used to parse payloads.
encoding
: support non utf-8 payload
MIT
XML extractor for axum
License: MIT License
XML extractor for axum.
This crate provides struct Xml
that can be used to extract typed information from request's body.
Under the hood, quick-xml is used to parse payloads.
encoding
: support non utf-8 payloadMIT
rust version: 1.66
axum version: 0.6.2
axum-xml version: 0.2.0
code:
#[derive(Serialize)]
struct User {
username: String,
}
#[debug_handler]
pub async fn get_user(Path(user_id) : Path<u32>) -> Xml<User> {
let user = User {username: "test".to_string()};
Xml(user)
}
error information:
error[E0277]: the trait bound `Xml<User>: IntoResponse` is not satisfied
--> src\wecom\handler\message.rs:73:53
|
73 | pub async fn get_user(Path(user_id) : Path<u32>) -> Xml<User> {
| ^^^ the trait `IntoResponse` is not implemented for `Xml<User>`
|
= help: the following other types implement trait `IntoResponse`:
&'static [u8]
&'static str
()
(Response<()>, R)
(Response<()>, T1, R)
(Response<()>, T1, T2, R)
(Response<()>, T1, T2, T3, R)
| ^^^ required by this bound in `__axum_macros_check_reply_handler_1_from_request_check`
For more information about this error, try `rustc --explain E0277`.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.