pub struct Xml<T>(pub T);
Expand description
Xml extractor
Xml can be used to extract typed information from request’s body.
XmlConfig allows to configure extraction
process.
use actix_web::{web, App};
use actix_xml::Xml;
use serde::Deserialize;
#[derive(Deserialize)]
struct Info {
username: String,
}
async fn index(info: Xml<Info>) -> String {
format!("Welcome {}!", info.username)
}
fn main() {
let app = App::new().service(
web::resource("/index.html").route(
web::post().to(index))
);
}
Deconstruct to an inner value
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Mutably dereferences the value.
Formats the value using the given formatter. Read more
The associated error which can be returned.
type Future = Either<LocalBoxFuture<'static, Result<Self, ActixError>>, Ready<Result<Self, ActixError>>>
Future that resolves to a Self
Configuration for this extractor
Convert request to a Self
Create and configure config instance.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Instruments this type with the current Span, returning an
Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Instruments this type with the current Span, returning an
Instrumented wrapper. Read more
impl<T, U> Into<U> for T where
U: From<T>,
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,