Repository: actix/actix-web
File: src/extract.rs (Rust)

Code before:
//! Request extractors

use std::{
    future::Future,
    pin::Pin,
    task::{Context, Poll},
};

use actix_utils::future::{ready, Ready};
use futures_core::ready;

use crate::{dev::Payload, Error, HttpRequest};

/// [`FromRequest`] is one of the most commonly used trait, although some may not realize it.
///
/// A type that implements [`FromRequest`] is called an **extractor** and can be extracted
/// from the request, for example [`Json`], [`Form`], [`Path`] and so on.
///
/// An extractor can be customized by injecting the corresponding configuration with:
///
/// - [`App::data()`](`crate::App::data`)
/// - [`App::app_data()`](`crate::App::app_data`)
/// - [`Scope::data()`](`crate::Scope::data`)
/// - [`Scope::app_data()`](`crate::Scope::app_data`)
/// - [`Resource::data()`](`crate::Resource::data`)
/// - [`Resource::app_data()`](`crate::Resource::app_data`)
///
/// Here are some built-in extractors and their corresponding configuration.
/// Please refer to the respective documents for details.
///
/// | Extractor   | Configuration     |
/// |-------------|-------------------|
/// | [`Json`]    | [`JsonConfig`]    |
/// | [`Form`]    | [`FormConfig`]    |
/// | [`Path`]    | [`PathConfig`]    |
/// | [`Query`]   | [`QueryConfig`]   |
/// | [`Payload`] | [`PayloadConfig`] |
/// | [`String`]  | [`PayloadConfig`] |
/// | [`Bytes`]   | [`PayloadConfig`] |
///
/// [`Json`]: crate::web::Json
/// [`JsonConfig`]: crate::web::JsonConfig
/// [`Form`]: crate::web::Form
/// [`FormConfig`]: crate::web::FormConfig

Review comment (refactor):
I'd suggest putting this part below the list of the built-in extractors, so the reader can actually look at the configs, and then see how he can inject their own.

Code after:
//! Request extractors

use std::{
    convert::Infallible,
    future::Future,
    pin::Pin,
    task::{Context, Poll},
};

use actix_http::http::{Method, Uri};
use actix_utils::future::{ok, Ready};
use futures_core::ready;

use crate::{dev::Payload, Error, HttpRequest};

/// A type that implements [`FromRequest`] is called an **extractor** and can extract data
/// from the request. Examples of types that implement this trait are [`Json`], [`Form`], [`Path`].
///
/// An extractor can be customized by injecting the corresponding configuration with one of:
///
/// - [`App::app_data()`](`crate::App::app_data`)
/// - [`Scope::app_data()`](`crate::Scope::app_data`)
/// - [`Resource::app_data()`](`crate::Resource::app_data`)
///
/// Here are some built-in extractors and their corresponding configuration.
/// Please refer to the respective documentation for details.
///
/// | Extractor   | Configuration     |
/// |-------------|-------------------|
/// | [`Json`]    | [`JsonConfig`]    |
/// | [`Form`]    | [`FormConfig`]    |
/// | [`Path`]    | [`PathConfig`]    |
/// | [`Query`]   | [`QueryConfig`]   |
/// | [`Payload`] | [`PayloadConfig`] |
/// | [`String`]  | [`PayloadConfig`] |
/// | [`Bytes`]   | [`PayloadConfig`] |
///
/// [`Json`]: crate::web::Json
/// [`JsonConfig`]: crate::web::JsonConfig
/// [`Form`]: crate::web::Form
/// [`FormConfig`]: crate::web::FormConfig
/// [`Path`]: crate::web::Path
/// [`PathConfig`]: crate::web::PathConfig
/// [`Query`]: crate::web::Query