Skip to content

Commit 5734dfa

Browse files
committed
add new files
1 parent 775bc91 commit 5734dfa

11 files changed

+130
-11
lines changed

book/src/SUMMARY.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@
55

66
- [TODO](./todo.md)
77
- [readme](./example-readme.md)
8-
- [Form](./form.md)
8+
- [form](./form.md)
99
- [anyhow-error-response](./anyhow-error-response.md)
1010
- [auto-reload](./auto-reload.md)
1111
- [versioning](./versioning.md)
1212
- [validator](./validator.md)
1313
- [todos](./todos.md)
1414
- [templates](./templates.md)
15-
15+
- [chat](./chat.md)
16+
- [compression](./compression.md)
17+
- [testing](./testing.md)
18+
- [cors](./cors.md)
19+
- [consume-body-in-extractor-or-middleware](./consume-body-in-extractor-or-middleware.md)
20+
- [customize-extractor-error](./customize-extractor-error.md)
21+
- [customize-path-rejection](./customize-path-rejection.md)
22+
- [dependency-injection](./dependency-injection.md)
23+
- [error-handling](./error-handling.md)
1624

book/src/chat.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# chat
2+
3+
```rust
4+
{{#include ../../examples/chat/src/main.rs }}
5+
```
6+
7+
```html
8+
{{#include ../../examples/chat/chat.html }}
9+
```
10+

book/src/compression.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# compression
2+
3+
```markdown
4+
{{#include ../../examples/compression/README.md}}
5+
```
6+
7+
```rust
8+
{{#include ../../examples/compression/src/main.rs }}
9+
```
10+
11+
```rust
12+
{{#include ../../examples/compression/src/tests.rs }}
13+
```
14+
15+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# consume-body-in-extractor-or-middleware
2+
3+
```rust
4+
{{#include ../../examples/consume-body-in-extractor-or-middleware/src/main.rs }}
5+
```
6+
7+

book/src/cors.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# cors
2+
3+
```rust
4+
{{#include ../../examples/cors/src/main.rs }}
5+
```
6+
7+

book/src/customize-extractor-error.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# customize-extractor-error
2+
3+
```rust
4+
{{#include ../../examples/customize-extractor-error/README.md }}
5+
```
6+
7+
```rust
8+
{{#include ../../examples/customize-extractor-error/src/main.rs }}
9+
```
10+
```rust
11+
{{#include ../../examples/customize-extractor-error/src/custom_extractor.rs }}
12+
```
13+
```rust
14+
{{#include ../../examples/customize-extractor-error/src/derive_from_request.rs }}
15+
```
16+
```rust
17+
{{#include ../../examples/customize-extractor-error/src/with_rejection.rs }}
18+
```
19+
20+

book/src/customize-path-rejection.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# customize-path-rejection
2+
3+
4+
```rust
5+
{{#include ../../examples/customize-path-rejection/src/main.rs }}
6+
```
7+
8+

book/src/dependency-injection.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# dependency-injection
2+
3+
```rust
4+
{{#include ../../examples/dependency-injection/src/main.rs }}
5+
```
6+
7+

book/src/error-handling.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# error-handling
2+
3+
```rust
4+
{{#include ../..//examples/error-handling/src/main.rs }}
5+
```
6+
7+

book/src/testing.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# testing
2+
3+
4+
```rust
5+
{{#include ../../examples/testing/src/main.rs }}
6+
```
7+
8+

book/src/todo.md

+31-9
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,45 @@ An outline for the book
1212

1313
* async-graphql See <https://github.com/async-graphql/examples>.
1414

15+
```rust
16+
{{#include }}
17+
```
1518

16-
- chat
17-
- compression
18-
- consume-body-in-extractor-or-middleware
19-
- cors
20-
- customize-extractor-error
21-
- customize-path-rejection
22-
- dependency-injection
2319
- diesel-async-postgres
20+
```rust
21+
{{#include }}
22+
```
23+
2424
- diesel-postgres
25-
- error-handling
25+
```rust
26+
{{#include }}
27+
```
28+
2629
- global-404-handler
30+
```rust
31+
{{#include }}
32+
```
33+
2734
- graceful-shutdown
35+
```rust
36+
{{#include ../../examples/graceful-shutdown/src/main.rs }}
37+
```
38+
2839
- handle-head-request
40+
```rust
41+
{{#include ../../examples/jwt/src/main.rs }}
42+
```
43+
2944
- http-proxy
45+
```rust
46+
{{#include }}
47+
```
48+
3049
- jwt
50+
```rust
51+
{{#include }}
52+
```
53+
3154
- key-value-store
3255
- low-level-native-tls
3356
- low-level-openssl
@@ -50,7 +73,6 @@ An outline for the book
5073
- static-file-server
5174
- stream-to-file
5275
- templates-minijinja
53-
- testing
5476
- testing-websockets
5577
- tls-graceful-shutdown
5678
- tls-rustls

0 commit comments

Comments
 (0)