Skip to main content

extract

Macro extract 

Source
macro_rules! extract {
    ($name:ident = $inner:ty, $wrapper:ident) => { ... };
}
Expand description

Define a custom extractor that wraps an existing Actix extractor.

§Example

use actix_tower::prelude::*;
use serde::Deserialize;

#[derive(Deserialize)]
pub struct User { name: String }

extract!(UserJson = User, Json);