mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 16:55:08 +02:00
prepare beta 2 release set (#1975)
This commit is contained in:
@ -15,7 +15,7 @@ use crate::{error::Error, service::ServiceResponse};
|
||||
/// Middleware for enabling any middleware to be used in [`Resource::wrap`](crate::Resource::wrap),
|
||||
/// [`Scope::wrap`](crate::Scope::wrap) and [`Condition`](super::Condition).
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// use actix_web::middleware::{Logger, Compat};
|
||||
/// use actix_web::{App, web};
|
||||
|
@ -30,7 +30,7 @@ use crate::{
|
||||
/// Use `BodyEncoding` trait for overriding response compression. To disable compression set
|
||||
/// encoding to `ContentEncoding::Identity`.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// use actix_web::{web, middleware, App, HttpResponse};
|
||||
///
|
||||
|
@ -11,7 +11,7 @@ use futures_util::future::{Either, FutureExt, LocalBoxFuture};
|
||||
/// control such middlewares like `Logger` or `Compress` directly. See the [`Compat`](super::Compat)
|
||||
/// middleware for a workaround.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// use actix_web::middleware::{Condition, NormalizePath};
|
||||
/// use actix_web::App;
|
||||
|
@ -28,7 +28,7 @@ use crate::{
|
||||
///
|
||||
/// Headers with the same key that are already set in a response will *not* be overwritten.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// use actix_web::{web, http, middleware, App, HttpResponse};
|
||||
///
|
||||
|
@ -33,7 +33,7 @@ type ErrorHandler<B> = dyn Fn(ServiceResponse<B>) -> Result<ErrorHandlerResponse
|
||||
/// Register handlers with the `ErrorHandlers::handler()` method to register a custom error handler
|
||||
/// for a given status code. Handlers can modify existing responses or create completely new ones.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// use actix_web::middleware::{ErrorHandlers, ErrorHandlerResponse};
|
||||
/// use actix_web::{web, http, dev, App, HttpRequest, HttpResponse, Result};
|
||||
|
@ -42,7 +42,7 @@ use crate::{
|
||||
/// 127.0.0.1:54278 "GET /test HTTP/1.1" 404 20 "-" "HTTPie/2.2.0" 0.001074
|
||||
/// ```
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// use actix_web::{middleware::Logger, App};
|
||||
///
|
||||
|
@ -53,7 +53,7 @@ impl Default for TrailingSlash {
|
||||
/// trailing slashes or else they will be inaccessible (or vice versa when using the
|
||||
/// `TrailingSlash::Always` behavior), as shown in the example tests below.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// use actix_web::{web, middleware, App};
|
||||
///
|
||||
|
@ -197,7 +197,7 @@ where
|
||||
|
||||
/// `Json` extractor configuration.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use actix_web::{error, post, web, App, FromRequest, HttpResponse};
|
||||
/// use serde::Deserialize;
|
||||
|
@ -13,7 +13,7 @@ use crate::{dev::Payload, error::PathError, FromRequest, HttpRequest};
|
||||
///
|
||||
/// Use [`PathConfig`] to configure extraction process.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use actix_web::{get, web};
|
||||
///
|
||||
|
@ -23,7 +23,7 @@ use crate::{dev, http::header, web, Error, FromRequest, HttpMessage, HttpRequest
|
||||
///
|
||||
/// See [`PayloadConfig`] for important notes when using this advanced extractor.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use std::future::Future;
|
||||
/// use futures_util::stream::{Stream, StreamExt};
|
||||
@ -81,7 +81,7 @@ impl FromRequest for Payload {
|
||||
///
|
||||
/// Use [`PayloadConfig`] to configure extraction process.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use actix_web::{post, web};
|
||||
///
|
||||
@ -118,7 +118,7 @@ impl FromRequest for Bytes {
|
||||
/// [**PayloadConfig**](PayloadConfig) allows to configure
|
||||
/// extraction process.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use actix_web::{post, web, FromRequest};
|
||||
///
|
||||
|
@ -18,7 +18,7 @@ use crate::{dev::Payload, error::QueryPayloadError, Error, FromRequest, HttpRequ
|
||||
/// A query string consists of unordered `key=value` pairs, therefore it cannot be decoded into any
|
||||
/// type which depends upon data ordering (eg. tuples). Trying to do so will result in a panic.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use actix_web::{get, web};
|
||||
/// use serde::Deserialize;
|
||||
@ -138,7 +138,7 @@ where
|
||||
|
||||
/// Query extractor configuration.
|
||||
///
|
||||
/// # Usage
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use actix_web::{error, get, web, App, FromRequest, HttpResponse};
|
||||
/// use serde::Deserialize;
|
||||
|
@ -1,4 +1,5 @@
|
||||
//! Essentials helper functions and types for application registration.
|
||||
|
||||
use actix_http::http::Method;
|
||||
use actix_router::IntoPattern;
|
||||
use std::future::Future;
|
||||
|
Reference in New Issue
Block a user