diff --git a/actix_cors/all.html b/actix_cors/all.html index 630ad02a4..9364ea19b 100644 --- a/actix_cors/all.html +++ b/actix_cors/all.html @@ -1,3 +1,3 @@ List of all items in this crate

List of all items

Structs

Enums

\ No newline at end of file + logo

List of all items

Structs

Enums

\ No newline at end of file diff --git a/actix_cors/enum.CorsError.html b/actix_cors/enum.CorsError.html index 9be36cbaf..49729f88f 100644 --- a/actix_cors/enum.CorsError.html +++ b/actix_cors/enum.CorsError.html @@ -53,4 +53,4 @@ pub enum CorsError { WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_cors/index.html b/actix_cors/index.html index c62f319a7..7b2f2d1c6 100644 --- a/actix_cors/index.html +++ b/actix_cors/index.html @@ -39,4 +39,4 @@ }

Structs

Builder for CORS middleware.

Enums

Errors that can occur when processing CORS guarded requests.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_cors/struct.Cors.html b/actix_cors/struct.Cors.html index e536a8205..fd93995ae 100644 --- a/actix_cors/struct.Cors.html +++ b/actix_cors/struct.Cors.html @@ -134,4 +134,4 @@ not supported. No max age (will use browser’s default).

WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_identity/all.html b/actix_identity/all.html index 27bd7ce48..3989d3840 100644 --- a/actix_identity/all.html +++ b/actix_identity/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

\ No newline at end of file diff --git a/actix_identity/config/enum.LogoutBehaviour.html b/actix_identity/config/enum.LogoutBehaviour.html index 573cc048c..2240639eb 100644 --- a/actix_identity/config/enum.LogoutBehaviour.html +++ b/actix_identity/config/enum.LogoutBehaviour.html @@ -37,4 +37,4 @@ is not tied to the user’s identity and should be retained after logout.

WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_identity/config/index.html b/actix_identity/config/index.html index 865473efe..ee333b956 100644 --- a/actix_identity/config/index.html +++ b/actix_identity/config/index.html @@ -3,4 +3,4 @@ parameters.

Enums

LogoutBehaviour controls what actions are going to be performed when Identity::logout is invoked.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_identity/config/struct.IdentityMiddlewareBuilder.html b/actix_identity/config/struct.IdentityMiddlewareBuilder.html index 168b072a0..114bc02d0 100644 --- a/actix_identity/config/struct.IdentityMiddlewareBuilder.html +++ b/actix_identity/config/struct.IdentityMiddlewareBuilder.html @@ -48,4 +48,4 @@ has passed since their last visit. WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_identity/index.html b/actix_identity/index.html index ac65cf515..4b2e0c592 100644 --- a/actix_identity/index.html +++ b/actix_identity/index.html @@ -76,4 +76,4 @@ by customising the configuration for

Structs

A verified user identity. It can be used as a request extractor.

Identity management middleware.

Traits

Helper trait to retrieve an Identity instance from various actix-web’s types.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_identity/struct.Identity.html b/actix_identity/struct.Identity.html index 097075a2f..5c53a0c0c 100644 --- a/actix_identity/struct.Identity.html +++ b/actix_identity/struct.Identity.html @@ -125,4 +125,4 @@ require a valid IdentityWithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_identity/struct.IdentityMiddleware.html b/actix_identity/struct.IdentityMiddleware.html index 04221c5e0..21d285180 100644 --- a/actix_identity/struct.IdentityMiddleware.html +++ b/actix_identity/struct.IdentityMiddleware.html @@ -52,4 +52,4 @@ WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_identity/trait.IdentityExt.html b/actix_identity/trait.IdentityExt.html index 9e206c78e..bc46537c2 100644 --- a/actix_identity/trait.IdentityExt.html +++ b/actix_identity/trait.IdentityExt.html @@ -2,4 +2,4 @@ fn get_identity(&self) -> Result<Identity, Error>; }
Expand description

Helper trait to retrieve an Identity instance from various actix-web’s types.

Required Methods

Retrieve the identity attached to the current session, if available.

-

Implementations on Foreign Types

Implementors

\ No newline at end of file +

Implementations on Foreign Types

Implementors

\ No newline at end of file diff --git a/actix_limitation/all.html b/actix_limitation/all.html index 2f07c3b57..3d3247b88 100644 --- a/actix_limitation/all.html +++ b/actix_limitation/all.html @@ -1,3 +1,3 @@ List of all items in this crate

List of all items

Structs

Enums

Constants

\ No newline at end of file + logo

List of all items

Structs

Enums

Constants

\ No newline at end of file diff --git a/actix_limitation/constant.DEFAULT_COOKIE_NAME.html b/actix_limitation/constant.DEFAULT_COOKIE_NAME.html index a02aad370..430ad9a56 100644 --- a/actix_limitation/constant.DEFAULT_COOKIE_NAME.html +++ b/actix_limitation/constant.DEFAULT_COOKIE_NAME.html @@ -1,4 +1,4 @@ DEFAULT_COOKIE_NAME in actix_limitation - Rust
logo
pub const DEFAULT_COOKIE_NAME: &'static str = "sid";
Expand description

Default cookie name.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_limitation/constant.DEFAULT_PERIOD_SECS.html b/actix_limitation/constant.DEFAULT_PERIOD_SECS.html index 69284ff10..318b2b1cd 100644 --- a/actix_limitation/constant.DEFAULT_PERIOD_SECS.html +++ b/actix_limitation/constant.DEFAULT_PERIOD_SECS.html @@ -1,4 +1,4 @@ DEFAULT_PERIOD_SECS in actix_limitation - Rust
logo
pub const DEFAULT_PERIOD_SECS: u64 = 3600;
Expand description

Default period (in seconds).

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_limitation/constant.DEFAULT_REQUEST_LIMIT.html b/actix_limitation/constant.DEFAULT_REQUEST_LIMIT.html index 89896b75b..d9447c670 100644 --- a/actix_limitation/constant.DEFAULT_REQUEST_LIMIT.html +++ b/actix_limitation/constant.DEFAULT_REQUEST_LIMIT.html @@ -1,4 +1,4 @@ DEFAULT_REQUEST_LIMIT in actix_limitation - Rust
logo
pub const DEFAULT_REQUEST_LIMIT: usize = 5000;
Expand description

Default request limit.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_limitation/constant.DEFAULT_SESSION_KEY.html b/actix_limitation/constant.DEFAULT_SESSION_KEY.html index a4451432f..3878283e2 100644 --- a/actix_limitation/constant.DEFAULT_SESSION_KEY.html +++ b/actix_limitation/constant.DEFAULT_SESSION_KEY.html @@ -1,4 +1,4 @@ DEFAULT_SESSION_KEY in actix_limitation - Rust
logo
pub const DEFAULT_SESSION_KEY: &'static str = "rate-api-id";
Expand description

Default session key.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_limitation/enum.Error.html b/actix_limitation/enum.Error.html index d6c6705d8..452d129e2 100644 --- a/actix_limitation/enum.Error.html +++ b/actix_limitation/enum.Error.html @@ -39,4 +39,4 @@ WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_limitation/index.html b/actix_limitation/index.html index a7364b74f..d52921af8 100644 --- a/actix_limitation/index.html +++ b/actix_limitation/index.html @@ -44,4 +44,4 @@ actix-limitation = "0.3"
DEFAULT_PERIOD_SECS

Default period (in seconds).

DEFAULT_REQUEST_LIMIT

Default request limit.

DEFAULT_SESSION_KEY

Default session key.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_limitation/struct.Builder.html b/actix_limitation/struct.Builder.html index dd9370357..869be4431 100644 --- a/actix_limitation/struct.Builder.html +++ b/actix_limitation/struct.Builder.html @@ -29,4 +29,4 @@ WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_limitation/struct.Limiter.html b/actix_limitation/struct.Limiter.html index 778a0db8e..53b545f1d 100644 --- a/actix_limitation/struct.Limiter.html +++ b/actix_limitation/struct.Limiter.html @@ -31,4 +31,4 @@ parameters for how to set the Redis URL.

WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_limitation/struct.RateLimiter.html b/actix_limitation/struct.RateLimiter.html index 7e56cfe91..d672477f9 100644 --- a/actix_limitation/struct.RateLimiter.html +++ b/actix_limitation/struct.RateLimiter.html @@ -29,4 +29,4 @@ WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_limitation/struct.Status.html b/actix_limitation/struct.Status.html index 93adfed29..07a273225 100644 --- a/actix_limitation/struct.Status.html +++ b/actix_limitation/struct.Status.html @@ -30,4 +30,4 @@ WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_protobuf/all.html b/actix_protobuf/all.html index 65113339d..42477f787 100644 --- a/actix_protobuf/all.html +++ b/actix_protobuf/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

\ No newline at end of file diff --git a/actix_protobuf/enum.ProtoBufPayloadError.html b/actix_protobuf/enum.ProtoBufPayloadError.html index 0d8a915be..711f8a75a 100644 --- a/actix_protobuf/enum.ProtoBufPayloadError.html +++ b/actix_protobuf/enum.ProtoBufPayloadError.html @@ -36,4 +36,4 @@ WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_protobuf/index.html b/actix_protobuf/index.html index 54858c6b3..2ea42a9c1 100644 --- a/actix_protobuf/index.html +++ b/actix_protobuf/index.html @@ -1,2 +1,2 @@ actix_protobuf - Rust
Expand description

Protobuf payload extractor for Actix Web.

-

Structs

Enums

Traits

\ No newline at end of file +

Structs

Enums

Traits

\ No newline at end of file diff --git a/actix_protobuf/struct.ProtoBuf.html b/actix_protobuf/struct.ProtoBuf.html index 8b9b5ac74..a2342c80e 100644 --- a/actix_protobuf/struct.ProtoBuf.html +++ b/actix_protobuf/struct.ProtoBuf.html @@ -31,4 +31,4 @@ WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_protobuf/struct.ProtoBufConfig.html b/actix_protobuf/struct.ProtoBufConfig.html index 1863b60bc..778da8df0 100644 --- a/actix_protobuf/struct.ProtoBufConfig.html +++ b/actix_protobuf/struct.ProtoBufConfig.html @@ -20,4 +20,4 @@ WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_protobuf/struct.ProtoBufMessage.html b/actix_protobuf/struct.ProtoBufMessage.html index ddd300493..788812774 100644 --- a/actix_protobuf/struct.ProtoBufMessage.html +++ b/actix_protobuf/struct.ProtoBufMessage.html @@ -88,4 +88,4 @@ future types. Read more

WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_protobuf/trait.ProtoBufResponseBuilder.html b/actix_protobuf/trait.ProtoBufResponseBuilder.html index 61fce7230..bc35e4de7 100644 --- a/actix_protobuf/trait.ProtoBufResponseBuilder.html +++ b/actix_protobuf/trait.ProtoBufResponseBuilder.html @@ -1,3 +1,3 @@ ProtoBufResponseBuilder in actix_protobuf - Rust
pub trait ProtoBufResponseBuilder {
     fn protobuf<T: Message>(&mut self, value: T) -> Result<HttpResponse, Error>;
-}

Required Methods

Implementations on Foreign Types

Implementors

\ No newline at end of file +}

Required Methods

Implementations on Foreign Types

Implementors

\ No newline at end of file diff --git a/actix_redis/all.html b/actix_redis/all.html index 2aca909fb..b46e83ed7 100644 --- a/actix_redis/all.html +++ b/actix_redis/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Macros

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Macros

\ No newline at end of file diff --git a/actix_redis/enum.Error.html b/actix_redis/enum.Error.html index 82b9eba96..2a6d74269 100644 --- a/actix_redis/enum.Error.html +++ b/actix_redis/enum.Error.html @@ -35,4 +35,4 @@ WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_redis/enum.RespError.html b/actix_redis/enum.RespError.html index 0c410d183..6c582ff38 100644 --- a/actix_redis/enum.RespError.html +++ b/actix_redis/enum.RespError.html @@ -46,4 +46,4 @@ a proper option.

WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_redis/enum.RespValue.html b/actix_redis/enum.RespValue.html index 708185aa7..e90059d5c 100644 --- a/actix_redis/enum.RespValue.html +++ b/actix_redis/enum.RespValue.html @@ -22,13 +22,13 @@ arguments, e.g. RPUSH

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

-

Converts to this type from the input type.

-

Converts to this type from the input type.

-

Converts to this type from the input type.

-

Converts to this type from the input type.

-

Converts to this type from the input type.

-

Converts to this type from the input type.

-

Converts to this type from the input type.

+

Converts to this type from the input type.

+

Converts to this type from the input type.

+

Converts to this type from the input type.

+

Converts to this type from the input type.

+

Converts to this type from the input type.

+

Converts to this type from the input type.

+

Converts to this type from the input type.

Return a Result containing either Self or Error. Errors can occur due to either: a) the particular RespValue being incompatible with the required type, or b) a remote Redis error occuring. Read more

This method tests for self and other values to be equal, and is used @@ -58,4 +58,4 @@ by ==. WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_redis/index.html b/actix_redis/index.html index 8cf1c5c6f..cf7d507d7 100644 --- a/actix_redis/index.html +++ b/actix_redis/index.html @@ -5,4 +5,4 @@ of types, that satisfy Into<RespValue>.

RedisActor

Redis communication actor.

Enums

General purpose actix-redis error.

A single RESP value, this owns the data that is read/to-be written to Redis.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_redis/macro.resp_array.html b/actix_redis/macro.resp_array.html index 20ad2d31e..acf81d0a0 100644 --- a/actix_redis/macro.resp_array.html +++ b/actix_redis/macro.resp_array.html @@ -22,4 +22,4 @@ data moved into the corresponding RespValue. If a reference is pro let data = vec!["data", "from", "somewhere", "else"]; let command = resp_array!["RPUSH", "mykey"].append(data); } -
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_redis/struct.Command.html b/actix_redis/struct.Command.html index a63b425f0..f6622ead7 100644 --- a/actix_redis/struct.Command.html +++ b/actix_redis/struct.Command.html @@ -24,4 +24,4 @@ successful. Read more

WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_redis/struct.RedisActor.html b/actix_redis/struct.RedisActor.html index 175a0c513..18ba40b1c 100644 --- a/actix_redis/struct.RedisActor.html +++ b/actix_redis/struct.RedisActor.html @@ -38,4 +38,4 @@ address. Read more

WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_session/all.html b/actix_session/all.html index 81bf2ab95..54a4e23f7 100644 --- a/actix_session/all.html +++ b/actix_session/all.html @@ -1,3 +1,3 @@ List of all items in this crate

List of all items

Structs

Enums

Traits

\ No newline at end of file + logo

List of all items

Structs

Enums

Traits

\ No newline at end of file diff --git a/actix_session/config/enum.CookieContentSecurity.html b/actix_session/config/enum.CookieContentSecurity.html index b7ae13203..ef591c103 100644 --- a/actix_session/config/enum.CookieContentSecurity.html +++ b/actix_session/config/enum.CookieContentSecurity.html @@ -1,6 +1,6 @@ CookieContentSecurity in actix_session::config - Rust
pub enum CookieContentSecurity {
+                        logo
pub enum CookieContentSecurity {
     Private,
     Signed,
 }
Expand description

Determines how to secure the content of the session cookie.

@@ -11,10 +11,10 @@ cookie content nor decode it, as long as the encryption key remains confidential

Signed

The cookie content is signed when using CookieContentSecurity::Signed.

Signing guarantees integrity, but it doesn’t ensure confidentiality: the client cannot tamper with the cookie content, but they can read it.

-

Trait Implementations

Returns a copy of the value. Read more

+

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Formats the value using the given formatter. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

@@ -37,4 +37,4 @@ tamper with the cookie content, but they can read it.

WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_session/config/enum.SessionLifecycle.html b/actix_session/config/enum.SessionLifecycle.html index 4c75ccca0..958b3e780 100644 --- a/actix_session/config/enum.SessionLifecycle.html +++ b/actix_session/config/enum.SessionLifecycle.html @@ -1,6 +1,6 @@ SessionLifecycle in actix_session::config - Rust
#[non_exhaustive]
+                        logo
#[non_exhaustive]
 pub enum SessionLifecycle {
     BrowserSession(BrowserSession),
     PersistentSession(PersistentSession),
@@ -14,11 +14,11 @@ Check the documentation of the browsers you are targeting for up-to-date informa
 

PersistentSession(PersistentSession)

The session cookie will be a persistent cookie.

Persistent cookies have a pre-determined lifetime, specified via the Max-Age or Expires attribute. They do not disappear when the current browser session ends.

-

Trait Implementations

Returns a copy of the value. Read more

+

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Converts to this type from the input type.

-

Converts to this type from the input type.

+

Formats the value using the given formatter. Read more

+

Converts to this type from the input type.

+

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

@@ -42,4 +42,4 @@ attribute. They do not disappear when the current browser session ends.

WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_session/config/enum.TtlExtensionPolicy.html b/actix_session/config/enum.TtlExtensionPolicy.html index 8690aae92..388b9d079 100644 --- a/actix_session/config/enum.TtlExtensionPolicy.html +++ b/actix_session/config/enum.TtlExtensionPolicy.html @@ -1,26 +1,26 @@ TtlExtensionPolicy in actix_session::config - Rust
#[non_exhaustive]
+                        logo
#[non_exhaustive]
 pub enum TtlExtensionPolicy {
     OnEveryRequest,
     OnStateChanges,
 }
Expand description

Configuration for which events should trigger an extension of the time-to-live for your session.

-

If you are using a BrowserSession, TtlExtensionPolicy controls how often the TTL of -the session state should be refreshed. The browser is in control of the lifecycle of the -session cookie.

-

If you are using a PersistentSession, TtlExtensionPolicy controls both the expiration -of the session cookie and the TTL of the session state.

+

If you are using a BrowserSession, TtlExtensionPolicy controls how often the TTL of the +session state should be refreshed. The browser is in control of the lifecycle of the session +cookie.

+

If you are using a PersistentSession, TtlExtensionPolicy controls both the expiration of +the session cookie and the TTL of the session state on the storage backend.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

OnEveryRequest

The TTL is refreshed every time the server receives a request associated with a session.

Performance impact

-

Refreshing the TTL on every request is not free. -It implies a refresh of the TTL on the session state. This translates into a request over -the network if you are using a remote system as storage backend (e.g. Redis). -This impacts both the total load on your storage backend (i.e. number of -queries it has to handle) and the latency of the requests served by your server.

+

Refreshing the TTL on every request is not free. It implies a refresh of the TTL on the +session state. This translates into a request over the network if you are using a remote +system as storage backend (e.g. Redis). This impacts both the total load on your storage +backend (i.e. number of queries it has to handle) and the latency of the requests served by +your server.

OnStateChanges

The TTL is refreshed every time the session state changes or the session key is renewed.

-

Trait Implementations

Returns a copy of the value. Read more

+

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

+

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

@@ -44,4 +44,4 @@ queries it has to handle) and the latency of the requests served by your server. WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_session/config/index.html b/actix_session/config/index.html index 9ea84f632..a7e8e14e5 100644 --- a/actix_session/config/index.html +++ b/actix_session/config/index.html @@ -1,12 +1,11 @@ actix_session::config - Rust
Expand description

Configuration options to tune the behaviour of SessionMiddleware.

+ logo
Expand description

Configuration options to tune the behaviour of SessionMiddleware.

Structs

A session lifecycle strategy where the session cookie expires when the browser’s current session ends.

A session lifecycle strategy where the session cookie will be persistent.

-

A fluent builder to construct a SessionMiddleware instance with custom configuration -parameters.

+

A fluent, customized SessionMiddleware builder.

Enums

Determines how to secure the content of the session cookie.

Determines what type of session cookie should be used and how its lifecycle should be managed.

Configuration for which events should trigger an extension of the time-to-live for your session.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_session/config/sidebar-items.js b/actix_session/config/sidebar-items.js index 98140cfc7..54359a4d9 100644 --- a/actix_session/config/sidebar-items.js +++ b/actix_session/config/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":[["CookieContentSecurity","Determines how to secure the content of the session cookie."],["SessionLifecycle","Determines what type of session cookie should be used and how its lifecycle should be managed."],["TtlExtensionPolicy","Configuration for which events should trigger an extension of the time-to-live for your session."]],"struct":[["BrowserSession","A session lifecycle strategy where the session cookie expires when the browser’s current session ends."],["PersistentSession","A session lifecycle strategy where the session cookie will be persistent."],["SessionMiddlewareBuilder","A fluent builder to construct a [`SessionMiddleware`] instance with custom configuration parameters."]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":[["CookieContentSecurity","Determines how to secure the content of the session cookie."],["SessionLifecycle","Determines what type of session cookie should be used and how its lifecycle should be managed."],["TtlExtensionPolicy","Configuration for which events should trigger an extension of the time-to-live for your session."]],"struct":[["BrowserSession","A session lifecycle strategy where the session cookie expires when the browser’s current session ends."],["PersistentSession","A session lifecycle strategy where the session cookie will be persistent."],["SessionMiddlewareBuilder","A fluent, customized [`SessionMiddleware`] builder."]]}; \ No newline at end of file diff --git a/actix_session/config/struct.BrowserSession.html b/actix_session/config/struct.BrowserSession.html index 2f9846f82..545bba942 100644 --- a/actix_session/config/struct.BrowserSession.html +++ b/actix_session/config/struct.BrowserSession.html @@ -1,12 +1,14 @@ BrowserSession in actix_session::config - Rust
pub struct BrowserSession { /* private fields */ }
Expand description

A session lifecycle strategy where the session cookie expires when the + logo

pub struct BrowserSession { /* private fields */ }
Expand description

A session lifecycle strategy where the session cookie expires when the browser’s current session ends.

When does a browser session end? It depends on the browser. Chrome, for example, will often continue running in the background when the browser is closed—session cookies are not deleted and they will still be available when the browser is opened again. Check the documentation of the browsers you are targeting for up-to-date information.

-

Implementations

Sets a time-to-live (TTL) when storing the session state in the storage backend.

+

Due to its Into<SessionLifecycle> implementation, a BrowserSession can be passed directly +to SessionMiddlewareBuilder::session_lifecycle().

+

Implementations

Sets a time-to-live (TTL) when storing the session state in the storage backend.

We do not want to store session states indefinitely, otherwise we will inevitably run out of storage by holding on to the state of countless abandoned or expired sessions!

We are dealing with the lifecycle of two uncorrelated object here: the session cookie @@ -22,14 +24,14 @@ tied to the browser session length. You can mitigate the risk of the session cookie outliving the session state by specifying a more aggressive state TTL extension policy - check out BrowserSession::state_ttl_extension_policy for more details.

-

Determine under what circumstances the TTL of your session state should be extended.

+

Determine under what circumstances the TTL of your session state should be extended.

Defaults to TtlExtensionPolicy::OnStateChanges if left unspecified.

See TtlExtensionPolicy for more details.

-

Trait Implementations

Returns a copy of the value. Read more

+

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

-

Converts to this type from the input type.

+

Formats the value using the given formatter. Read more

+

Returns the “default value” for a type. Read more

+

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

@@ -53,4 +55,4 @@ specifying a more aggressive state TTL extension policy - check out WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_session/config/struct.PersistentSession.html b/actix_session/config/struct.PersistentSession.html index 137d392a6..5a5371129 100644 --- a/actix_session/config/struct.PersistentSession.html +++ b/actix_session/config/struct.PersistentSession.html @@ -1,21 +1,37 @@ PersistentSession in actix_session::config - Rust
pub struct PersistentSession { /* private fields */ }
Expand description

A session lifecycle strategy where the session cookie will be persistent.

+ logo
pub struct PersistentSession { /* private fields */ }
Expand description

A session lifecycle strategy where the session cookie will be persistent.

Persistent cookies have a pre-determined expiration, specified via the Max-Age or Expires attribute. They do not disappear when the current browser session ends.

-

Implementations

Specifies how long the session cookie should live.

-

Defaults to 1 day if left unspecified.

+

Due to its Into<SessionLifecycle> implementation, a PersistentSession can be passed directly +to SessionMiddlewareBuilder::session_lifecycle().

+

Examples

+
use actix_web::cookie::time::Duration;
+use actix_session::SessionMiddleware;
+use actix_session::config::{PersistentSession, TtlExtensionPolicy};
+
+const SECS_IN_WEEK: i64 = 60 * 60 * 24 * 7;
+
+// a session lifecycle with a time-to-live (expiry) of 1 week and default extension policy
+PersistentSession::default().session_ttl(Duration::seconds(SECS_IN_WEEK));
+
+// a session lifecycle with the default time-to-live (expiry) and a custom extension policy
+PersistentSession::default()
+    // this policy causes the session state's TTL to be refreshed on every request
+    .session_ttl_extension_policy(TtlExtensionPolicy::OnEveryRequest);
+

Implementations

Specifies how long the session cookie should live.

The session TTL is also used as the TTL for the session state in the storage backend.

+

Defaults to 1 day.

A persistent session can live more than the specified TTL if the TTL is extended. See session_ttl_extension_policy for more details.

-

Determines under what circumstances the TTL of your session should be extended. +

Determines under what circumstances the TTL of your session should be extended. See TtlExtensionPolicy for more details.

-

Defaults to TtlExtensionPolicy::OnStateChanges if left unspecified.

-

Trait Implementations

Returns a copy of the value. Read more

+

Defaults to TtlExtensionPolicy::OnStateChanges.

+

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

-

Converts to this type from the input type.

+

Formats the value using the given formatter. Read more

+

Returns the “default value” for a type. Read more

+

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

@@ -39,4 +55,4 @@ See TtlE WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

-
\ No newline at end of file +
\ No newline at end of file diff --git a/actix_session/config/struct.SessionMiddlewareBuilder.html b/actix_session/config/struct.SessionMiddlewareBuilder.html index 86b7f5f36..df781807c 100644 --- a/actix_session/config/struct.SessionMiddlewareBuilder.html +++ b/actix_session/config/struct.SessionMiddlewareBuilder.html @@ -1,25 +1,37 @@ -SessionMiddlewareBuilder in actix_session::config - Rust