Skip to content

Commit

Permalink
prepare actix-web-lab release 0.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Apr 7, 2022
1 parent bd40f8d commit c3d810a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 29 deletions.
6 changes: 6 additions & 0 deletions actix-web-lab/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog

## Unreleased - 2022-xx-xx


## 0.15.1 - 2022-04-07
- Add `RequestSignatureScheme` trait and `RequestSignature` extractor.
- Add `SwapData` extractor.
- Add `LocalData` extractor.
- Deprecate `BodyHash`; it has migrated to the [`actix-hash`](https://crates.io/crates/actix-hash) crate.


Expand Down
2 changes: 1 addition & 1 deletion actix-web-lab/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "actix-web-lab"
version = "0.15.0"
version = "0.15.1"
authors = ["Rob Ede <robjtede@icloud.com>"]
description = "In-progress extractors and middleware for Actix Web"
keywords = ["actix", "http", "web", "framework", "async"]
Expand Down
52 changes: 26 additions & 26 deletions actix-web-lab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
> Experimental extractors, middleware, and other extras for possible inclusion in Actix Web.
[![crates.io](https://img.shields.io/crates/v/actix-web-lab?label=latest)](https://crates.io/crates/actix-web-lab)
[![Documentation](https://docs.rs/actix-web-lab/badge.svg)](https://docs.rs/actix-web-lab/0.15.0)
[![Documentation](https://docs.rs/actix-web-lab/badge.svg)](https://docs.rs/actix-web-lab/0.15.1)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-web-lab.svg)
<br />
[![dependency status](https://deps.rs/crate/actix-web-lab/0.15.0/status.svg)](https://deps.rs/crate/actix-web-lab/0.15.0)
[![dependency status](https://deps.rs/crate/actix-web-lab/0.15.1/status.svg)](https://deps.rs/crate/actix-web-lab/0.15.1)
[![Download](https://img.shields.io/crates/d/actix-web-lab.svg)](https://crates.io/crates/actix-web-lab)
[![CircleCI](https://circleci.com/gh/robjtede/actix-web-lab/tree/main.svg?style=shield)](https://circleci.com/gh/robjtede/actix-web-lab/tree/main)

Expand All @@ -16,51 +16,51 @@

### Responders

- `Csv`: efficient CSV streaming [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/respond/struct.Csv.html)
- `NdJson`: efficient NDJSON streaming [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/respond/struct.NdJson.html)
- `DisplayStream`: efficient line-by-line `Display` streaming [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/respond/struct.DisplayStream.html)
- `Html`: basic string wrapper that responds with HTML Content-Type [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/respond/struct.Html.html)
- `Csv`: efficient CSV streaming [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/respond/struct.Csv.html)
- `NdJson`: efficient NDJSON streaming [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/respond/struct.NdJson.html)
- `DisplayStream`: efficient line-by-line `Display` streaming [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/respond/struct.DisplayStream.html)
- `Html`: basic string wrapper that responds with HTML Content-Type [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/respond/struct.Html.html)

### Middleware

- `from_fn`: use an async function as a middleware [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/middleware/fn.from_fn.html)
- `RedirectHttps`: middleware to redirect traffic to HTTPS if connection is insecure with optional HSTS [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/middleware/struct.RedirectHttps.html)
- `redirect_to_www`: function middleware to redirect traffic to `www.` if not already there [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/middleware/fn.redirect_to_www.html)
- `ErrorHandlers`: alternative error handler middleware with simpler interface [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/middleware/struct.ErrorHandlers.html)
- `from_fn`: use an async function as a middleware [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/middleware/fn.from_fn.html)
- `RedirectHttps`: middleware to redirect traffic to HTTPS if connection is insecure with optional HSTS [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/middleware/struct.RedirectHttps.html)
- `redirect_to_www`: function middleware to redirect traffic to `www.` if not already there [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/middleware/fn.redirect_to_www.html)
- `ErrorHandlers`: alternative error handler middleware with simpler interface [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/middleware/struct.ErrorHandlers.html)

### Extractors

- `LazyData`: app data/state initialized on first use [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/extract/struct.LazyData.html)
- `SwapData`: app data/state that can be replaced at runtime (alternative to `Data<RwLock<T>>`) [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/extract/struct.SwapData.html)
- `LocalData`: app data/state that can be replaced at runtime (alternative to `Data<RwLock<T>>`) [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/extract/struct.DataSwap.html)
- `Json`: simplified JSON extractor with const-generic limits [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/extract/struct.Json.html)
- `Path`: simplified path parameter extractor that supports destructuring [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/extract/struct.Path.html)
- `Query`: simplified query-string extractor [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/extract/struct.Query.html)
- `BodyHash`: wraps an extractor and calculates a body checksum hash alongside [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/extract/struct.BodyHash.html)
- `BodyHmac`: wraps an extractor and calculates a body HMAC alongside [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/extract/struct.BodyHmac.html)
- `LazyData`: app data/state initialized on first use [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/extract/struct.LazyData.html)
- `SwapData`: app data/state that can be replaced at runtime (alternative to `Data<RwLock<T>>`) [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/extract/struct.SwapData.html)
- `LocalData`: app data/state that can be replaced at runtime (alternative to `Data<RwLock<T>>`) [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/extract/struct.DataSwap.html)
- `Json`: simplified JSON extractor with const-generic limits [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/extract/struct.Json.html)
- `Path`: simplified path parameter extractor that supports destructuring [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/extract/struct.Path.html)
- `Query`: simplified query-string extractor [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/extract/struct.Query.html)
- `BodyHash`: wraps an extractor and calculates a body checksum hash alongside [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/extract/struct.BodyHash.html)
- `BodyHmac`: wraps an extractor and calculates a body HMAC alongside [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/extract/struct.BodyHmac.html)

### Headers

- `Hsts`: Strict-Transport-Security (HSTS) [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/header/struct.Hsts.html)
- `CacheControl`: Cache-Control header with support for modern directives [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/header/struct.CacheControl.html)
- `Hsts`: Strict-Transport-Security (HSTS) [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/header/struct.Hsts.html)
- `CacheControl`: Cache-Control header with support for modern directives [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/header/struct.CacheControl.html)

### Body Types

- `channel`: a simple channel-like body type with a sender side that can be used from another thread [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/body/fn.channel.html)
- `channel`: a simple channel-like body type with a sender side that can be used from another thread [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/body/fn.channel.html)

### Services

- `Redirect`: simple redirects [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/web/struct.Redirect.html)
- `spa`: Easy Single-page Application (SPA) service [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/web/fn.spa.html)
- `Redirect`: simple redirects [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/web/struct.Redirect.html)
- `spa`: Easy Single-page Application (SPA) service [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/web/fn.spa.html)

### Route Guards

- `Acceptable`: verifies that an `Accept` header is present and it contains a compatible MIME type [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/guard/struct.Acceptable.html)
- `Acceptable`: verifies that an `Accept` header is present and it contains a compatible MIME type [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/guard/struct.Acceptable.html)

### Test Utilities

- `test_request`: Construct `TestRequest` using an HTTP-like DSL [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/test/macro.assert_response_matches.html)
- `assert_response_matches`: quickly write tests that check various parts of a `ServiceResponse` [(docs)](https://docs.rs/actix-web-lab/0.15.0/actix_web_lab/test/macro.assert_response_matches.html)
- `test_request`: Construct `TestRequest` using an HTTP-like DSL [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/test/macro.assert_response_matches.html)
- `assert_response_matches`: quickly write tests that check various parts of a `ServiceResponse` [(docs)](https://docs.rs/actix-web-lab/0.15.1/actix_web_lab/test/macro.assert_response_matches.html)

## Things To Know About This Crate

Expand Down
4 changes: 2 additions & 2 deletions actix-web-lab/src/swap_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ impl<T: 'static> FromRequest for SwapData<T> {
}))
} else {
debug!(
"Failed to extract `LazyData<{}>` for `{}` handler. For the Data extractor to work \
correctly, wrap the data with `LazyData::new()` and pass it to `App::app_data()`. \
"Failed to extract `SwapData<{}>` for `{}` handler. For the Data extractor to work \
correctly, wrap the data with `SwapData::new()` and pass it to `App::app_data()`. \
Ensure that types align in both the set and retrieve calls.",
core::any::type_name::<T>(),
req.match_name().unwrap_or_else(|| req.path())
Expand Down

0 comments on commit c3d810a

Please sign in to comment.