From 97a6b0a93a27a344033eec234959791dc45f5140 Mon Sep 17 00:00:00 2001 From: robjtede Date: Thu, 4 Jan 2024 04:06:48 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20actix/ac?= =?UTF-8?q?tix-extras@77b8dcdf59e73cafd4dc0098f6131171d97a797d=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- actix_cors/index.html | 2 +- .../storage/struct.CookieSessionStore.html | 12 ++++++------ .../storage/struct.RedisSessionStore.html | 6 +++--- actix_session/storage/struct.SessionKey.html | 6 +++--- actix_session/storage/trait.SessionStore.html | 2 +- help.html | 4 ++-- settings.html | 4 ++-- src/actix_cors/builder.rs.html | 4 ++-- src/actix_cors/lib.rs.html | 10 +++++----- src/actix_limitation/status.rs.html | 2 +- src/actix_session/middleware.rs.html | 2 +- src/actix_session/storage/cookie.rs.html | 6 +----- src/actix_session/storage/redis_rs.rs.html | 16 +++------------- src/actix_session/storage/session_key.rs.html | 8 +------- src/actix_session/storage/utils.rs.html | 6 +----- 15 files changed, 33 insertions(+), 57 deletions(-) diff --git a/actix_cors/index.html b/actix_cors/index.html index 3cdb15d15..14cecf7d0 100644 --- a/actix_cors/index.html +++ b/actix_cors/index.html @@ -43,4 +43,4 @@ draft spec until it is finalized. Ok(()) } -

Re-exports

Structs

Enums

\ No newline at end of file +

Re-exports

Structs

Enums

\ No newline at end of file diff --git a/actix_session/storage/struct.CookieSessionStore.html b/actix_session/storage/struct.CookieSessionStore.html index 29229ba36..f41244589 100644 --- a/actix_session/storage/struct.CookieSessionStore.html +++ b/actix_session/storage/struct.CookieSessionStore.html @@ -1,5 +1,5 @@ CookieSessionStore in actix_session::storage - Rust -
#[non_exhaustive]
pub struct CookieSessionStore;
Expand description

Use the session key, stored in the session cookie, as storage backend for the session state.

+
#[non_exhaustive]
pub struct CookieSessionStore;
Expand description

Use the session key, stored in the session cookie, as storage backend for the session state.

use actix_web::{cookie::Key, web, App, HttpServer, HttpResponse, Error};
 use actix_session::{SessionMiddleware, storage::CookieSessionStore};
@@ -29,20 +29,20 @@ browsers. We strongly recommend setting the policy to Trait Implementations§
source§

impl Default for CookieSessionStore

source§

fn default() -> CookieSessionStore

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

impl SessionStore for CookieSessionStore

source§

fn load<'life0, 'life1, 'async_trait>( +

Trait Implementations§

source§

impl Default for CookieSessionStore

source§

fn default() -> CookieSessionStore

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

impl SessionStore for CookieSessionStore

source§

fn load<'life0, 'life1, 'async_trait>( &'life0 self, session_key: &'life1 SessionKey ) -> Pin<Box<dyn Future<Output = Result<Option<HashMap<String, String>>, LoadError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

Loads the session state associated to a session key.
source§

fn save<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

Loads the session state associated to a session key.
source§

fn save<'life0, 'life1, 'async_trait>( &'life0 self, session_state: HashMap<String, String>, _ttl: &'life1 Duration ) -> Pin<Box<dyn Future<Output = Result<SessionKey, SaveError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

Persist the session state for a newly created session. Read more
source§

fn update<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

Persist the session state for a newly created session. Read more
source§

fn update<'life0, 'life1, 'async_trait>( &'life0 self, _session_key: SessionKey, session_state: HashMap<String, String>, @@ -50,7 +50,7 @@ storage backend.

) -> Pin<Box<dyn Future<Output = Result<SessionKey, UpdateError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

Updates the session state associated to a pre-existing session key.
source§

fn update_ttl<'life0, 'life1, 'life2, 'async_trait>( + 'life1: 'async_trait,

Updates the session state associated to a pre-existing session key.
source§

fn update_ttl<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _session_key: &'life1 SessionKey, _ttl: &'life2 Duration @@ -58,7 +58,7 @@ storage backend.

Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

Updates the TTL of the session state associated to a pre-existing session key.
source§

fn delete<'life0, 'life1, 'async_trait>( + 'life2: 'async_trait,

Updates the TTL of the session state associated to a pre-existing session key.
source§

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, _session_key: &'life1 SessionKey ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where diff --git a/actix_session/storage/struct.RedisSessionStore.html b/actix_session/storage/struct.RedisSessionStore.html index 777bb8c8d..deb47529a 100644 --- a/actix_session/storage/struct.RedisSessionStore.html +++ b/actix_session/storage/struct.RedisSessionStore.html @@ -47,7 +47,7 @@ connection string for Redis.

) -> Result<RedisSessionStore, Error>

Create a new instance of RedisSessionStore using the default configuration. It takes as input the only required input to create a new instance of RedisSessionStore - a connection string for Redis.

-

Trait Implementations§

source§

impl Clone for RedisSessionStore

source§

fn clone(&self) -> RedisSessionStore

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl SessionStore for RedisSessionStore

source§

fn load<'life0, 'life1, 'async_trait>( +

Trait Implementations§

source§

impl Clone for RedisSessionStore

source§

fn clone(&self) -> RedisSessionStore

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl SessionStore for RedisSessionStore

source§

fn load<'life0, 'life1, 'async_trait>( &'life0 self, session_key: &'life1 SessionKey ) -> Pin<Box<dyn Future<Output = Result<Option<HashMap<String, String>>, LoadError>> + 'async_trait>>
where @@ -68,7 +68,7 @@ connection string for Redis.

) -> Pin<Box<dyn Future<Output = Result<SessionKey, UpdateError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

Updates the session state associated to a pre-existing session key.
source§

fn update_ttl<'life0, 'life1, 'life2, 'async_trait>( + 'life1: 'async_trait,

Updates the session state associated to a pre-existing session key.
source§

fn update_ttl<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_key: &'life1 SessionKey, ttl: &'life2 Duration @@ -76,7 +76,7 @@ connection string for Redis.

Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

Updates the TTL of the session state associated to a pre-existing session key.
source§

fn delete<'life0, 'life1, 'async_trait>( + 'life2: 'async_trait,

Updates the TTL of the session state associated to a pre-existing session key.
source§

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, session_key: &'life1 SessionKey ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where diff --git a/actix_session/storage/struct.SessionKey.html b/actix_session/storage/struct.SessionKey.html index fe20693b4..6ea261b26 100644 --- a/actix_session/storage/struct.SessionKey.html +++ b/actix_session/storage/struct.SessionKey.html @@ -1,5 +1,5 @@ SessionKey in actix_session::storage - Rust -
pub struct SessionKey(/* private fields */);
Expand description

A session key, the string stored in a client-side cookie to associate a user with its session +

pub struct SessionKey(/* private fields */);
Expand description

A session key, the string stored in a client-side cookie to associate a user with its session state on the backend.

Validation

Session keys are stored as cookies, therefore they cannot be arbitrary long. Session keys are @@ -10,9 +10,9 @@ required to be smaller than 4064 bytes.

let key: String = std::iter::repeat('a').take(4065).collect(); let session_key: Result<SessionKey, _> = key.try_into(); assert!(session_key.is_err());
-

Trait Implementations§

source§

impl AsRef<str> for SessionKey

source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Debug for SessionKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SessionKey> for String

source§

fn from(key: SessionKey) -> Self

Converts to this type from the input type.
source§

impl PartialEq for SessionKey

source§

fn eq(&self, other: &SessionKey) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl AsRef<str> for SessionKey

source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Debug for SessionKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SessionKey> for String

source§

fn from(key: SessionKey) -> Self

Converts to this type from the input type.
source§

impl PartialEq for SessionKey

source§

fn eq(&self, other: &SessionKey) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<String> for SessionKey

§

type Error = InvalidSessionKeyError

The type returned in the event of a conversion error.
source§

fn try_from(val: String) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Eq for SessionKey

source§

impl StructuralEq for SessionKey

source§

impl StructuralPartialEq for SessionKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +sufficient, and should not be overridden without very good reason.

source§

impl TryFrom<String> for SessionKey

§

type Error = InvalidSessionKeyError

The type returned in the event of a conversion error.
source§

fn try_from(val: String) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Eq for SessionKey

source§

impl StructuralEq for SessionKey

source§

impl StructuralPartialEq for SessionKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/actix_session/storage/trait.SessionStore.html b/actix_session/storage/trait.SessionStore.html index 55278b329..ca99b30a7 100644 --- a/actix_session/storage/trait.SessionStore.html +++ b/actix_session/storage/trait.SessionStore.html @@ -87,4 +87,4 @@ is required for implementations, too. In particular, we use the send-optional va Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Deletes a session from the store.

-

Implementors§

\ No newline at end of file +

Implementors§

\ No newline at end of file diff --git a/help.html b/help.html index 63a65aacc..3a0c549b8 100644 --- a/help.html +++ b/help.html @@ -1,2 +1,2 @@ -Help -

Rustdoc help

Back
\ No newline at end of file +Help +

Rustdoc help

Back
\ No newline at end of file diff --git a/settings.html b/settings.html index d4626bc00..53ef96991 100644 --- a/settings.html +++ b/settings.html @@ -1,2 +1,2 @@ -Settings -

Rustdoc settings

Back
\ No newline at end of file +Settings +

Rustdoc settings

Back
\ No newline at end of file diff --git a/src/actix_cors/builder.rs.html b/src/actix_cors/builder.rs.html index 22528355d..cee1d47c4 100644 --- a/src/actix_cors/builder.rs.html +++ b/src/actix_cors/builder.rs.html @@ -681,7 +681,7 @@ 679 680 681 -
use std::{collections::HashSet, convert::TryInto, iter::FromIterator, rc::Rc};
+
use std::{collections::HashSet, iter::FromIterator, rc::Rc};
 
 use actix_utils::future::{self, Ready};
 use actix_web::{
@@ -1293,7 +1293,7 @@
 
 #[cfg(test)]
 mod test {
-    use std::convert::{Infallible, TryInto};
+    use std::convert::Infallible;
 
     use actix_web::{
         body,
diff --git a/src/actix_cors/lib.rs.html b/src/actix_cors/lib.rs.html
index ff98b6481..5b66797d7 100644
--- a/src/actix_cors/lib.rs.html
+++ b/src/actix_cors/lib.rs.html
@@ -131,9 +131,9 @@
 mod inner;
 mod middleware;
 
-use all_or_some::AllOrSome;
-pub use builder::Cors;
-pub use error::CorsError;
-use inner::{Inner, OriginFn};
-pub use middleware::CorsMiddleware;
+use crate::{
+    all_or_some::AllOrSome,
+    inner::{Inner, OriginFn},
+};
+pub use crate::{builder::Cors, error::CorsError, middleware::CorsMiddleware};
 
\ No newline at end of file diff --git a/src/actix_limitation/status.rs.html b/src/actix_limitation/status.rs.html index 22b58b5a1..7f51f79cb 100644 --- a/src/actix_limitation/status.rs.html +++ b/src/actix_limitation/status.rs.html @@ -118,7 +118,7 @@ 116 117 118 -
use std::{convert::TryInto, ops::Add, time::Duration};
+
use std::{ops::Add, time::Duration};
 
 use chrono::SubsecRound as _;
 
diff --git a/src/actix_session/middleware.rs.html b/src/actix_session/middleware.rs.html
index 7e9ef4fbd..2815ee6ab 100644
--- a/src/actix_session/middleware.rs.html
+++ b/src/actix_session/middleware.rs.html
@@ -465,7 +465,7 @@
 463
 464
 465
-
use std::{collections::HashMap, convert::TryInto, fmt, future::Future, pin::Pin, rc::Rc};
+
use std::{collections::HashMap, fmt, future::Future, pin::Pin, rc::Rc};
 
 use actix_utils::future::{ready, Ready};
 use actix_web::{
diff --git a/src/actix_session/storage/cookie.rs.html b/src/actix_session/storage/cookie.rs.html
index af74c1f66..e0b8e8910 100644
--- a/src/actix_session/storage/cookie.rs.html
+++ b/src/actix_session/storage/cookie.rs.html
@@ -118,11 +118,7 @@
 116
 117
 118
-119
-120
-
use std::convert::TryInto;
-
-use actix_web::cookie::time::Duration;
+
use actix_web::cookie::time::Duration;
 use anyhow::Error;
 
 use super::SessionKey;
diff --git a/src/actix_session/storage/redis_rs.rs.html b/src/actix_session/storage/redis_rs.rs.html
index 77378db1a..1110a1e27 100644
--- a/src/actix_session/storage/redis_rs.rs.html
+++ b/src/actix_session/storage/redis_rs.rs.html
@@ -341,15 +341,10 @@
 339
 340
 341
-342
-343
-344
-345
-346
-
use std::{convert::TryInto, sync::Arc};
+
use std::sync::Arc;
 
 use actix_web::cookie::time::Duration;
-use anyhow::{Context, Error};
+use anyhow::Error;
 use redis::{aio::ConnectionManager, AsyncCommands, Cmd, FromRedisValue, RedisResult, Value};
 
 use super::SessionKey;
@@ -574,12 +569,7 @@
 
         self.client
             .clone()
-            .expire(
-                &cache_key,
-                ttl.whole_seconds().try_into().context(
-                    "Failed to convert the state TTL into the number of whole seconds remaining",
-                )?,
-            )
+            .expire(&cache_key, ttl.whole_seconds())
             .await?;
         Ok(())
     }
diff --git a/src/actix_session/storage/session_key.rs.html b/src/actix_session/storage/session_key.rs.html
index 2c06b022e..e9566b8d8 100644
--- a/src/actix_session/storage/session_key.rs.html
+++ b/src/actix_session/storage/session_key.rs.html
@@ -55,12 +55,7 @@
 53
 54
 55
-56
-57
-58
-
use std::convert::TryFrom;
-
-use derive_more::{Display, From};
+
use derive_more::{Display, From};
 
 /// A session key, the string stored in a client-side cookie to associate a user with its session
 /// state on the backend.
@@ -70,7 +65,6 @@
 /// required to be smaller than 4064 bytes.
 ///
 /// ```rust
-/// # use std::convert::TryInto;
 /// use actix_session::storage::SessionKey;
 ///
 /// let key: String = std::iter::repeat('a').take(4065).collect();
diff --git a/src/actix_session/storage/utils.rs.html b/src/actix_session/storage/utils.rs.html
index eb27b1d22..9b2d4127b 100644
--- a/src/actix_session/storage/utils.rs.html
+++ b/src/actix_session/storage/utils.rs.html
@@ -17,11 +17,7 @@
 15
 16
 17
-18
-19
-
use std::convert::TryInto;
-
-use rand::{distributions::Alphanumeric, rngs::OsRng, Rng as _};
+
use rand::{distributions::Alphanumeric, rngs::OsRng, Rng as _};
 
 use crate::storage::SessionKey;