From a62a50adfa4edce549b2d1d342939b24e7904987 Mon Sep 17 00:00:00 2001 From: robjtede Date: Sat, 7 Jan 2023 02:24:32 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20441d6?= =?UTF-8?q?04c000145e9ecb6e442cce001d21d79f244=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../error/enum.GetIdentityError.html | 8 +- actix_identity/error/index.html | 2 +- actix_identity/error/struct.LoginError.html | 2 +- .../error/struct.LostIdentityError.html | 4 +- .../error/struct.MissingIdentityError.html | 4 +- .../error/struct.SessionExpiryError.html | 4 +- actix_identity/struct.Identity.html | 12 +- help.html | 3 +- implementors/core/convert/trait.From.js | 2 +- search-index.js | 2 +- settings.html | 3 +- src/actix_identity/error.rs.html | 218 ++---------------- src/actix_identity/identity.rs.html | 14 +- 13 files changed, 56 insertions(+), 222 deletions(-) diff --git a/actix_identity/error/enum.GetIdentityError.html b/actix_identity/error/enum.GetIdentityError.html index f797d4311..d697961d7 100644 --- a/actix_identity/error/enum.GetIdentityError.html +++ b/actix_identity/error/enum.GetIdentityError.html @@ -1,16 +1,16 @@ -GetIdentityError in actix_identity::error - Rust
#[non_exhaustive]
+GetIdentityError in actix_identity::error - Rust
#[non_exhaustive]
 pub enum GetIdentityError {
     SessionExpiryError(SessionExpiryError),
     MissingIdentityError(MissingIdentityError),
-    SessionGetError(SessionGetError),
+    SessionGetError(SessionGetError),
     LostIdentityError(LostIdentityError),
 }
Expand description

Errors that can occur while retrieving an identity.

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.
§

SessionExpiryError(SessionExpiryError)

The session has expired.

§

MissingIdentityError(MissingIdentityError)

No identity is found in a session.

-
§

SessionGetError(SessionGetError)

Failed to accessing the session store.

+
§

SessionGetError(SessionGetError)

Failed to accessing the session store.

§

LostIdentityError(LostIdentityError)

Identity info was lost after being validated.

Seeing this error indicates a bug in actix-identity.

-

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. 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.
Returns appropriate status code for error. Read more
Creates full response for error. 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.

+

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. 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.
Returns appropriate status code for error. Read more
Creates full response for error. 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

diff --git a/actix_identity/error/index.html b/actix_identity/error/index.html index 689b66f47..bdd2c1ef7 100644 --- a/actix_identity/error/index.html +++ b/actix_identity/error/index.html @@ -1,2 +1,2 @@ -actix_identity::error - Rust

Module actix_identity::error

source ·
Expand description

Failure modes of identity operations.

+actix_identity::error - Rust

Module actix_identity::error

source ·
Expand description

Failure modes of identity operations.

Structs

Error that can occur during login attempts.
The identity information has been lost.
There is no identity information attached to the current session.
Error encountered when working with a session that has expired.

Enums

Errors that can occur while retrieving an identity.
\ No newline at end of file diff --git a/actix_identity/error/struct.LoginError.html b/actix_identity/error/struct.LoginError.html index 2f06f319f..26871226f 100644 --- a/actix_identity/error/struct.LoginError.html +++ b/actix_identity/error/struct.LoginError.html @@ -1,5 +1,5 @@ LoginError in actix_identity::error - Rust
pub struct LoginError(_);
Expand description

Error that can occur during login attempts.

-

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Returns appropriate status code for error. Read more
Creates full response for error. 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.

+

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Returns appropriate status code for error. Read more
Creates full response for error. 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

diff --git a/actix_identity/error/struct.LostIdentityError.html b/actix_identity/error/struct.LostIdentityError.html index 487de720f..e3f886d94 100644 --- a/actix_identity/error/struct.LostIdentityError.html +++ b/actix_identity/error/struct.LostIdentityError.html @@ -1,6 +1,6 @@ -LostIdentityError in actix_identity::error - Rust
#[non_exhaustive]
pub struct LostIdentityError;
Expand description

The identity information has been lost.

+LostIdentityError in actix_identity::error - Rust
#[non_exhaustive]
pub struct LostIdentityError;
Expand description

The identity information has been lost.

Seeing this error in user code indicates a bug in actix-identity.

-

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. 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

Returns the argument unchanged.

+

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. 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

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

diff --git a/actix_identity/error/struct.MissingIdentityError.html b/actix_identity/error/struct.MissingIdentityError.html index 2601f3f5e..36e69295d 100644 --- a/actix_identity/error/struct.MissingIdentityError.html +++ b/actix_identity/error/struct.MissingIdentityError.html @@ -1,5 +1,5 @@ -MissingIdentityError in actix_identity::error - Rust
#[non_exhaustive]
pub struct MissingIdentityError;
Expand description

There is no identity information attached to the current session.

-

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. 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

Returns the argument unchanged.

+MissingIdentityError in actix_identity::error - Rust
#[non_exhaustive]
pub struct MissingIdentityError;
Expand description

There is no identity information attached to the current session.

+

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. 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

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

diff --git a/actix_identity/error/struct.SessionExpiryError.html b/actix_identity/error/struct.SessionExpiryError.html index da05d62b3..0e3bb3631 100644 --- a/actix_identity/error/struct.SessionExpiryError.html +++ b/actix_identity/error/struct.SessionExpiryError.html @@ -1,5 +1,5 @@ -SessionExpiryError in actix_identity::error - Rust
pub struct SessionExpiryError(_);
Expand description

Error encountered when working with a session that has expired.

-

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. 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.

+SessionExpiryError in actix_identity::error - Rust
pub struct SessionExpiryError(_);
Expand description

Error encountered when working with a session that has expired.

+

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. 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

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

diff --git a/actix_identity/struct.Identity.html b/actix_identity/struct.Identity.html index e20a7d1dc..d57205d83 100644 --- a/actix_identity/struct.Identity.html +++ b/actix_identity/struct.Identity.html @@ -1,4 +1,4 @@ -Identity in actix_identity - Rust
pub struct Identity(_);
Expand description

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

+Identity in actix_identity - Rust
pub struct Identity(_);
Expand description

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

The lifecycle of a user identity is tied to the lifecycle of the underlying session. If the session is destroyed (e.g. the session expired), the user identity will be forgotten, de-facto forcing a user log out.

@@ -49,7 +49,7 @@ control of the error path.

.finish() } }
-

Implementations§

Return the user id associated to the current session.

+

Implementations§

Return the user id associated to the current session.

Examples
use actix_web::{get, Responder};
 use actix_identity::Identity;
@@ -62,7 +62,7 @@ control of the error path.

"Welcome Anonymous!".to_owned() } }
-

Attach a valid user identity to the current session.

+

Attach a valid user identity to the current session.

This method should be called after you have successfully authenticated the user. After login has been called, the user will be able to access all routes that require a valid Identity.

@@ -75,7 +75,7 @@ control of the error path.

Identity::login(&request.extensions(), "User1".into()); HttpResponse::Ok() }
-

Remove the user identity from the current session.

+

Remove the user identity from the current session.

After logout has been called, the user will no longer be able to access routes that require a valid Identity.

The behaviour on logout is determined by IdentityMiddlewareBuilder::logout_behaviour.

@@ -88,7 +88,7 @@ require a valid Identity
-

Trait Implementations§

Extractor implementation for Identity.

+

Trait Implementations§

Extractor implementation for Identity.

Examples

use actix_web::{get, Responder};
 use actix_identity::Identity;
@@ -101,7 +101,7 @@ require a valid Identity"Welcome Anonymous!".to_owned()
     }
 }
-
The associated error which can be returned.
Future that resolves to a Self. Read more
Create a Self from request parts asynchronously.
Create a Self from request head asynchronously. 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.

+
The associated error which can be returned.
Future that resolves to a Self. Read more
Create a Self from request parts asynchronously.
Create a Self from request head asynchronously. 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

diff --git a/help.html b/help.html index bc29ddcab..bc6abd454 100644 --- a/help.html +++ b/help.html @@ -1,2 +1 @@ -Rustdoc help

Rustdoc help

Back
\ No newline at end of file +Rustdoc help

Rustdoc help

Back
\ No newline at end of file diff --git a/implementors/core/convert/trait.From.js b/implementors/core/convert/trait.From.js index d35ac7855..1758e33b1 100644 --- a/implementors/core/convert/trait.From.js +++ b/implementors/core/convert/trait.From.js @@ -1,5 +1,5 @@ (function() {var implementors = { -"actix_identity":[["impl From<SessionInsertError> for LoginError"],["impl From<LostIdentityError> for GetIdentityError"],["impl From<MissingIdentityError> for GetIdentityError"],["impl From<ComponentRange> for GetIdentityError"],["impl From<SessionGetError> for GetIdentityError"]], +"actix_identity":[["impl From<SessionInsertError> for LoginError"],["impl From<LostIdentityError> for GetIdentityError"],["impl From<MissingIdentityError> for GetIdentityError"],["impl From<SessionExpiryError> for GetIdentityError"],["impl From<SessionGetError> for GetIdentityError"]], "actix_limitation":[["impl From<ComponentRange> for Error"],["impl From<RedisError> for Error"]], "actix_protobuf":[["impl From<PayloadError> for ProtoBufPayloadError"],["impl From<DecodeError> for ProtoBufPayloadError"]], "actix_redis":[["impl From<Error> for Error"]], diff --git a/search-index.js b/search-index.js index a7dba0ca7..6760df8d6 100644 --- a/search-index.js +++ b/search-index.js @@ -1,6 +1,6 @@ var searchIndex = JSON.parse('{\ "actix_cors":{"doc":"Cross-Origin Resource Sharing (CORS) controls for Actix …","t":[13,13,3,4,13,13,13,13,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["BadRequestHeaders","BadRequestMethod","Cors","CorsError","HeadersNotAllowed","MethodNotAllowed","MissingOrigin","MissingRequestMethod","OriginNotAllowed","WildcardOrigin","allow_any_header","allow_any_method","allow_any_origin","allow_private_network_access","allowed_header","allowed_headers","allowed_methods","allowed_origin","allowed_origin_fn","block_on_origin_mismatch","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","default","disable_preflight","disable_vary_header","error_response","expose_any_header","expose_headers","fmt","fmt","fmt","from","from","into","into","max_age","new_transform","permissive","provide","send_wildcard","status_code","supports_credentials","to_owned","to_string","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip"],"q":["actix_cors","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["Request header Access-Control-Request-Headers has an …","Request header Access-Control-Request-Method has an …","Builder for CORS middleware.","Errors that can occur when processing CORS guarded …","One or more request headers are not allowed.","Request method is not allowed.","Request header Origin is required but was not provided.","Request header Access-Control-Request-Method is required …","Origin is not allowed to make this request.","Allowed origin argument must not be wildcard (*).","Resets allowed request header list to a state where any …","Resets allowed methods list to all methods.","Resets allowed origin list to a state where any origin is …","Allow private network access.","Add an allowed request header.","Set a list of request header field names which can be used …","Set a list of methods which allowed origins can perform.","Add an origin that is allowed to make requests.","Determinate allowed origins by processing requests which …","Configures whether requests should be pre-emptively …","","","","","","","A restrictive (security paranoid) set of defaults.","Disable support for preflight requests.","Disable Vary header support.","","Resets exposed response header list to a state where all …","Set a list of headers which are safe to expose to the API …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Set a maximum time (in seconds) for which this CORS …","","A very permissive set of default for quick development. …","","Set to use wildcard origins.","","Allows users to make authenticated requests","","","","","","","","","",""],"i":[4,4,0,0,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,1,4,4,4,1,1,1,4,1,1,1,4,4,1,4,1,4,1,1,1,4,1,4,1,4,4,1,4,1,4,1,4,1,4],"f":[0,0,0,0,0,0,0,0,0,0,[1,1],[1,1],[1,1],[1,1],[1,1],[1,1],[1,1],[[1,2],1],[1,1],[[1,3],1],[[]],[[]],[[]],[[]],[4,4],[[]],[[],1],[1,1],[1,1],[4,5],[1,1],[1,1],[[1,6],7],[[4,6],7],[[4,6],7],[[]],[[]],[[]],[[]],[[1,[10,[[9,[8]]]]],1],[1],[[],1],[11],[1,1],[4,12],[1,1],[[]],[[],13],[[],14],[[],14],[[],14],[[],14],[[],15],[[],15],[[]],[[]]],"p":[[3,"Cors"],[15,"str"],[15,"bool"],[4,"CorsError"],[3,"HttpResponse"],[3,"Formatter"],[6,"Result"],[15,"usize"],[4,"Option"],[8,"Into"],[3,"Demand"],[3,"StatusCode"],[3,"String"],[4,"Result"],[3,"TypeId"]]},\ -"actix_identity":{"doc":"Identity management for Actix Web.","t":[3,8,3,11,11,11,11,11,11,11,0,11,0,11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,13,3,4,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,4,3,3,13,3,13,3,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["Identity","IdentityExt","IdentityMiddleware","borrow","borrow","borrow_mut","borrow_mut","builder","clone","clone_into","config","default","error","from","from","from_request","get_identity","id","into","into","login","logout","new_transform","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","DeleteIdentityKeys","IdentityMiddlewareBuilder","LogoutBehaviour","PurgeSession","borrow","borrow","borrow_mut","borrow_mut","build","clone","clone","clone_into","clone_into","fmt","fmt","from","from","into","into","login_deadline","logout_behaviour","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","visit_deadline","vzip","vzip","GetIdentityError","LoginError","LostIdentityError","LostIdentityError","MissingIdentityError","MissingIdentityError","SessionExpiryError","SessionExpiryError","SessionGetError","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","into","into","into","into","into","provide","provide","provide","provide","provide","source","source","source","source","status_code","status_code","to_string","to_string","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip"],"q":["actix_identity","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_identity::config","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_identity::error","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["A verified user identity. It can be used as a request …","Helper trait to retrieve an Identity instance from various …","Identity management middleware.","","","","","A fluent API to configure IdentityMiddleware.","","","Configuration options to tune the behaviour of …","","Failure modes of identity operations.","Returns the argument unchanged.","Returns the argument unchanged.","","Retrieve the identity attached to the current session, if …","Return the user id associated to the current session.","Calls U::from(self).","Calls U::from(self).","Attach a valid user identity to the current session.","Remove the user identity from the current session.","","","","","","","","","","","When Identity::logout is called, remove the identity …","A fluent builder to construct an IdentityMiddleware …","LogoutBehaviour controls what actions are going to be …","When Identity::logout is called, purge the current session.","","","","","Finalises the builder and returns an IdentityMiddleware …","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Automatically logs out users after a certain amount of …","Determines how Identity::logout affects the current …","","","","","","","","","Automatically logs out users after a certain amount of …","","","Errors that can occur while retrieving an identity.","Error that can occur during login attempts.","The identity information has been lost.","Identity info was lost after being validated.","There is no identity information attached to the current …","No identity is found in a session.","Error encountered when working with a session that has …","The session has expired.","Failed to accessing the session store.","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,5,2,5,2,2,2,2,0,2,0,5,2,5,26,5,5,2,5,5,2,2,5,2,5,2,5,2,5,2,12,0,0,12,12,1,12,1,1,12,1,12,1,12,1,12,1,12,1,1,1,12,1,12,1,12,1,12,1,1,12,1,0,0,0,6,0,6,0,6,6,10,17,18,19,6,10,17,18,19,6,10,10,17,17,18,18,19,19,6,6,10,10,17,18,19,6,6,6,6,6,10,17,18,19,6,10,17,18,19,6,10,18,19,6,10,6,10,17,18,19,6,10,17,18,19,6,10,17,18,19,6,10,17,18,19,6,10,17,18,19,6],"f":[0,0,0,[[]],[[]],[[]],[[]],[[],1],[2,2],[[]],0,[[],2],0,[[]],[[]],[[3,4]],[[],[[7,[5,6]]]],[5,[[7,[8,6]]]],[[]],[[]],[[9,8],[[7,[5,10]]]],[5],[2],[[]],[[],7],[[],7],[[],7],[[],7],[[],11],[[],11],[[]],[[]],0,0,0,0,[[]],[[]],[[]],[[]],[1,2],[12,12],[1,1],[[]],[[]],[[12,13],14],[[1,13],14],[[]],[[]],[[]],[[]],[[1,[16,[15]]],1],[[1,12],1],[[]],[[]],[[],7],[[],7],[[],7],[[],7],[[],11],[[],11],[[1,[16,[15]]],1],[[]],[[]],0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[10,13],14],[[10,13],14],[[17,13],14],[[17,13],14],[[18,13],14],[[18,13],14],[[19,13],14],[[19,13],14],[[6,13],14],[[6,13],14],[20,10],[[]],[[]],[[]],[[]],[18,6],[21,6],[[]],[19,6],[22,6],[[]],[[]],[[]],[[]],[[]],[23],[23],[23],[23],[23],[10,[[16,[24]]]],[18,[[16,[24]]]],[19,[[16,[24]]]],[6,[[16,[24]]]],[10,25],[6,25],[[],8],[[],8],[[],8],[[],8],[[],8],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],11],[[],11],[[],11],[[],11],[[],11],[[]],[[]],[[]],[[]],[[]]],"p":[[3,"IdentityMiddlewareBuilder"],[3,"IdentityMiddleware"],[3,"HttpRequest"],[4,"Payload"],[3,"Identity"],[4,"GetIdentityError"],[4,"Result"],[3,"String"],[3,"Extensions"],[3,"LoginError"],[3,"TypeId"],[4,"LogoutBehaviour"],[3,"Formatter"],[6,"Result"],[3,"Duration"],[4,"Option"],[3,"SessionExpiryError"],[3,"LostIdentityError"],[3,"MissingIdentityError"],[3,"SessionInsertError"],[3,"ComponentRange"],[3,"SessionGetError"],[3,"Demand"],[8,"Error"],[3,"StatusCode"],[8,"IdentityExt"]]},\ +"actix_identity":{"doc":"Identity management for Actix Web.","t":[3,8,3,11,11,11,11,11,11,11,0,11,0,11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,13,3,4,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,4,3,3,13,3,13,3,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["Identity","IdentityExt","IdentityMiddleware","borrow","borrow","borrow_mut","borrow_mut","builder","clone","clone_into","config","default","error","from","from","from_request","get_identity","id","into","into","login","logout","new_transform","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","DeleteIdentityKeys","IdentityMiddlewareBuilder","LogoutBehaviour","PurgeSession","borrow","borrow","borrow_mut","borrow_mut","build","clone","clone","clone_into","clone_into","fmt","fmt","from","from","into","into","login_deadline","logout_behaviour","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","visit_deadline","vzip","vzip","GetIdentityError","LoginError","LostIdentityError","LostIdentityError","MissingIdentityError","MissingIdentityError","SessionExpiryError","SessionExpiryError","SessionGetError","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","into","into","into","into","into","provide","provide","provide","provide","provide","source","source","status_code","status_code","to_string","to_string","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip"],"q":["actix_identity","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_identity::config","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_identity::error","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["A verified user identity. It can be used as a request …","Helper trait to retrieve an Identity instance from various …","Identity management middleware.","","","","","A fluent API to configure IdentityMiddleware.","","","Configuration options to tune the behaviour of …","","Failure modes of identity operations.","Returns the argument unchanged.","Returns the argument unchanged.","","Retrieve the identity attached to the current session, if …","Return the user id associated to the current session.","Calls U::from(self).","Calls U::from(self).","Attach a valid user identity to the current session.","Remove the user identity from the current session.","","","","","","","","","","","When Identity::logout is called, remove the identity …","A fluent builder to construct an IdentityMiddleware …","LogoutBehaviour controls what actions are going to be …","When Identity::logout is called, purge the current session.","","","","","Finalises the builder and returns an IdentityMiddleware …","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Automatically logs out users after a certain amount of …","Determines how Identity::logout affects the current …","","","","","","","","","Automatically logs out users after a certain amount of …","","","Errors that can occur while retrieving an identity.","Error that can occur during login attempts.","The identity information has been lost.","Identity info was lost after being validated.","There is no identity information attached to the current …","No identity is found in a session.","Error encountered when working with a session that has …","The session has expired.","Failed to accessing the session store.","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,5,2,5,2,2,2,2,0,2,0,5,2,5,25,5,5,2,5,5,2,2,5,2,5,2,5,2,5,2,12,0,0,12,12,1,12,1,1,12,1,12,1,12,1,12,1,12,1,1,1,12,1,12,1,12,1,12,1,1,12,1,0,0,0,6,0,6,0,6,6,10,17,18,19,6,10,17,18,19,6,10,10,17,17,18,18,19,19,6,6,10,10,17,18,19,6,6,6,6,6,10,17,18,19,6,10,17,18,19,6,10,6,10,6,10,17,18,19,6,10,17,18,19,6,10,17,18,19,6,10,17,18,19,6,10,17,18,19,6],"f":[0,0,0,[[]],[[]],[[]],[[]],[[],1],[2,2],[[]],0,[[],2],0,[[]],[[]],[[3,4]],[[],[[7,[5,6]]]],[5,[[7,[8,6]]]],[[]],[[]],[[9,8],[[7,[5,10]]]],[5],[2],[[]],[[],7],[[],7],[[],7],[[],7],[[],11],[[],11],[[]],[[]],0,0,0,0,[[]],[[]],[[]],[[]],[1,2],[12,12],[1,1],[[]],[[]],[[12,13],14],[[1,13],14],[[]],[[]],[[]],[[]],[[1,[16,[15]]],1],[[1,12],1],[[]],[[]],[[],7],[[],7],[[],7],[[],7],[[],11],[[],11],[[1,[16,[15]]],1],[[]],[[]],0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[10,13],14],[[10,13],14],[[17,13],14],[[17,13],14],[[18,13],14],[[18,13],14],[[19,13],14],[[19,13],14],[[6,13],14],[[6,13],14],[20,10],[[]],[[]],[[]],[[]],[17,6],[21,6],[19,6],[18,6],[[]],[[]],[[]],[[]],[[]],[[]],[22],[22],[22],[22],[22],[10,[[16,[23]]]],[6,[[16,[23]]]],[10,24],[6,24],[[],8],[[],8],[[],8],[[],8],[[],8],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],11],[[],11],[[],11],[[],11],[[],11],[[]],[[]],[[]],[[]],[[]]],"p":[[3,"IdentityMiddlewareBuilder"],[3,"IdentityMiddleware"],[3,"HttpRequest"],[4,"Payload"],[3,"Identity"],[4,"GetIdentityError"],[4,"Result"],[3,"String"],[3,"Extensions"],[3,"LoginError"],[3,"TypeId"],[4,"LogoutBehaviour"],[3,"Formatter"],[6,"Result"],[3,"Duration"],[4,"Option"],[3,"SessionExpiryError"],[3,"LostIdentityError"],[3,"MissingIdentityError"],[3,"SessionInsertError"],[3,"SessionGetError"],[3,"Demand"],[8,"Error"],[3,"StatusCode"],[8,"IdentityExt"]]},\ "actix_limitation":{"doc":"Rate limiter using a fixed window counter for arbitrary …","t":[3,13,17,17,17,17,4,13,3,13,3,3,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["Builder","Client","DEFAULT_COOKIE_NAME","DEFAULT_PERIOD_SECS","DEFAULT_REQUEST_LIMIT","DEFAULT_SESSION_KEY","Error","LimitExceeded","Limiter","Other","RateLimiter","Status","Time","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","builder","clone","clone","clone_into","clone_into","cookie_name","count","default","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","into","into","into","into","into","key_by","limit","limit","new_transform","period","provide","remaining","reset_epoch_utc","session_key","source","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip"],"q":["actix_limitation","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["Rate limiter builder.","Redis client failed to connect or run a query.","Default cookie name.","Default period (in seconds).","Default request limit.","Default session key.","Failure modes of the rate limiter.","Limit is exceeded for a key.","Rate limiter.","Generic error.","Rate limit middleware.","A report for a given key containing the limit status.","Time conversion failed.","","","","","","","","","","","Finalizes and returns a Limiter.","Construct rate limiter builder with defaults.","","","","","Sets name of cookie to be sent.","Consumes one rate limit unit, returning the status.","","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Sets rate limit key derivation function.","Set upper limit.","Returns the maximum number of requests allowed in the …","","Set limit window/period.","","Returns how many requests are left in the current period.","Returns a UNIX timestamp in UTC approximately when the …","Sets session key to be used in backend.","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,3,0,0,0,0,0,3,0,3,0,0,3,1,3,10,7,2,1,3,10,7,2,1,2,7,2,7,2,1,2,10,1,3,3,10,7,2,1,3,3,3,10,7,2,1,3,10,7,2,1,1,7,10,1,3,7,7,1,3,7,2,3,1,3,10,7,2,1,3,10,7,2,1,3,10,7,2,1,3,10,7,2],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[1,[[4,[2,3]]]],[[[6,[5]]],1],[7,7],[2,2],[[]],[[]],[[1,[6,[[9,[8]]]]],1],[[2,[6,[5]]],[[4,[7,3]]]],[[],10],[[1,11],12],[[3,11],12],[[3,11],12],[[10,11],12],[[7,11],12],[[2,11],12],[[]],[13,3],[14,3],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[1,1],[[1,15],1],[7,15],[10],[[1,16],1],[17],[7,15],[7,15],[[1,[6,[[9,[8]]]]],1],[3,[[19,[18]]]],[[]],[[]],[[],5],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],20],[[],20],[[],20],[[],20],[[],20],[[]],[[]],[[]],[[]],[[]]],"p":[[3,"Builder"],[3,"Limiter"],[4,"Error"],[4,"Result"],[3,"String"],[8,"Into"],[3,"Status"],[15,"str"],[4,"Cow"],[3,"RateLimiter"],[3,"Formatter"],[6,"Result"],[3,"RedisError"],[3,"ComponentRange"],[15,"usize"],[3,"Duration"],[3,"Demand"],[8,"Error"],[4,"Option"],[3,"TypeId"]]},\ "actix_protobuf":{"doc":"Protobuf payload extractor for Actix Web.","t":[13,13,13,13,3,3,3,4,8,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["ContentType","Deserialize","Overflow","Payload","ProtoBuf","ProtoBufConfig","ProtoBufMessage","ProtoBufPayloadError","ProtoBufResponseBuilder","Serialize","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","default","deref","deref_mut","error_response","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from_request","into","into","into","into","into_future","limit","limit","new","poll","protobuf","resource_path","respond_to","to_string","to_string","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_poll","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip"],"q":["actix_protobuf","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["Content type error","Deserialize error","Payload size is bigger than 256k","Payload error","","","","","","Serialize error","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Change max size of payload. By default max size is 256Kb","Change max size of payload. By default max size is 256Kb","Create ProtoBufMessage for request.","","","","","","","","","","","","","","","","","","","","","","",""],"i":[4,4,4,4,0,0,0,0,0,4,3,1,14,4,3,1,14,4,1,3,3,4,3,3,4,4,3,1,14,4,4,4,3,3,1,14,4,14,1,14,14,14,23,3,3,3,4,3,1,14,4,3,1,14,4,14,3,1,14,4,3,1,14,4],"f":[0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],1],[[[3,[2]]]],[[[3,[2]]]],[4,5],[[3,6],7],[[3,6],7],[[4,6],7],[[4,6],7],[[]],[[]],[[]],[8,4],[9,4],[[]],[[10,11]],[[]],[[]],[[]],[[]],[[]],[[1,12],1],[[[14,[[0,[2,13]]]],12],[[14,[[0,[2,13]]]]]],[[10,11],[[14,[[0,[2,13]]]]]],[[[15,[[14,[[0,[2,13]]]]]],16],17],[2,[[19,[5,18]]]],[[],20],[[[3,[[0,[2,13]]]],10],5],[[],21],[[],21],[[],19],[[],19],[[],19],[[],19],[[],19],[[],19],[[],19],[[],19],[[15,16],17],[[],22],[[],22],[[],22],[[],22],[[]],[[]],[[]],[[]]],"p":[[3,"ProtoBufConfig"],[8,"Message"],[3,"ProtoBuf"],[4,"ProtoBufPayloadError"],[3,"HttpResponse"],[3,"Formatter"],[6,"Result"],[3,"DecodeError"],[4,"PayloadError"],[3,"HttpRequest"],[4,"Payload"],[15,"usize"],[8,"Default"],[3,"ProtoBufMessage"],[3,"Pin"],[3,"Context"],[4,"Poll"],[3,"Error"],[4,"Result"],[3,"Path"],[3,"String"],[3,"TypeId"],[8,"ProtoBufResponseBuilder"]]},\ "actix_redis":{"doc":"Redis integration for actix.","t":[13,13,3,13,13,4,13,13,13,13,13,13,13,3,13,13,4,4,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,14,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["Array","BulkString","Command","Connection","Disconnected","Error","Error","IO","Integer","Internal","Nil","NotConnected","Redis","RedisActor","Remote","Resp","RespError","RespValue","SimpleString","Unexpected","append","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","eq","equivalent","error","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_resp_int","handle","handle","into","into","into","into","into","provide","provide","push","resp_array","restarting","source","source","start","started","to_owned","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip"],"q":["actix_redis","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["Zero, one or more other RespValues.","A bulk string. In Redis terminology a string is a …","Command for sending data to Redis.","Error creating a connection, or an error with a connection …","Cancel all waiters when connection is dropped.","General purpose actix-redis error.","An error from the Redis server","An IO error occurred","Redis documentation defines an integer as being a signed …","A non-specific internal error that prevented an operation …","","Receiving message during reconnecting.","","Redis communication actor.","A remote error","A RESP parsing/serialising error occurred","","A single RESP value, this owns the data that is read/to-be …","","An unexpected error. In this context “unexpected” …","Convenience function for building dynamic Redis commands …","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","","","","","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","Push item to Resp array","Macro to create a RESP array, useful for preparing …","","","","Start new Supervisor with RedisActor.","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[1,1,0,13,10,0,1,13,1,13,1,10,10,0,13,13,0,0,1,13,1,4,7,10,1,13,4,7,10,1,13,1,1,1,1,4,7,10,10,1,13,13,4,7,10,10,1,1,1,1,1,1,1,1,13,13,13,1,4,4,4,7,10,1,13,10,13,1,0,4,10,13,4,4,1,10,13,4,7,10,1,13,4,7,10,1,13,4,7,10,1,13,4,7,10,1,13],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[1,2],1],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[1,1],[[]],[[1,1],3],[[],3],[[4,5],6],[[7,8],9],[[10,8],9],[[10,8],9],[[1,8],[[12,[11]]]],[[13,8],[[12,[11]]]],[[13,8],[[12,[11]]]],[[]],[[]],[[]],[13,10],[[[16,[14,15]]],1],[[]],[[],1],[17,1],[18,1],[[[20,[19]]],1],[18,1],[19,1],[5,13],[21,13],[[]],[1,[[12,[1,13]]]],[[4,[12,[1,13]]]],[[4,7]],[[]],[[]],[[]],[[]],[[]],[22],[22],[1],0,[4],[10,[[24,[23]]]],[13,[[24,[23]]]],[[[25,[18]]],[[26,[4]]]],[[4,27]],[[]],[[],18],[[],18],[[],12],[[],12],[[],12],[[],12],[[],12],[[],12],[[],12],[[],12],[[],12],[[],12],[[],28],[[],28],[[],28],[[],28],[[],28],[[]],[[]],[[]],[[]],[[]]],"p":[[4,"RespValue"],[8,"IntoIterator"],[15,"bool"],[3,"RedisActor"],[3,"Error"],[4,"Running"],[3,"Command"],[3,"Formatter"],[6,"Result"],[4,"Error"],[3,"Error"],[4,"Result"],[4,"RespError"],[15,"u8"],[3,"Global"],[3,"Vec"],[15,"usize"],[3,"String"],[15,"str"],[3,"Arc"],[3,"TrySendError"],[3,"Demand"],[8,"Error"],[4,"Option"],[8,"Into"],[3,"Addr"],[3,"Context"],[3,"TypeId"]]},\ diff --git a/settings.html b/settings.html index 4cd5f80a0..2eb99cdc7 100644 --- a/settings.html +++ b/settings.html @@ -1,2 +1 @@ -Rustdoc settings

Rustdoc settings

Back
\ No newline at end of file +Rustdoc settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/src/actix_identity/error.rs.html b/src/actix_identity/error.rs.html index f3716f9a7..eaf4d5a1c 100644 --- a/src/actix_identity/error.rs.html +++ b/src/actix_identity/error.rs.html @@ -68,246 +68,74 @@ 68 69 70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156
//! Failure modes of identity operations.
 
-use std::fmt;
-
-use actix_session::{SessionGetError, SessionInsertError};
+use actix_session::{SessionGetError, SessionInsertError};
 use actix_web::{cookie::time::error::ComponentRange, http::StatusCode, ResponseError};
+use derive_more::{Display, Error, From};
 
 /// Error that can occur during login attempts.
-#[derive(Debug)]
+#[derive(Debug, Display, Error, From)]
+#[display(fmt = "{_0}")]
 pub struct LoginError(SessionInsertError);
 
-impl fmt::Display for LoginError {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        write!(f, "{}", self.0)
-    }
-}
-
-impl std::error::Error for LoginError {
-    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
-        Some(&self.0)
-    }
-}
-
 impl ResponseError for LoginError {
     fn status_code(&self) -> StatusCode {
         StatusCode::UNAUTHORIZED
     }
 }
 
-impl From<SessionInsertError> for LoginError {
-    fn from(error: SessionInsertError) -> Self {
-        Self(error)
-    }
-}
-
 /// Error encountered when working with a session that has expired.
-#[derive(Debug)]
-pub struct SessionExpiryError(ComponentRange);
-
-impl fmt::Display for SessionExpiryError {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.write_str("The given session has expired and is no longer valid")
-    }
-}
-
-impl std::error::Error for SessionExpiryError {}
+#[derive(Debug, Display, Error)]
+#[display(fmt = "The given session has expired and is no longer valid")]
+pub struct SessionExpiryError(#[error(not(source))] pub(crate) ComponentRange);
 
 /// The identity information has been lost.
 ///
 /// Seeing this error in user code indicates a bug in actix-identity.
-#[derive(Debug)]
+#[derive(Debug, Display, Error)]
+#[display(
+    fmt = "The identity information in the current session has disappeared after having been \
+           successfully validated. This is likely to be a bug."
+)]
 #[non_exhaustive]
 pub struct LostIdentityError;
 
-impl fmt::Display for LostIdentityError {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.write_str(
-            "The identity information in the current session has disappeared \
-            after having been successfully validated. This is likely to be a bug.",
-        )
-    }
-}
-
-impl std::error::Error for LostIdentityError {
-    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
-        Some(self)
-    }
-}
-
 /// There is no identity information attached to the current session.
-#[derive(Debug)]
+#[derive(Debug, Display, Error)]
+#[display(fmt = "There is no identity information attached to the current session")]
 #[non_exhaustive]
 pub struct MissingIdentityError;
 
-impl fmt::Display for MissingIdentityError {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.write_str("There is no identity information attached to the current session.")
-    }
-}
-
-impl std::error::Error for MissingIdentityError {
-    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
-        Some(self)
-    }
-}
-
 /// Errors that can occur while retrieving an identity.
-#[derive(Debug)]
+#[derive(Debug, Display, Error, From)]
 #[non_exhaustive]
 pub enum GetIdentityError {
     /// The session has expired.
+    #[display(fmt = "{_0}")]
     SessionExpiryError(SessionExpiryError),
 
     /// No identity is found in a session.
+    #[display(fmt = "{_0}")]
     MissingIdentityError(MissingIdentityError),
 
     /// Failed to accessing the session store.
+    #[display(fmt = "{_0}")]
     SessionGetError(SessionGetError),
 
     /// Identity info was lost after being validated.
     ///
     /// Seeing this error indicates a bug in actix-identity.
+    #[display(fmt = "{_0}")]
     LostIdentityError(LostIdentityError),
 }
 
-impl fmt::Display for GetIdentityError {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        match self {
-            Self::SessionExpiryError(err) => write!(f, "{err}"),
-            Self::MissingIdentityError(err) => write!(f, "{err}"),
-            Self::SessionGetError(err) => write!(f, "{err}"),
-            Self::LostIdentityError(err) => write!(f, "{err}"),
-        }
-    }
-}
-
-impl std::error::Error for GetIdentityError {
-    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
-        match self {
-            Self::SessionExpiryError(err) => Some(err),
-            Self::MissingIdentityError(err) => Some(err),
-            Self::SessionGetError(err) => Some(err),
-            Self::LostIdentityError(err) => Some(err),
-        }
-    }
-}
-
 impl ResponseError for GetIdentityError {
     fn status_code(&self) -> StatusCode {
-        StatusCode::UNAUTHORIZED
-    }
-}
-
-impl From<LostIdentityError> for GetIdentityError {
-    fn from(error: LostIdentityError) -> Self {
-        Self::LostIdentityError(error)
-    }
-}
-
-impl From<MissingIdentityError> for GetIdentityError {
-    fn from(error: MissingIdentityError) -> Self {
-        Self::MissingIdentityError(error)
-    }
-}
-
-impl From<ComponentRange> for GetIdentityError {
-    fn from(error: ComponentRange) -> Self {
-        Self::SessionExpiryError(SessionExpiryError(error))
-    }
-}
-
-impl From<SessionGetError> for GetIdentityError {
-    fn from(source: SessionGetError) -> Self {
-        Self::SessionGetError(source)
+        match self {
+            Self::LostIdentityError(_) => StatusCode::INTERNAL_SERVER_ERROR,
+            _ => StatusCode::UNAUTHORIZED,
+        }
     }
 }
 
diff --git a/src/actix_identity/identity.rs.html b/src/actix_identity/identity.rs.html index f894c7da3..45eb523c6 100644 --- a/src/actix_identity/identity.rs.html +++ b/src/actix_identity/identity.rs.html @@ -263,6 +263,10 @@ 263 264 265 +266 +267 +268 +269
use actix_session::Session;
 use actix_utils::future::{ready, Ready};
 use actix_web::{
@@ -274,7 +278,9 @@
 
 use crate::{
     config::LogoutBehaviour,
-    error::{GetIdentityError, LoginError, LostIdentityError, MissingIdentityError},
+    error::{
+        GetIdentityError, LoginError, LostIdentityError, MissingIdentityError, SessionExpiryError,
+    },
 };
 
 /// A verified user identity. It can be used as a request extractor.
@@ -477,7 +483,8 @@
             .session
             .get(LOGIN_UNIX_TIMESTAMP_KEY)?
             .map(OffsetDateTime::from_unix_timestamp)
-            .transpose()?)
+            .transpose()
+            .map_err(SessionExpiryError)?)
     }
 
     pub(crate) fn last_visited_at(&self) -> Result<Option<OffsetDateTime>, GetIdentityError> {
@@ -486,7 +493,8 @@
             .session
             .get(LAST_VISIT_UNIX_TIMESTAMP_KEY)?
             .map(OffsetDateTime::from_unix_timestamp)
-            .transpose()?)
+            .transpose()
+            .map_err(SessionExpiryError)?)
     }
 
     pub(crate) fn set_last_visited_at(&self) -> Result<(), LoginError> {