mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-23 15:51:06 +01:00
docs(session): doc adding features using cargo add
This commit is contained in:
parent
f2339971cd
commit
d10b71fe06
@ -94,34 +94,26 @@ By default, `actix-session` does not provide any storage backend to retrieve and
|
|||||||
|
|
||||||
- a purely cookie-based "backend", [`CookieSessionStore`], using the `cookie-session` feature flag.
|
- a purely cookie-based "backend", [`CookieSessionStore`], using the `cookie-session` feature flag.
|
||||||
|
|
||||||
```toml
|
```console
|
||||||
[dependencies]
|
cargo add actix-session --features=cookie-session
|
||||||
# ...
|
|
||||||
actix-session = { version = "...", features = ["cookie-session"] }
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- a Redis-based backend via the [`redis`] crate, [`RedisSessionStore`], using the `redis-session` feature flag.
|
- a Redis-based backend via the [`redis`] crate, [`RedisSessionStore`], using the `redis-session` feature flag.
|
||||||
|
|
||||||
```toml
|
```console
|
||||||
[dependencies]
|
cargo add actix-session --features=redis-session
|
||||||
# ...
|
|
||||||
actix-session = { version = "...", features = ["redis-session"] }
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Add the `redis-session-native-tls` feature flag if you want to connect to Redis using a secure connection (via the `native-tls` crate):
|
Add the `redis-session-native-tls` feature flag if you want to connect to Redis using a secure connection (via the `native-tls` crate):
|
||||||
|
|
||||||
```toml
|
```console
|
||||||
[dependencies]
|
cargo add actix-session --features=redis-session-native-tls
|
||||||
# ...
|
|
||||||
actix-session = { version = "...", features = ["redis-session-native-tls"] }
|
|
||||||
```
|
```
|
||||||
|
|
||||||
If you, instead, prefer depending on `rustls`, use the `redis-session-rustls` feature flag:
|
If you, instead, prefer depending on `rustls`, use the `redis-session-rustls` feature flag:
|
||||||
|
|
||||||
```toml
|
```console
|
||||||
[dependencies]
|
cargo add actix-session --features=redis-session-rustls
|
||||||
# ...
|
|
||||||
actix-session = { version = "...", features = ["redis-session-rustls"] }
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can implement your own session storage backend using the [`SessionStore`] trait.
|
You can implement your own session storage backend using the [`SessionStore`] trait.
|
||||||
|
10
justfile
10
justfile
@ -19,11 +19,17 @@ msrv_rustup := "+" + msrv
|
|||||||
clippy:
|
clippy:
|
||||||
cargo {{ toolchain }} clippy --workspace --all-targets --all-features
|
cargo {{ toolchain }} clippy --workspace --all-targets --all-features
|
||||||
|
|
||||||
# Format workspace.
|
# Format project.
|
||||||
[group("lint")]
|
[group("lint")]
|
||||||
fmt: update-readmes
|
fmt: update-readmes
|
||||||
cargo +nightly fmt
|
cargo +nightly fmt
|
||||||
fd --hidden --extension=yml --extension=md --exec-batch npx -y prettier --write
|
fd --type=file --hidden --extension=yml --extension=md --exec-batch npx -y prettier --write
|
||||||
|
|
||||||
|
# Check project.
|
||||||
|
[group("lint")]
|
||||||
|
check:
|
||||||
|
cargo +nightly fmt -- --check
|
||||||
|
fd --type=file --hidden --extension=yml --extension=md --exec-batch npx -y prettier --check
|
||||||
|
|
||||||
# Update READMEs from crate root documentation.
|
# Update READMEs from crate root documentation.
|
||||||
[group("lint")]
|
[group("lint")]
|
||||||
|
Loading…
Reference in New Issue
Block a user