diff --git a/actix_cors/all.html b/actix_cors/all.html index 78949e827..00a80b198 100644 --- a/actix_cors/all.html +++ b/actix_cors/all.html @@ -1,2 +1,2 @@ -List of all items in this crate

List of all items

Structs

Enums

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

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 7645fbd83..c1f99f787 100644 --- a/actix_cors/enum.CorsError.html +++ b/actix_cors/enum.CorsError.html @@ -1,5 +1,5 @@ -CorsError in actix_cors - Rust
#[non_exhaustive]
+CorsError in actix_cors - Rust
#[non_exhaustive]
 pub enum CorsError {
     WildcardOrigin,
     MissingOrigin,
@@ -18,13 +18,13 @@ pub enum CorsError {
 

OriginNotAllowed

Origin is not allowed to make this request.

MethodNotAllowed

Request method is not allowed.

HeadersNotAllowed

One or more request headers are not allowed.

-

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

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

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_cors/index.html b/actix_cors/index.html index 545d1e391..809300c19 100644 --- a/actix_cors/index.html +++ b/actix_cors/index.html @@ -1,5 +1,5 @@ -actix_cors - Rust
Expand description

Cross-Origin Resource Sharing (CORS) controls for Actix Web.

+actix_cors - Rust

Crate actix_cors

source ·
Expand description

Cross-Origin Resource Sharing (CORS) controls for Actix Web.

This middleware can be applied to both applications and resources. Once built, a Cors builder can be used as an argument for Actix Web’s App::wrap(), Scope::wrap(), or Resource::wrap() methods.

@@ -14,12 +14,12 @@ the draft spec until it is finalized.
use actix_cors::Cors;
 use actix_web::{get, http, web, App, HttpRequest, HttpResponse, HttpServer};
 
-#[get("/index.html")]
+#[get("/index.html")]
 async fn index(req: HttpRequest) -> &'static str {
     "<p>Hello World!</p>"
 }
 
-#[actix_web::main]
+#[actix_web::main]
 async fn main() -> std::io::Result<()> {
     HttpServer::new(|| {
         let cors = Cors::default()
@@ -42,4 +42,4 @@ the draft spec until it is finalized.
 
     Ok(())
 }
-

Structs

Builder for CORS middleware.

Enums

Errors that can occur when processing CORS guarded requests.
\ No newline at end of file +

Structs

Builder for CORS middleware.

Enums

Errors that can occur when processing CORS guarded requests.
\ No newline at end of file diff --git a/actix_cors/struct.Cors.html b/actix_cors/struct.Cors.html index d82824af4..7b186056f 100644 --- a/actix_cors/struct.Cors.html +++ b/actix_cors/struct.Cors.html @@ -1,5 +1,5 @@ -Cors in actix_cors - Rust
pub struct Cors { /* private fields */ }
Expand description

Builder for CORS middleware.

+Cors in actix_cors - Rust

Struct actix_cors::Cors

source ·
pub struct Cors { /* private fields */ }
Expand description

Builder for CORS middleware.

To construct a CORS middleware, call Cors::default() to create a blank, restrictive builder. Then use any of the builder methods to customize CORS behavior.

The alternative Cors::permissive() constructor is available for local development, allowing @@ -126,4 +126,4 @@ not supported. No max age (will use browser’s default).

From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_identity/all.html b/actix_identity/all.html index 9a69fa085..cd865339b 100644 --- a/actix_identity/all.html +++ b/actix_identity/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/actix_identity/config/enum.LogoutBehaviour.html b/actix_identity/config/enum.LogoutBehaviour.html index fdd03add6..c714464f4 100644 --- a/actix_identity/config/enum.LogoutBehaviour.html +++ b/actix_identity/config/enum.LogoutBehaviour.html @@ -1,4 +1,4 @@ -LogoutBehaviour in actix_identity::config - Rust
#[non_exhaustive]
+LogoutBehaviour in actix_identity::config - Rust
#[non_exhaustive]
 pub enum LogoutBehaviour {
     PurgeSession,
     DeleteIdentityKeys,
@@ -19,4 +19,4 @@ is not tied to the user’s identity and should be retained after logout.

From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_identity/config/index.html b/actix_identity/config/index.html index cc40adc6a..16cda67b1 100644 --- a/actix_identity/config/index.html +++ b/actix_identity/config/index.html @@ -1,4 +1,4 @@ -actix_identity::config - Rust
Expand description

Configuration options to tune the behaviour of IdentityMiddleware.

+actix_identity::config - Rust

Module actix_identity::config

source ·
Expand description

Configuration options to tune the behaviour of IdentityMiddleware.

Structs

A fluent builder to construct an IdentityMiddleware instance with custom configuration parameters.

Enums

LogoutBehaviour controls what actions are going to be performed when Identity::logout is -invoked.
\ No newline at end of file +invoked.
\ No newline at end of file diff --git a/actix_identity/config/struct.IdentityMiddlewareBuilder.html b/actix_identity/config/struct.IdentityMiddlewareBuilder.html index 7597f620a..ebbbb47d9 100644 --- a/actix_identity/config/struct.IdentityMiddlewareBuilder.html +++ b/actix_identity/config/struct.IdentityMiddlewareBuilder.html @@ -1,4 +1,4 @@ -IdentityMiddlewareBuilder in actix_identity::config - Rust
pub struct IdentityMiddlewareBuilder { /* private fields */ }
Expand description

A fluent builder to construct an IdentityMiddleware instance with custom configuration +IdentityMiddlewareBuilder in actix_identity::config - Rust

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

A fluent builder to construct an IdentityMiddleware instance with custom configuration parameters.

Use IdentityMiddleware::builder to get started!

Implementations

Determines how Identity::logout affects the current session.

@@ -30,4 +30,4 @@ has passed since their last visit. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_identity/index.html b/actix_identity/index.html index 2b631d421..65ba54893 100644 --- a/actix_identity/index.html +++ b/actix_identity/index.html @@ -1,4 +1,4 @@ -actix_identity - Rust
Expand description

Identity management for Actix Web.

+actix_identity - Rust

Crate actix_identity

source ·
Expand description

Modules

Configuration options to tune the behaviour of IdentityMiddleware.

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 +

Modules

Configuration options to tune the behaviour of IdentityMiddleware.

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 diff --git a/actix_identity/struct.Identity.html b/actix_identity/struct.Identity.html index bfeac1908..42da718b5 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.

@@ -8,7 +8,7 @@ forcing a user log out.

}; use actix_identity::Identity; -#[get("/")] +#[get("/")] async fn index(user: Option<Identity>) -> impl Responder { if let Some(user) = user { format!("Welcome! {}", user.id().unwrap()) @@ -17,13 +17,13 @@ forcing a user log out.

} } -#[post("/login")] +#[post("/login")] async fn login(request: HttpRequest) -> impl Responder { Identity::login(&request.extensions(), "User1".into()); HttpResponse::Ok() } -#[post("/logout")] +#[post("/logout")] async fn logout(user: Identity) -> impl Responder { user.logout(); HttpResponse::Ok() @@ -38,7 +38,7 @@ control of the error path.

use actix_web::{http::header::LOCATION, get, HttpResponse, Responder};
 use actix_identity::Identity;
 
-#[get("/")]
+#[get("/")]
 async fn index(user: Option<Identity>) -> impl Responder {
     if let Some(user) = user {
         HttpResponse::Ok().finish()
@@ -54,7 +54,7 @@ control of the error path.

use actix_web::{get, Responder};
 use actix_identity::Identity;
 
-#[get("/")]
+#[get("/")]
 async fn index(user: Option<Identity>) -> impl Responder {
     if let Some(user) = user {
         format!("Welcome! {}", user.id().unwrap())
@@ -70,7 +70,7 @@ control of the error path.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_identity/struct.IdentityMiddleware.html b/actix_identity/struct.IdentityMiddleware.html index 49002252b..cca3272e6 100644 --- a/actix_identity/struct.IdentityMiddleware.html +++ b/actix_identity/struct.IdentityMiddleware.html @@ -1,11 +1,11 @@ -IdentityMiddleware in actix_identity - Rust
pub struct IdentityMiddleware { /* private fields */ }
Expand description

Identity management middleware.

+IdentityMiddleware in actix_identity - Rust
pub struct IdentityMiddleware { /* private fields */ }
Expand description

Identity management middleware.

use actix_web::{cookie::Key, App, HttpServer};
 use actix_session::storage::RedisSessionStore;
 use actix_identity::{Identity, IdentityMiddleware};
 use actix_session::{Session, SessionMiddleware};
 
-#[actix_web::main]
+#[actix_web::main]
 async fn main() {
     let secret_key = Key::generate();
     let redis_store = RedisSessionStore::new("redis://127.0.0.1:6379").await.unwrap();
@@ -28,4 +28,4 @@
 From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_identity/trait.IdentityExt.html b/actix_identity/trait.IdentityExt.html index 9d04925ca..e651ae4df 100644 --- a/actix_identity/trait.IdentityExt.html +++ b/actix_identity/trait.IdentityExt.html @@ -1,5 +1,5 @@ -IdentityExt in actix_identity - Rust
pub trait IdentityExt {
+IdentityExt in actix_identity - Rust
pub trait IdentityExt {
     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 0546f83b9..1c6a57407 100644 --- a/actix_limitation/all.html +++ b/actix_limitation/all.html @@ -1,2 +1,2 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ 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 26d4c43b4..c186dd272 100644 --- a/actix_limitation/constant.DEFAULT_COOKIE_NAME.html +++ b/actix_limitation/constant.DEFAULT_COOKIE_NAME.html @@ -1,3 +1,3 @@ -DEFAULT_COOKIE_NAME in actix_limitation - Rust
pub const DEFAULT_COOKIE_NAME: &'static str = "sid";
Expand description

Default cookie name.

-
\ No newline at end of file +DEFAULT_COOKIE_NAME in actix_limitation - Rust
pub const DEFAULT_COOKIE_NAME: &'static str = "sid";
Expand description

Default cookie name.

+
\ 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 7c3363ffa..0ff2dd738 100644 --- a/actix_limitation/constant.DEFAULT_PERIOD_SECS.html +++ b/actix_limitation/constant.DEFAULT_PERIOD_SECS.html @@ -1,3 +1,3 @@ -DEFAULT_PERIOD_SECS in actix_limitation - Rust
pub const DEFAULT_PERIOD_SECS: u64 = 3600;
Expand description

Default period (in seconds).

-
\ No newline at end of file +DEFAULT_PERIOD_SECS in actix_limitation - Rust
pub const DEFAULT_PERIOD_SECS: u64 = 3600;
Expand description

Default period (in seconds).

+
\ 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 5de3cf9c8..8319a39fa 100644 --- a/actix_limitation/constant.DEFAULT_REQUEST_LIMIT.html +++ b/actix_limitation/constant.DEFAULT_REQUEST_LIMIT.html @@ -1,3 +1,3 @@ -DEFAULT_REQUEST_LIMIT in actix_limitation - Rust
pub const DEFAULT_REQUEST_LIMIT: usize = 5000;
Expand description

Default request limit.

-
\ No newline at end of file +DEFAULT_REQUEST_LIMIT in actix_limitation - Rust
pub const DEFAULT_REQUEST_LIMIT: usize = 5000;
Expand description

Default request limit.

+
\ 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 31dc8e54e..c581285a0 100644 --- a/actix_limitation/constant.DEFAULT_SESSION_KEY.html +++ b/actix_limitation/constant.DEFAULT_SESSION_KEY.html @@ -1,3 +1,3 @@ -DEFAULT_SESSION_KEY in actix_limitation - Rust
pub const DEFAULT_SESSION_KEY: &'static str = "rate-api-id";
Expand description

Default session key.

-
\ No newline at end of file +DEFAULT_SESSION_KEY in actix_limitation - Rust
pub const DEFAULT_SESSION_KEY: &'static str = "rate-api-id";
Expand description

Default session key.

+
\ No newline at end of file diff --git a/actix_limitation/enum.Error.html b/actix_limitation/enum.Error.html index 2147faf9f..c09b04e7b 100644 --- a/actix_limitation/enum.Error.html +++ b/actix_limitation/enum.Error.html @@ -1,5 +1,5 @@ -Error in actix_limitation - Rust
pub enum Error {
+Error in actix_limitation - Rust
pub enum Error {
     Client(RedisError),
     LimitExceeded(Status),
     Time(ComponentRange),
@@ -9,13 +9,13 @@
 

LimitExceeded(Status)

Limit is exceeded for a key.

Time(ComponentRange)

Time conversion failed.

Other(String)

Generic error.

-

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.

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.

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

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_limitation/index.html b/actix_limitation/index.html index 69f57b9a3..d76aac40c 100644 --- a/actix_limitation/index.html +++ b/actix_limitation/index.html @@ -1,5 +1,5 @@ -actix_limitation - Rust
Expand description

Rate limiter using a fixed window counter for arbitrary keys, backed by Redis for Actix Web.

+actix_limitation - Rust

Crate actix_limitation

source ·
Expand description

Rate limiter using a fixed window counter for arbitrary keys, backed by Redis for Actix Web.

[dependencies]
 actix-web = "4"
 actix-limitation = "0.4"
@@ -8,12 +8,12 @@ actix-limitation = "0.4"
use actix_session::SessionExt as _; use actix_limitation::{Limiter, RateLimiter}; -#[get("/{id}/{name}")] +#[get("/{id}/{name}")] async fn index(info: web::Path<(u32, String)>) -> impl Responder { format!("Hello {}! id:{}", info.1, info.0) } -#[actix_web::main] +#[actix_web::main] async fn main() -> std::io::Result<()> { let limiter = web::Data::new( Limiter::builder("redis://127.0.0.1") @@ -38,4 +38,4 @@ actix-limitation = "0.4"
.run() .await }
-

Structs

Rate limiter builder.
Rate limiter.
Rate limit middleware.
A report for a given key containing the limit status.

Enums

Failure modes of the rate limiter.

Constants

Default cookie name.
Default period (in seconds).
Default request limit.
Default session key.
\ No newline at end of file +

Structs

Rate limiter builder.
Rate limiter.
Rate limit middleware.
A report for a given key containing the limit status.

Enums

Failure modes of the rate limiter.

Constants

Default cookie name.
Default period (in seconds).
Default request limit.
Default session key.
\ No newline at end of file diff --git a/actix_limitation/struct.Builder.html b/actix_limitation/struct.Builder.html index c9058a540..732787400 100644 --- a/actix_limitation/struct.Builder.html +++ b/actix_limitation/struct.Builder.html @@ -1,5 +1,5 @@ -Builder in actix_limitation - Rust
pub struct Builder { /* private fields */ }
Expand description

Rate limiter builder.

+Builder in actix_limitation - Rust
pub struct Builder { /* private fields */ }
Expand description

Rate limiter builder.

Implementations

Set upper limit.

Set limit window/period.

Sets rate limit key derivation function.

@@ -19,4 +19,4 @@ From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_limitation/struct.Limiter.html b/actix_limitation/struct.Limiter.html index f4e4b548d..d49af7038 100644 --- a/actix_limitation/struct.Limiter.html +++ b/actix_limitation/struct.Limiter.html @@ -1,5 +1,5 @@ -Limiter in actix_limitation - Rust
pub struct Limiter { /* private fields */ }
Expand description

Rate limiter.

+Limiter in actix_limitation - Rust
pub struct Limiter { /* private fields */ }
Expand description

Rate limiter.

Implementations

Construct rate limiter builder with defaults.

See redis-rs docs on connection parameters for how to set the Redis URL.

@@ -12,4 +12,4 @@ parameters for how to set the Redis URL.

From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_limitation/struct.RateLimiter.html b/actix_limitation/struct.RateLimiter.html index a47023c0a..27c9d6a1b 100644 --- a/actix_limitation/struct.RateLimiter.html +++ b/actix_limitation/struct.RateLimiter.html @@ -1,5 +1,5 @@ -RateLimiter in actix_limitation - Rust
#[non_exhaustive]
pub struct RateLimiter;
Expand description

Rate limit middleware.

+RateLimiter in actix_limitation - Rust
#[non_exhaustive]
pub struct RateLimiter;
Expand description

Rate limit middleware.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Responses produced by the service.
Errors produced by the service.
The TransformService value created by this factory
Errors produced while building a transform service.
The future response value.
Creates and returns a new Transform component, asynchronously

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 @@ -8,4 +8,4 @@ From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_limitation/struct.Status.html b/actix_limitation/struct.Status.html index bfe2f072f..73ad985dc 100644 --- a/actix_limitation/struct.Status.html +++ b/actix_limitation/struct.Status.html @@ -1,5 +1,5 @@ -Status in actix_limitation - Rust
pub struct Status { /* private fields */ }
Expand description

A report for a given key containing the limit status.

+Status in actix_limitation - Rust
pub struct Status { /* private fields */ }
Expand description

A report for a given key containing the limit status.

Implementations

Returns the maximum number of requests allowed in the current period.

Returns how many requests are left in the current period.

Returns a UNIX timestamp in UTC approximately when the next period will begin.

@@ -11,4 +11,4 @@ From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_protobuf/all.html b/actix_protobuf/all.html index f180e3b7b..222984777 100644 --- a/actix_protobuf/all.html +++ b/actix_protobuf/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/actix_protobuf/enum.ProtoBufPayloadError.html b/actix_protobuf/enum.ProtoBufPayloadError.html index f636d12fe..c954bc830 100644 --- a/actix_protobuf/enum.ProtoBufPayloadError.html +++ b/actix_protobuf/enum.ProtoBufPayloadError.html @@ -1,15 +1,15 @@ -ProtoBufPayloadError in actix_protobuf - Rust
pub enum ProtoBufPayloadError {
+ProtoBufPayloadError in actix_protobuf - Rust
pub enum ProtoBufPayloadError {
     Overflow,
     ContentType,
-    Serialize(ProtoBufEncodeError),
-    Deserialize(ProtoBufDecodeError),
+    Serialize(ProtoBufEncodeError),
+    Deserialize(ProtoBufDecodeError),
     Payload(PayloadError),
 }

Variants

Overflow

Payload size is bigger than 256k

ContentType

Content type error

-

Serialize(ProtoBufEncodeError)

Serialize error

-

Deserialize(ProtoBufDecodeError)

Deserialize error

+

Serialize(ProtoBufEncodeError)

Serialize error

+

Deserialize(ProtoBufDecodeError)

Deserialize error

Payload(PayloadError)

Payload error

-

Trait Implementations

Formats the value using the given formatter. 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.
Creates full response for error. Read more
Returns appropriate status code 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
Converts to this type from the input type.
Converts to this type from the input type.
Creates full response for error. Read more
Returns appropriate status code 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).

@@ -17,4 +17,4 @@ From<T> for U chooses to do.

Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_protobuf/index.html b/actix_protobuf/index.html index 5d9d7da25..5430da34a 100644 --- a/actix_protobuf/index.html +++ b/actix_protobuf/index.html @@ -1,2 +1,2 @@ -actix_protobuf - Rust
\ No newline at end of file +actix_protobuf - Rust
\ No newline at end of file diff --git a/actix_protobuf/struct.ProtoBuf.html b/actix_protobuf/struct.ProtoBuf.html index c7a7ebc71..55f9ebaea 100644 --- a/actix_protobuf/struct.ProtoBuf.html +++ b/actix_protobuf/struct.ProtoBuf.html @@ -1,4 +1,4 @@ -ProtoBuf in actix_protobuf - Rust
pub struct ProtoBuf<T: Message>(pub T);

Tuple Fields

0: T

Trait Implementations

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Formats the value using the given formatter. Read more
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
Convert self to HttpResponse.
Wraps responder to allow alteration of its response. 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.

+ProtoBuf in actix_protobuf - Rust
pub struct ProtoBuf<T: Message>(pub T);

Tuple Fields

0: T

Trait Implementations

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Formats the value using the given formatter. Read more
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
Convert self to HttpResponse.
Wraps responder to allow alteration of its response. 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).

@@ -6,4 +6,4 @@ From<T> for U chooses to do.

Type of resource’s path returned in resource_path.
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_protobuf/struct.ProtoBufConfig.html b/actix_protobuf/struct.ProtoBufConfig.html index bf8a60471..d68071cf2 100644 --- a/actix_protobuf/struct.ProtoBufConfig.html +++ b/actix_protobuf/struct.ProtoBufConfig.html @@ -1,4 +1,4 @@ -ProtoBufConfig in actix_protobuf - Rust
pub struct ProtoBufConfig { /* private fields */ }

Implementations

Change max size of payload. By default max size is 256Kb

+ProtoBufConfig in actix_protobuf - Rust
pub struct ProtoBufConfig { /* private fields */ }

Implementations

Change max size of payload. By default max size is 256Kb

Trait Implementations

Returns the “default value” for a type. 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 @@ -7,4 +7,4 @@ From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_protobuf/struct.ProtoBufMessage.html b/actix_protobuf/struct.ProtoBufMessage.html index 27f1654f5..731321a5a 100644 --- a/actix_protobuf/struct.ProtoBufMessage.html +++ b/actix_protobuf/struct.ProtoBufMessage.html @@ -1,6 +1,6 @@ -ProtoBufMessage in actix_protobuf - Rust
pub struct ProtoBufMessage<T: Message + Default> { /* private fields */ }

Implementations

Create ProtoBufMessage for request.

+ProtoBufMessage in actix_protobuf - Rust
pub struct ProtoBufMessage<T: Message + Default> { /* private fields */ }

Implementations

Create ProtoBufMessage for request.

Change max size of payload. By default max size is 256Kb

-

Trait Implementations

The type of value produced on completion.
Attempt to resolve the future to a final value, registering +

Trait Implementations

The type of value produced on completion.
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. 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.

Map this future’s output to a different type, returning a new future of the resulting type. Read more
Map this future’s output to a different type, returning a new future of @@ -34,4 +34,4 @@ future is a stream. Read more
Future. Read more
A convenience method for calling [TryFuture::try_poll] on Unpin future types. Read more
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_protobuf/trait.ProtoBufResponseBuilder.html b/actix_protobuf/trait.ProtoBufResponseBuilder.html index 4ed1503ba..9fc54c507 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 +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 diff --git a/actix_redis/all.html b/actix_redis/all.html index e277e9b48..dc750b19b 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 fa80fce48..b21237d60 100644 --- a/actix_redis/enum.Error.html +++ b/actix_redis/enum.Error.html @@ -1,17 +1,17 @@ -Error in actix_redis - Rust
pub enum Error {
+Error in actix_redis - Rust

Enum actix_redis::Error

source ·
pub enum Error {
     Redis(Error),
     NotConnected,
     Disconnected,
 }
Expand description

General purpose actix-redis error.

Variants

Redis(Error)

NotConnected

Receiving message during reconnecting.

Disconnected

Cancel all waiters when connection is dropped.

-

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

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_redis/enum.RespError.html b/actix_redis/enum.RespError.html index daec86da8..33bc9a5a0 100644 --- a/actix_redis/enum.RespError.html +++ b/actix_redis/enum.RespError.html @@ -1,4 +1,4 @@ -RespError in actix_redis - Rust
pub enum RespError {
+RespError in actix_redis - Rust
pub enum RespError {
     Internal(String),
     IO(Error),
     Resp(StringOption<RespValue>),
@@ -16,13 +16,13 @@ chains of futures; but it occurring at runtime should be considered a catastroph
 failure.

If any error is propagated this way that needs to be handled, then it should be made into a proper option.

-

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.

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.

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

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_redis/enum.RespValue.html b/actix_redis/enum.RespValue.html index 975616b8b..ce41929fa 100644 --- a/actix_redis/enum.RespValue.html +++ b/actix_redis/enum.RespValue.html @@ -1,4 +1,4 @@ -RespValue in actix_redis - Rust

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.
Return a Result containing either Self or Error. Errors can occur due to either: a) the particular +

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.
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 by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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
Compare self to key and return true if they are equal.

Returns the argument unchanged.

@@ -30,4 +30,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_redis/index.html b/actix_redis/index.html index 107c7049d..2973141f6 100644 --- a/actix_redis/index.html +++ b/actix_redis/index.html @@ -1,3 +1,3 @@ -actix_redis - Rust
Expand description

Redis integration for actix.

+actix_redis - Rust

Crate actix_redis

source ·
Expand description

Redis integration for actix.

Macros

Macro to create a RESP array, useful for preparing commands to send. Elements can be any type, or a mixture -of types, that satisfy Into<RespValue>.

Structs

Command for sending data to Redis.
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 +of types, that satisfy Into<RespValue>.

Structs

Command for sending data to Redis.
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 diff --git a/actix_redis/macro.resp_array.html b/actix_redis/macro.resp_array.html index 632c45bef..a4b05e655 100644 --- a/actix_redis/macro.resp_array.html +++ b/actix_redis/macro.resp_array.html @@ -1,4 +1,4 @@ -resp_array in actix_redis - Rust
macro_rules! resp_array {
+resp_array in actix_redis - Rust
macro_rules! resp_array {
     ($($e:expr),* $(,)?) => { ... };
 }
Expand description

Macro to create a RESP array, useful for preparing commands to send. Elements can be any type, or a mixture @@ -6,7 +6,7 @@ of types, that satisfy Into<RespValue>.

As a general rule, if a value is moved, the data can be deconstructed (if appropriate, e.g. String) and the raw data moved into the corresponding RespValue. If a reference is provided, the data will be copied instead.

Examples

-
#[macro_use]
+
#[macro_use]
 extern crate redis_async;
 
 fn main() {
@@ -15,11 +15,11 @@ data moved into the corresponding RespValue.  If a reference is pro
 }

For variable length Redis commands:

-
#[macro_use]
+
#[macro_use]
 extern crate redis_async;
 
 fn main() {
     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 1acd82980..2a212df65 100644 --- a/actix_redis/struct.Command.html +++ b/actix_redis/struct.Command.html @@ -1,4 +1,4 @@ -Command in actix_redis - Rust
pub struct Command(pub RespValue);
Expand description

Command for sending data to Redis.

+Command in actix_redis - Rust

Struct actix_redis::Command

source ·
pub struct Command(pub RespValue);
Expand description

Command for sending data to Redis.

Tuple Fields

0: RespValue

Trait Implementations

Formats the value using the given formatter. Read more
The type of value that this handler will return. Read more
This method is called for every message received by this actor.
The type of value that this message will resolved with if it is successful. 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 @@ -8,4 +8,4 @@ successful. Read more

From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_redis/struct.RedisActor.html b/actix_redis/struct.RedisActor.html index 6cbbc7dcb..d31b4bf5f 100644 --- a/actix_redis/struct.RedisActor.html +++ b/actix_redis/struct.RedisActor.html @@ -1,4 +1,4 @@ -RedisActor in actix_redis - Rust
pub struct RedisActor { /* private fields */ }
Expand description

Redis communication actor.

+RedisActor in actix_redis - Rust

Struct actix_redis::RedisActor

source ·
pub struct RedisActor { /* private fields */ }
Expand description

Redis communication actor.

Implementations

Start new Supervisor with RedisActor.

Trait Implementations

Actor execution context type
Called when an actor gets polled the first time.
Called after an actor is in Actor::Stopping state. Read more
Called after an actor is stopped. Read more
Start a new asynchronous actor, returning its address. Read more
Start new actor in arbiter’s thread.
Start a new asynchronous actor given a Context. Read more
The type of value that this handler will return. Read more
This method is called for every message received by this actor.
Called for every message emitted by the stream.
Called when stream emits first item. Read more
Called when stream finishes. Read more
Called when the supervisor restarts a failed actor.
Called when the writer emits error. Read more
Called when the writer finishes. 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 @@ -8,4 +8,4 @@ From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/all.html b/actix_session/all.html index 1e1717b2a..50e86e118 100644 --- a/actix_session/all.html +++ b/actix_session/all.html @@ -1,2 +1,2 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/actix_session/config/enum.CookieContentSecurity.html b/actix_session/config/enum.CookieContentSecurity.html index 842493efb..eab066bb3 100644 --- a/actix_session/config/enum.CookieContentSecurity.html +++ b/actix_session/config/enum.CookieContentSecurity.html @@ -1,5 +1,5 @@ -CookieContentSecurity in actix_session::config - Rust
pub enum CookieContentSecurity {
+CookieContentSecurity in actix_session::config - Rust
pub enum CookieContentSecurity {
     Private,
     Signed,
 }
Expand description

Determines how to secure the content of the session cookie.

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

From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/config/enum.SessionLifecycle.html b/actix_session/config/enum.SessionLifecycle.html index 22febbe8a..bcade24e5 100644 --- a/actix_session/config/enum.SessionLifecycle.html +++ b/actix_session/config/enum.SessionLifecycle.html @@ -1,5 +1,5 @@ -SessionLifecycle in actix_session::config - Rust
#[non_exhaustive]
+SessionLifecycle in actix_session::config - Rust
#[non_exhaustive]
 pub enum SessionLifecycle {
     BrowserSession(BrowserSession),
     PersistentSession(PersistentSession),
@@ -21,4 +21,4 @@ attribute. They do not disappear when the current browser session ends.

From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/config/enum.TtlExtensionPolicy.html b/actix_session/config/enum.TtlExtensionPolicy.html index 6686098cd..b9278a8a3 100644 --- a/actix_session/config/enum.TtlExtensionPolicy.html +++ b/actix_session/config/enum.TtlExtensionPolicy.html @@ -1,5 +1,5 @@ -TtlExtensionPolicy in actix_session::config - Rust
#[non_exhaustive]
+TtlExtensionPolicy in actix_session::config - Rust
#[non_exhaustive]
 pub enum TtlExtensionPolicy {
     OnEveryRequest,
     OnStateChanges,
@@ -25,4 +25,4 @@ your server.

From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/config/index.html b/actix_session/config/index.html index c5431811d..c259a847f 100644 --- a/actix_session/config/index.html +++ b/actix_session/config/index.html @@ -1,4 +1,4 @@ -actix_session::config - Rust
Expand description

Configuration options to tune the behaviour of SessionMiddleware.

+actix_session::config - Rust

Module actix_session::config

source ·
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, 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 +browser’s current session ends.
A session lifecycle strategy where the session cookie will be persistent.
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 diff --git a/actix_session/config/struct.BrowserSession.html b/actix_session/config/struct.BrowserSession.html index 7e66e97a3..4c6e19a11 100644 --- a/actix_session/config/struct.BrowserSession.html +++ b/actix_session/config/struct.BrowserSession.html @@ -1,5 +1,5 @@ -BrowserSession in actix_session::config - Rust
pub struct BrowserSession { /* private fields */ }
Expand description

A session lifecycle strategy where the session cookie expires when the +BrowserSession in actix_session::config - Rust

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 @@ -34,4 +34,4 @@ specifying a more aggressive state TTL extension policy - check out From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/config/struct.PersistentSession.html b/actix_session/config/struct.PersistentSession.html index 826a06a99..044e16d79 100644 --- a/actix_session/config/struct.PersistentSession.html +++ b/actix_session/config/struct.PersistentSession.html @@ -1,5 +1,5 @@ -PersistentSession in actix_session::config - Rust
pub struct PersistentSession { /* private fields */ }
Expand description

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

+PersistentSession in actix_session::config - Rust
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.

Due to its Into<SessionLifecycle> implementation, a PersistentSession can be passed directly @@ -34,4 +34,4 @@ See TtlE From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/config/struct.SessionMiddlewareBuilder.html b/actix_session/config/struct.SessionMiddlewareBuilder.html index fd3ab63ca..f79820223 100644 --- a/actix_session/config/struct.SessionMiddlewareBuilder.html +++ b/actix_session/config/struct.SessionMiddlewareBuilder.html @@ -1,5 +1,5 @@ -SessionMiddlewareBuilder in actix_session::config - Rust
pub struct SessionMiddlewareBuilder<Store: SessionStore> { /* private fields */ }
Expand description

A fluent, customized SessionMiddleware builder.

+SessionMiddlewareBuilder in actix_session::config - Rust
pub struct SessionMiddlewareBuilder<Store: SessionStore> { /* private fields */ }
Expand description

A fluent, customized SessionMiddleware builder.

Implementations

Set the name of the cookie used to store the session ID.

Defaults to id.

Set the Secure attribute for the cookie used to store the session ID.

@@ -56,4 +56,4 @@ running in the browser.

From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/enum.SessionStatus.html b/actix_session/enum.SessionStatus.html index 670fd36eb..a14a05cce 100644 --- a/actix_session/enum.SessionStatus.html +++ b/actix_session/enum.SessionStatus.html @@ -1,5 +1,5 @@ -SessionStatus in actix_session - Rust
pub enum SessionStatus {
+SessionStatus in actix_session - Rust
pub enum SessionStatus {
     Changed,
     Purged,
     Renewed,
@@ -23,4 +23,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/index.html b/actix_session/index.html index d082c1fe1..cc7ee4ae1 100644 --- a/actix_session/index.html +++ b/actix_session/index.html @@ -1,5 +1,5 @@ -actix_session - Rust
Expand description

Session management for Actix Web.

+actix_session - Rust

Crate actix_session

source ·
Expand description

Session management for Actix Web.

The HTTP protocol, at a first glance, is stateless: the client sends a request, the server parses its content, performs some processing and returns a response. The outcome is only influenced by the provided inputs (i.e. the request content) and whatever state the server @@ -37,7 +37,7 @@ as a middleware on your App:

use actix_session::{Session, SessionMiddleware, storage::RedisActorSessionStore}; use actix_web::cookie::Key; -#[actix_web::main] +#[actix_web::main] async fn main() -> std::io::Result<()> { // The secret key would usually be read from a configuration file/environment variables. let secret_key = Key::generate(); @@ -100,4 +100,4 @@ actix-session = { version = "...", features = ["redis-rs-session&

You can implement your own session storage backend using the SessionStore trait.

Modules

Configuration options to tune the behaviour of SessionMiddleware.
Pluggable storage backends for session state.

Structs

The primary interface to access and modify session state.
Error returned by Session::get.
A middleware for session management in Actix Web applications.

Enums

Traits

Extract a Session object from various actix-web types (e.g. HttpRequest, -ServiceRequest, ServiceResponse).
\ No newline at end of file +ServiceRequest, ServiceResponse).
\ No newline at end of file diff --git a/actix_session/storage/enum.LoadError.html b/actix_session/storage/enum.LoadError.html index f6f43c034..ff0d12890 100644 --- a/actix_session/storage/enum.LoadError.html +++ b/actix_session/storage/enum.LoadError.html @@ -1,17 +1,17 @@ -LoadError in actix_session::storage - Rust
pub enum LoadError {
+LoadError in actix_session::storage - Rust
pub enum LoadError {
     Deserialization(Error),
     Other(Error),
 }
Expand description

Possible failures modes for SessionStore::load.

Variants

Deserialization(Error)

Failed to deserialize session state.

Other(Error)

Something went wrong when retrieving the session state.

-

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.

+

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.

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

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/storage/enum.SaveError.html b/actix_session/storage/enum.SaveError.html index 674f3696e..349c05c0d 100644 --- a/actix_session/storage/enum.SaveError.html +++ b/actix_session/storage/enum.SaveError.html @@ -1,17 +1,17 @@ -SaveError in actix_session::storage - Rust
pub enum SaveError {
+SaveError in actix_session::storage - Rust
pub enum SaveError {
     Serialization(Error),
     Other(Error),
 }
Expand description

Possible failures modes for SessionStore::save.

Variants

Serialization(Error)

Failed to serialize session state.

Other(Error)

Something went wrong when persisting the session state.

-

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.

+

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.

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

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/storage/enum.UpdateError.html b/actix_session/storage/enum.UpdateError.html index 957cd9a45..04af75aee 100644 --- a/actix_session/storage/enum.UpdateError.html +++ b/actix_session/storage/enum.UpdateError.html @@ -1,17 +1,17 @@ -UpdateError in actix_session::storage - Rust
pub enum UpdateError {
+UpdateError in actix_session::storage - Rust
pub enum UpdateError {
     Serialization(Error),
     Other(Error),
 }
Expand description

Possible failures modes for SessionStore::update.

Variants

Serialization(Error)

Failed to serialize session state.

Other(Error)

Something went wrong when updating the session state.

-

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.

+

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.

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

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/storage/index.html b/actix_session/storage/index.html index 733ceb803..d0d4353ad 100644 --- a/actix_session/storage/index.html +++ b/actix_session/storage/index.html @@ -1,6 +1,6 @@ -actix_session::storage - Rust
Expand description

Pluggable storage backends for session state.

+actix_session::storage - Rust

Module actix_session::storage

source ·
Expand description

Pluggable storage backends for session state.

Structs

Use the session key, stored in the session cookie, as storage backend for the session state.
Use Redis as session storage backend.
A fluent builder to construct a RedisActorSessionStore instance with custom configuration parameters.
Use Redis as session storage backend.
A fluent builder to construct a RedisSessionStore instance with custom configuration parameters.
A session key, the string stored in a client-side cookie to associate a user with its session -state on the backend.

Enums

Possible failures modes for SessionStore::load.
Possible failures modes for SessionStore::save.
Possible failures modes for SessionStore::update.

Traits

The interface to retrieve and save the current session data from/to the chosen storage backend.
\ No newline at end of file +state on the backend.

Enums

Possible failures modes for SessionStore::load.
Possible failures modes for SessionStore::save.
Possible failures modes for SessionStore::update.

Traits

The interface to retrieve and save the current session data from/to the chosen storage backend.
\ No newline at end of file diff --git a/actix_session/storage/struct.CookieSessionStore.html b/actix_session/storage/struct.CookieSessionStore.html index 3ae618212..53e59785d 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.

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

use actix_web::{cookie::Key, web, App, HttpServer, HttpResponse, Error};
 use actix_session::{SessionMiddleware, storage::CookieSessionStore};
@@ -9,7 +9,7 @@
     // [...]
 }
 
-#[actix_web::main]
+#[actix_web::main]
 async fn main() -> std::io::Result<()> {
     let secret_key = get_secret_key();
     HttpServer::new(move ||
@@ -37,4 +37,4 @@ storage backend.

From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/storage/struct.RedisActorSessionStore.html b/actix_session/storage/struct.RedisActorSessionStore.html index 3facef87d..8f2819bc0 100644 --- a/actix_session/storage/struct.RedisActorSessionStore.html +++ b/actix_session/storage/struct.RedisActorSessionStore.html @@ -1,5 +1,5 @@ -RedisActorSessionStore in actix_session::storage - Rust
pub struct RedisActorSessionStore { /* private fields */ }
Expand description

Use Redis as session storage backend.

+RedisActorSessionStore in actix_session::storage - Rust
pub struct RedisActorSessionStore { /* private fields */ }
Expand description

Use Redis as session storage backend.

use actix_web::{web, App, HttpServer, HttpResponse, Error};
 use actix_session::{SessionMiddleware, storage::RedisActorSessionStore};
@@ -10,7 +10,7 @@
     // [...]
 }
 
-#[actix_web::main]
+#[actix_web::main]
 async fn main() -> std::io::Result<()> {
     let secret_key = get_secret_key();
     let redis_connection_string = "127.0.0.1:6379";
@@ -47,4 +47,4 @@ connection string for Redis.

From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/storage/struct.RedisActorSessionStoreBuilder.html b/actix_session/storage/struct.RedisActorSessionStoreBuilder.html index cb05a610e..99743deab 100644 --- a/actix_session/storage/struct.RedisActorSessionStoreBuilder.html +++ b/actix_session/storage/struct.RedisActorSessionStoreBuilder.html @@ -1,5 +1,5 @@ -RedisActorSessionStoreBuilder in actix_session::storage - Rust
pub struct RedisActorSessionStoreBuilder { /* private fields */ }
Expand description

A fluent builder to construct a RedisActorSessionStore instance with custom configuration +RedisActorSessionStoreBuilder in actix_session::storage - Rust

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

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

Implementations

Set a custom cache key generation strategy, expecting a session key as input.

Finalise the builder and return a RedisActorSessionStore instance.

@@ -11,4 +11,4 @@ parameters.

From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/storage/struct.RedisSessionStore.html b/actix_session/storage/struct.RedisSessionStore.html index 1041dec5f..7493ef040 100644 --- a/actix_session/storage/struct.RedisSessionStore.html +++ b/actix_session/storage/struct.RedisSessionStore.html @@ -1,5 +1,5 @@ -RedisSessionStore in actix_session::storage - Rust
pub struct RedisSessionStore { /* private fields */ }
Expand description

Use Redis as session storage backend.

+RedisSessionStore in actix_session::storage - Rust
pub struct RedisSessionStore { /* private fields */ }
Expand description

Use Redis as session storage backend.

use actix_web::{web, App, HttpServer, HttpResponse, Error};
 use actix_session::{SessionMiddleware, storage::RedisSessionStore};
@@ -10,7 +10,7 @@
     // [...]
 }
 
-#[actix_web::main]
+#[actix_web::main]
 async fn main() -> std::io::Result<()> {
     let secret_key = get_secret_key();
     let redis_connection_string = "redis://127.0.0.1:6379";
@@ -51,4 +51,4 @@ connection string for Redis.

From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/storage/struct.RedisSessionStoreBuilder.html b/actix_session/storage/struct.RedisSessionStoreBuilder.html index 73717373f..d5ef0a812 100644 --- a/actix_session/storage/struct.RedisSessionStoreBuilder.html +++ b/actix_session/storage/struct.RedisSessionStoreBuilder.html @@ -1,5 +1,5 @@ -RedisSessionStoreBuilder in actix_session::storage - Rust
pub struct RedisSessionStoreBuilder { /* private fields */ }
Expand description

A fluent builder to construct a RedisSessionStore instance with custom configuration +RedisSessionStoreBuilder in actix_session::storage - Rust

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

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

Implementations

Set a custom cache key generation strategy, expecting a session key as input.

Finalise the builder and return a RedisActorSessionStore instance.

@@ -11,4 +11,4 @@ parameters.

From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/storage/struct.SessionKey.html b/actix_session/storage/struct.SessionKey.html index fe32fb857..1146d89cc 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(_);
Expand description

A session key, the string stored in a client-side cookie to associate a user with its session +SessionKey in actix_session::storage - Rust

pub struct SessionKey(_);
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 @@ -20,4 +20,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/storage/trait.SessionStore.html b/actix_session/storage/trait.SessionStore.html index e8805adaa..74a3d45c4 100644 --- a/actix_session/storage/trait.SessionStore.html +++ b/actix_session/storage/trait.SessionStore.html @@ -1,5 +1,5 @@ -SessionStore in actix_session::storage - Rust
pub trait SessionStore {
+SessionStore in actix_session::storage - Rust
pub trait SessionStore {
     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
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; 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
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn update<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_key: SessionKey,
        session_state: HashMap<String, String>,
        ttl: &'life1 Duration
    ) -> Pin<Box<dyn Future<Output = Result<SessionKey, UpdateError>> + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; @@ -16,4 +16,4 @@ is required for implementations, too. In particular, we use the send-optional va

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

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

Deletes a session from the store.

-

Implementors

\ No newline at end of file +

Implementors

\ No newline at end of file diff --git a/actix_session/struct.Session.html b/actix_session/struct.Session.html index 68c4666b0..cd4e1f458 100644 --- a/actix_session/struct.Session.html +++ b/actix_session/struct.Session.html @@ -1,5 +1,5 @@ -Session in actix_session - Rust
pub struct Session(_);
Expand description

The primary interface to access and modify session state.

+Session in actix_session - Rust

Struct actix_session::Session

source ·
pub struct Session(_);
Expand description

The primary interface to access and modify session state.

Session is an extractor—you can specify it as an input type for your request handlers and it will be automatically extracted from the incoming request.

@@ -38,7 +38,7 @@ otherwise returns un-deserialized JSON string.

Examples

use actix_session::Session;
 
-#[get("/")]
+#[get("/")]
 async fn index(session: Session) -> Result<impl Responder> {
     // access session data
     if let Some(count) = session.get::<i32>("counter")? {
@@ -58,4 +58,4 @@ otherwise returns un-deserialized JSON string.

From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/struct.SessionGetError.html b/actix_session/struct.SessionGetError.html index a264b2949..96488bee7 100644 --- a/actix_session/struct.SessionGetError.html +++ b/actix_session/struct.SessionGetError.html @@ -1,12 +1,12 @@ -SessionGetError in actix_session - Rust
pub struct SessionGetError(_);
Expand description

Error returned by Session::get.

-

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.
Creates full response for error. Read more
Returns appropriate status code 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.

+SessionGetError in actix_session - Rust
pub struct SessionGetError(_);
Expand description

Error returned by Session::get.

+

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.
Creates full response for error. Read more
Returns appropriate status code 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).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/struct.SessionInsertError.html b/actix_session/struct.SessionInsertError.html index 0f2a26387..1bafdcb81 100644 --- a/actix_session/struct.SessionInsertError.html +++ b/actix_session/struct.SessionInsertError.html @@ -1,12 +1,12 @@ -SessionInsertError in actix_session - Rust
pub struct SessionInsertError(_);
Expand description

Error returned by Session::insert.

-

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.
Creates full response for error. Read more
Returns appropriate status code 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.

+SessionInsertError in actix_session - Rust
pub struct SessionInsertError(_);
Expand description

Error returned by Session::insert.

+

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.
Creates full response for error. Read more
Returns appropriate status code 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).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/struct.SessionMiddleware.html b/actix_session/struct.SessionMiddleware.html index 275755670..0c807a8d4 100644 --- a/actix_session/struct.SessionMiddleware.html +++ b/actix_session/struct.SessionMiddleware.html @@ -1,5 +1,5 @@ -SessionMiddleware in actix_session - Rust
pub struct SessionMiddleware<Store: SessionStore> { /* private fields */ }
Expand description

A middleware for session management in Actix Web applications.

+SessionMiddleware in actix_session - Rust
pub struct SessionMiddleware<Store: SessionStore> { /* private fields */ }
Expand description

A middleware for session management in Actix Web applications.

SessionMiddleware takes care of a few jobs:

  • Instructs the session storage backend to create/update/delete/retrieve the state attached to @@ -31,7 +31,7 @@ reasonably secure implementation of sessions.

    // [...] } -#[actix_web::main] +#[actix_web::main] async fn main() -> std::io::Result<()> { let secret_key = get_secret_key(); let redis_connection_string = "127.0.0.1:6379"; @@ -60,7 +60,7 @@ reasonably secure implementation of sessions.

    // [...] } -#[actix_web::main] +#[actix_web::main] async fn main() -> std::io::Result<()> { let secret_key = get_secret_key(); let redis_connection_string = "127.0.0.1:6379"; @@ -106,4 +106,4 @@ parameters.

    From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_session/trait.SessionExt.html b/actix_session/trait.SessionExt.html index 5de6847f0..0350762e0 100644 --- a/actix_session/trait.SessionExt.html +++ b/actix_session/trait.SessionExt.html @@ -1,7 +1,7 @@ -SessionExt in actix_session - Rust
pub trait SessionExt {
+SessionExt in actix_session - Rust
pub trait SessionExt {
     fn get_session(&self) -> Session;
 }
Expand description

Extract a Session object from various actix-web types (e.g. HttpRequest, ServiceRequest, ServiceResponse).

Required Methods

Extract a Session object.

-

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_settings/all.html b/actix_settings/all.html index b5c0f1a50..459302085 100644 --- a/actix_settings/all.html +++ b/actix_settings/all.html @@ -1,2 +1,2 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/actix_settings/enum.Backlog.html b/actix_settings/enum.Backlog.html index c007914ae..2685c57d9 100644 --- a/actix_settings/enum.Backlog.html +++ b/actix_settings/enum.Backlog.html @@ -1,5 +1,5 @@ -Backlog in actix_settings - Rust
pub enum Backlog {
+Backlog in actix_settings - Rust
pub enum Backlog {
     Default,
     Manual(usize),
 }
Expand description

The maximum number of pending connections.

@@ -20,4 +20,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U
chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/enum.Error.html b/actix_settings/enum.Error.html index 5c4863510..5290937f0 100644 --- a/actix_settings/enum.Error.html +++ b/actix_settings/enum.Error.html @@ -1,5 +1,5 @@ -Error in actix_settings - Rust
pub enum Error {
+Error in actix_settings - Rust
pub enum Error {
     EnvVarError(VarError),
     FileExists(PathBuf),
     InvalidValue {
@@ -31,4 +31,4 @@
 From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/enum.KeepAlive.html b/actix_settings/enum.KeepAlive.html index 2a53e68a6..9acd15432 100644 --- a/actix_settings/enum.KeepAlive.html +++ b/actix_settings/enum.KeepAlive.html @@ -1,5 +1,5 @@ -KeepAlive in actix_settings - Rust
pub enum KeepAlive {
+KeepAlive in actix_settings - Rust
pub enum KeepAlive {
     Default,
     Disabled,
     Os,
@@ -22,4 +22,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/enum.MaxConnectionRate.html b/actix_settings/enum.MaxConnectionRate.html index ced0fe4ad..06f363694 100644 --- a/actix_settings/enum.MaxConnectionRate.html +++ b/actix_settings/enum.MaxConnectionRate.html @@ -1,5 +1,5 @@ -MaxConnectionRate in actix_settings - Rust
pub enum MaxConnectionRate {
+MaxConnectionRate in actix_settings - Rust
pub enum MaxConnectionRate {
     Default,
     Manual(usize),
 }
Expand description

The maximum per-worker concurrent TLS connection limit.

@@ -18,4 +18,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U
chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/enum.MaxConnections.html b/actix_settings/enum.MaxConnections.html index 89b4cef19..41acd7c6c 100644 --- a/actix_settings/enum.MaxConnections.html +++ b/actix_settings/enum.MaxConnections.html @@ -1,5 +1,5 @@ -MaxConnections in actix_settings - Rust
pub enum MaxConnections {
+MaxConnections in actix_settings - Rust
pub enum MaxConnections {
     Default,
     Manual(usize),
 }
Expand description

The maximum per-worker number of concurrent connections.

@@ -18,4 +18,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U
chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/enum.Mode.html b/actix_settings/enum.Mode.html index 932e5244a..493eebd5f 100644 --- a/actix_settings/enum.Mode.html +++ b/actix_settings/enum.Mode.html @@ -1,5 +1,5 @@ -Mode in actix_settings - Rust
pub enum Mode {
+Mode in actix_settings - Rust

Enum actix_settings::Mode

source ·
pub enum Mode {
     Development,
     Production,
 }
Expand description

Marker of intended deployment environment.

@@ -15,4 +15,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U
chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/enum.NumWorkers.html b/actix_settings/enum.NumWorkers.html index 99ef79e92..294ff2f98 100644 --- a/actix_settings/enum.NumWorkers.html +++ b/actix_settings/enum.NumWorkers.html @@ -1,5 +1,5 @@ -NumWorkers in actix_settings - Rust
pub enum NumWorkers {
+NumWorkers in actix_settings - Rust
pub enum NumWorkers {
     Default,
     Manual(usize),
 }
Expand description

The number of workers that the server should start.

@@ -17,4 +17,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U
chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/enum.Timeout.html b/actix_settings/enum.Timeout.html index 9e653cce2..027f98f5c 100644 --- a/actix_settings/enum.Timeout.html +++ b/actix_settings/enum.Timeout.html @@ -1,5 +1,5 @@ -Timeout in actix_settings - Rust
pub enum Timeout {
+Timeout in actix_settings - Rust
pub enum Timeout {
     Default,
     Milliseconds(usize),
     Seconds(usize),
@@ -17,4 +17,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/index.html b/actix_settings/index.html index 6a76069be..84786b36d 100644 --- a/actix_settings/index.html +++ b/actix_settings/index.html @@ -1,5 +1,5 @@ -actix_settings - Rust
Expand description

Easily manage Actix Web’s settings from a TOML file and environment variables.

+actix_settings - Rust

Crate actix_settings

source ·
Expand description

Easily manage Actix Web’s settings from a TOML file and environment variables.

To get started add a Settings::parse_toml("./Server.toml") call to the top of your main function. This will create a template file with descriptions of all the configurable settings. You can change or remove anything in that file and it will be picked up @@ -11,7 +11,7 @@ the environment using

use actix_settings::{ApplySettings as _, Mode, Settings};
 
-#[actix_web::main]
+#[actix_web::main]
 async fn main() -> std::io::Result<()> {
     let mut settings = Settings::parse_toml("./Server.toml")
         .expect("Failed to parse `Settings` from Server.toml");
@@ -49,4 +49,4 @@ the environment using await
 }
-

Structs

Settings types for Actix Web.
A host/port pair for the server to bind to.
Wrapper for server and application-specific settings.
Marker type representing no defined application-specific settings.
TLS (HTTPS) configuration.

Enums

The maximum number of pending connections.
Errors that can be returned from methods in this crate.
The server keep-alive preference.
The maximum per-worker concurrent TLS connection limit.
The maximum per-worker number of concurrent connections.
Marker of intended deployment environment.
The number of workers that the server should start.
A timeout duration in milliseconds or seconds.

Traits

Extension trait for applying parsed settings to the server object.
A specialized FromStr trait that returns [AtError] errors

Type Definitions

Convenience type alias for BasicSettings with no defined application-specific settings.
\ No newline at end of file +

Structs

Settings types for Actix Web.
A host/port pair for the server to bind to.
Wrapper for server and application-specific settings.
Marker type representing no defined application-specific settings.
TLS (HTTPS) configuration.

Enums

The maximum number of pending connections.
Errors that can be returned from methods in this crate.
The server keep-alive preference.
The maximum per-worker concurrent TLS connection limit.
The maximum per-worker number of concurrent connections.
Marker of intended deployment environment.
The number of workers that the server should start.
A timeout duration in milliseconds or seconds.

Traits

Extension trait for applying parsed settings to the server object.
A specialized FromStr trait that returns [AtError] errors

Type Definitions

Convenience type alias for BasicSettings with no defined application-specific settings.
\ No newline at end of file diff --git a/actix_settings/struct.ActixSettings.html b/actix_settings/struct.ActixSettings.html index 257044f54..8703f890a 100644 --- a/actix_settings/struct.ActixSettings.html +++ b/actix_settings/struct.ActixSettings.html @@ -1,5 +1,5 @@ -ActixSettings in actix_settings - Rust
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/struct.Address.html b/actix_settings/struct.Address.html index dce95670b..93dd8dcd7 100644 --- a/actix_settings/struct.Address.html +++ b/actix_settings/struct.Address.html @@ -1,5 +1,5 @@ -Address in actix_settings - Rust
pub struct Address {
+Address in actix_settings - Rust

Struct actix_settings::Address

source ·
pub struct Address {
     pub host: String,
     pub port: u16,
 }
Expand description

A host/port pair for the server to bind to.

@@ -15,4 +15,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U
chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/struct.BasicSettings.html b/actix_settings/struct.BasicSettings.html index 8b6a473bc..32a6d9851 100644 --- a/actix_settings/struct.BasicSettings.html +++ b/actix_settings/struct.BasicSettings.html @@ -1,5 +1,5 @@ -BasicSettings in actix_settings - Rust
pub struct BasicSettings<A> {
+BasicSettings in actix_settings - Rust
pub struct BasicSettings<A> {
     pub actix: ActixSettings,
     pub application: A,
 }
Expand description

Wrapper for server and application-specific settings.

@@ -44,4 +44,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U
chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/struct.NoSettings.html b/actix_settings/struct.NoSettings.html index 74b83978a..bba8ad1ea 100644 --- a/actix_settings/struct.NoSettings.html +++ b/actix_settings/struct.NoSettings.html @@ -1,5 +1,5 @@ -NoSettings in actix_settings - Rust
#[non_exhaustive]
pub struct NoSettings {}
Expand description

Marker type representing no defined application-specific settings.

+NoSettings in actix_settings - Rust
#[non_exhaustive]
pub struct NoSettings {}
Expand description

Marker type representing no defined application-specific settings.

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
Deserialize this value from the given Serde deserializer. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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
Compare self to key and return true if they are equal.

Returns the argument unchanged.

@@ -10,4 +10,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/struct.Tls.html b/actix_settings/struct.Tls.html index e48c19a9a..b6b8bc68a 100644 --- a/actix_settings/struct.Tls.html +++ b/actix_settings/struct.Tls.html @@ -1,5 +1,5 @@ -Tls in actix_settings - Rust
pub struct Tls {
+Tls in actix_settings - Rust

Struct actix_settings::Tls

source ·
pub struct Tls {
     pub enabled: bool,
     pub certificate: PathBuf,
     pub private_key: PathBuf,
@@ -17,4 +17,4 @@ sufficient, and should not be overridden without very good reason. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_settings/trait.ApplySettings.html b/actix_settings/trait.ApplySettings.html index 3e7fb4249..0c27e8b13 100644 --- a/actix_settings/trait.ApplySettings.html +++ b/actix_settings/trait.ApplySettings.html @@ -1,6 +1,6 @@ -ApplySettings in actix_settings - Rust
pub trait ApplySettings {
+ApplySettings in actix_settings - Rust
pub trait ApplySettings {
     fn apply_settings<A>(self, settings: &BasicSettings<A>) -> Self
    where
        A: DeserializeOwned
; }
Expand description

Extension trait for applying parsed settings to the server object.

Required Methods

Apply a BasicSettings value to self.

-

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_settings/trait.Parse.html b/actix_settings/trait.Parse.html index 885ae2879..c9d9b7f04 100644 --- a/actix_settings/trait.Parse.html +++ b/actix_settings/trait.Parse.html @@ -1,6 +1,6 @@ -Parse in actix_settings - Rust
pub trait Parse: Sized {
+Parse in actix_settings - Rust

Trait actix_settings::Parse

source ·
pub trait Parse: Sized {
     fn parse(string: &str) -> Result<Self, Error>;
 }
Expand description

A specialized FromStr trait that returns [AtError] errors

Required Methods

Parse Self from string.

-

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_settings/type.Settings.html b/actix_settings/type.Settings.html index 9821f035f..016e67b84 100644 --- a/actix_settings/type.Settings.html +++ b/actix_settings/type.Settings.html @@ -1,3 +1,3 @@ -Settings in actix_settings - Rust

Type Definition actix_settings::Settings

source · []
pub type Settings = BasicSettings<NoSettings>;
Expand description

Convenience type alias for BasicSettings with no defined application-specific settings.

-
\ No newline at end of file +Settings in actix_settings - Rust

Type Definition actix_settings::Settings

source ·
pub type Settings = BasicSettings<NoSettings>;
Expand description

Convenience type alias for BasicSettings with no defined application-specific settings.

+
\ No newline at end of file diff --git a/actix_web_httpauth/all.html b/actix_web_httpauth/all.html index 040b32ff4..a3b654b36 100644 --- a/actix_web_httpauth/all.html +++ b/actix_web_httpauth/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/actix_web_httpauth/extractors/basic/index.html b/actix_web_httpauth/extractors/basic/index.html index 8917edf4d..c6a837c4c 100644 --- a/actix_web_httpauth/extractors/basic/index.html +++ b/actix_web_httpauth/extractors/basic/index.html @@ -1,2 +1,2 @@ -actix_web_httpauth::extractors::basic - Rust
Expand description

Extractor for the “Basic” HTTP Authentication Scheme.

-

Structs

Extractor for HTTP Basic auth.
BasicAuth extractor configuration used for WWW-Authenticate header later.
\ No newline at end of file +actix_web_httpauth::extractors::basic - Rust
Expand description

Extractor for the “Basic” HTTP Authentication Scheme.

+

Structs

Extractor for HTTP Basic auth.
BasicAuth extractor configuration used for WWW-Authenticate header later.
\ No newline at end of file diff --git a/actix_web_httpauth/extractors/basic/struct.BasicAuth.html b/actix_web_httpauth/extractors/basic/struct.BasicAuth.html index 6d09efe85..08f79c9cd 100644 --- a/actix_web_httpauth/extractors/basic/struct.BasicAuth.html +++ b/actix_web_httpauth/extractors/basic/struct.BasicAuth.html @@ -1,4 +1,4 @@ -BasicAuth in actix_web_httpauth::extractors::basic - Rust
pub struct BasicAuth(_);
Expand description

Extractor for HTTP Basic auth.

+BasicAuth in actix_web_httpauth::extractors::basic - Rust
pub struct BasicAuth(_);
Expand description

Extractor for HTTP Basic auth.

Examples

use actix_web_httpauth::extractors::basic::BasicAuth;
 
@@ -28,4 +28,4 @@ App::new()
 From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/extractors/basic/struct.Config.html b/actix_web_httpauth/extractors/basic/struct.Config.html index be59b064d..81d338c0a 100644 --- a/actix_web_httpauth/extractors/basic/struct.Config.html +++ b/actix_web_httpauth/extractors/basic/struct.Config.html @@ -1,4 +1,4 @@ -Config in actix_web_httpauth::extractors::basic - Rust
pub struct Config(_);
Expand description

BasicAuth extractor configuration used for WWW-Authenticate header later.

+Config in actix_web_httpauth::extractors::basic - Rust
pub struct Config(_);
Expand description

BasicAuth extractor configuration used for WWW-Authenticate header later.

Implementations

Set challenge realm attribute.

The “realm” attribute indicates the scope of protection in the manner described in HTTP/1.1 RFC 2617 §1.2.

@@ -10,4 +10,4 @@ From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/extractors/bearer/enum.Error.html b/actix_web_httpauth/extractors/bearer/enum.Error.html index 6477d3b9c..8c9173d15 100644 --- a/actix_web_httpauth/extractors/bearer/enum.Error.html +++ b/actix_web_httpauth/extractors/bearer/enum.Error.html @@ -1,4 +1,4 @@ -Error in actix_web_httpauth::extractors::bearer - Rust
pub enum Error {
+Error in actix_web_httpauth::extractors::bearer - Rust
pub enum Error {
     InvalidRequest,
     InvalidToken,
     InsufficientScope,
@@ -21,4 +21,4 @@ operator. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/extractors/bearer/index.html b/actix_web_httpauth/extractors/bearer/index.html index 92c80eb30..8bb4711b2 100644 --- a/actix_web_httpauth/extractors/bearer/index.html +++ b/actix_web_httpauth/extractors/bearer/index.html @@ -1,2 +1,2 @@ -actix_web_httpauth::extractors::bearer - Rust
Expand description

Extractor for the “Bearer” HTTP Authentication Scheme.

-

Structs

Extractor for HTTP Bearer auth
BearerAuth extractor configuration.

Enums

Bearer authorization error types, described in RFC 6750.
\ No newline at end of file +actix_web_httpauth::extractors::bearer - Rust
Expand description

Extractor for the “Bearer” HTTP Authentication Scheme.

+

Structs

Extractor for HTTP Bearer auth
BearerAuth extractor configuration.

Enums

Bearer authorization error types, described in RFC 6750.
\ No newline at end of file diff --git a/actix_web_httpauth/extractors/bearer/struct.BearerAuth.html b/actix_web_httpauth/extractors/bearer/struct.BearerAuth.html index efdc22318..53f357513 100644 --- a/actix_web_httpauth/extractors/bearer/struct.BearerAuth.html +++ b/actix_web_httpauth/extractors/bearer/struct.BearerAuth.html @@ -1,4 +1,4 @@ -BearerAuth in actix_web_httpauth::extractors::bearer - Rust
pub struct BearerAuth(_);
Expand description

Extractor for HTTP Bearer auth

+BearerAuth in actix_web_httpauth::extractors::bearer - Rust
pub struct BearerAuth(_);
Expand description

Extractor for HTTP Bearer auth

Examples

use actix_web_httpauth::extractors::bearer::BearerAuth;
 
@@ -32,4 +32,4 @@ App::new()
 From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/extractors/bearer/struct.Config.html b/actix_web_httpauth/extractors/bearer/struct.Config.html index 1d229ab11..304a0def1 100644 --- a/actix_web_httpauth/extractors/bearer/struct.Config.html +++ b/actix_web_httpauth/extractors/bearer/struct.Config.html @@ -1,4 +1,4 @@ -Config in actix_web_httpauth::extractors::bearer - Rust
pub struct Config(_);
Expand description

BearerAuth extractor configuration.

+Config in actix_web_httpauth::extractors::bearer - Rust
pub struct Config(_);
Expand description

BearerAuth extractor configuration.

Implementations

Set challenge scope attribute.

The "scope" attribute is a space-delimited list of case-sensitive scope values indicating the required scope of the access token for @@ -14,4 +14,4 @@ described in HTTP/1.1 From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/extractors/index.html b/actix_web_httpauth/extractors/index.html index e6ddd14ab..9ed753b31 100644 --- a/actix_web_httpauth/extractors/index.html +++ b/actix_web_httpauth/extractors/index.html @@ -1,3 +1,3 @@ -actix_web_httpauth::extractors - Rust
Expand description

Type-safe authentication information extractors.

+actix_web_httpauth::extractors - Rust
Expand description

Type-safe authentication information extractors.

Modules

Extractor for the “Basic” HTTP Authentication Scheme.
Extractor for the “Bearer” HTTP Authentication Scheme.

Structs

Authentication error returned by authentication extractors.

Traits

Trait implemented for types that provides configuration for the authentication -extractors.
\ No newline at end of file +extractors.
\ No newline at end of file diff --git a/actix_web_httpauth/extractors/struct.AuthenticationError.html b/actix_web_httpauth/extractors/struct.AuthenticationError.html index 0a8bd9573..8dfe3b040 100644 --- a/actix_web_httpauth/extractors/struct.AuthenticationError.html +++ b/actix_web_httpauth/extractors/struct.AuthenticationError.html @@ -1,4 +1,4 @@ -AuthenticationError in actix_web_httpauth::extractors - Rust
pub struct AuthenticationError<C: Challenge> { /* private fields */ }
Expand description

Authentication error returned by authentication extractors.

+AuthenticationError in actix_web_httpauth::extractors - Rust
pub struct AuthenticationError<C: Challenge> { /* private fields */ }
Expand description

Authentication error returned by authentication extractors.

Different extractors may extend AuthenticationError implementation in order to provide access inner challenge fields.

Implementations

Extended error customization for HTTP Bearer auth.

@@ -14,13 +14,13 @@ Error.

Returns mutable reference to the inner status code.

Can be used to override returned status code, but by default this lib tries to stick to the RFC, so it might be unreasonable.

-

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

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/extractors/trait.AuthExtractorConfig.html b/actix_web_httpauth/extractors/trait.AuthExtractorConfig.html index 67954872b..30f86cc0c 100644 --- a/actix_web_httpauth/extractors/trait.AuthExtractorConfig.html +++ b/actix_web_httpauth/extractors/trait.AuthExtractorConfig.html @@ -1,4 +1,4 @@ -AuthExtractorConfig in actix_web_httpauth::extractors - Rust
pub trait AuthExtractorConfig {
+AuthExtractorConfig in actix_web_httpauth::extractors - Rust
pub trait AuthExtractorConfig {
     type Inner: Challenge;
 
     fn into_inner(self) -> Self::Inner;
@@ -6,4 +6,4 @@
 extractors.

Required Associated Types

Associated challenge type.

Required Methods

Convert the config instance into a HTTP challenge.

-

Implementors

\ No newline at end of file +

Implementors

\ No newline at end of file diff --git a/actix_web_httpauth/headers/authorization/enum.ParseError.html b/actix_web_httpauth/headers/authorization/enum.ParseError.html index 0ee902eff..3e0884ce4 100644 --- a/actix_web_httpauth/headers/authorization/enum.ParseError.html +++ b/actix_web_httpauth/headers/authorization/enum.ParseError.html @@ -1,4 +1,4 @@ -ParseError in actix_web_httpauth::headers::authorization - Rust
pub enum ParseError {
+ParseError in actix_web_httpauth::headers::authorization - Rust
pub enum ParseError {
     Invalid,
     MissingScheme,
     MissingField(&'static str),
@@ -14,13 +14,13 @@
 

ToStrError(ToStrError)

Unable to convert header into the str.

Base64DecodeError(DecodeError)

Malformed base64 string.

Utf8Error(Utf8Error)

Malformed UTF-8 string.

-

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.

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.

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

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/headers/authorization/index.html b/actix_web_httpauth/headers/authorization/index.html index 665e3c11f..ab28f72e1 100644 --- a/actix_web_httpauth/headers/authorization/index.html +++ b/actix_web_httpauth/headers/authorization/index.html @@ -1,2 +1,2 @@ -actix_web_httpauth::headers::authorization - Rust
Expand description

Authorization header and various auth schemes.

-

Structs

Authorization header, defined in RFC 7235
Credentials for Basic authentication scheme, defined in RFC 7617
Credentials for Bearer authentication scheme, defined in RFC 6750.

Enums

Possible errors while parsing Authorization header.

Traits

Authentication scheme for Authorization header.
\ No newline at end of file +actix_web_httpauth::headers::authorization - Rust
Expand description

Authorization header and various auth schemes.

+

Structs

Authorization header, defined in RFC 7235
Credentials for Basic authentication scheme, defined in RFC 7617
Credentials for Bearer authentication scheme, defined in RFC 6750.

Enums

Possible errors while parsing Authorization header.

Traits

Authentication scheme for Authorization header.
\ No newline at end of file diff --git a/actix_web_httpauth/headers/authorization/struct.Authorization.html b/actix_web_httpauth/headers/authorization/struct.Authorization.html index 10f2e8656..c6135ae1b 100644 --- a/actix_web_httpauth/headers/authorization/struct.Authorization.html +++ b/actix_web_httpauth/headers/authorization/struct.Authorization.html @@ -1,4 +1,4 @@ -Authorization in actix_web_httpauth::headers::authorization - Rust
pub struct Authorization<S: Scheme>(_);
Expand description

Authorization header, defined in RFC 7235

+Authorization in actix_web_httpauth::headers::authorization - Rust
pub struct Authorization<S: Scheme>(_);
Expand description

Authorization header, defined in RFC 7235

The “Authorization” header field allows a user agent to authenticate itself with an origin server—usually, but not necessarily, after receiving a 401 (Unauthorized) response. Its value consists of credentials containing the authentication information of the user agent for the @@ -23,4 +23,4 @@ operator. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/headers/authorization/struct.Basic.html b/actix_web_httpauth/headers/authorization/struct.Basic.html index bbba79555..ec191b25b 100644 --- a/actix_web_httpauth/headers/authorization/struct.Basic.html +++ b/actix_web_httpauth/headers/authorization/struct.Basic.html @@ -1,4 +1,4 @@ -Basic in actix_web_httpauth::headers::authorization - Rust
pub struct Basic { /* private fields */ }
Expand description

Credentials for Basic authentication scheme, defined in RFC 7617

+Basic in actix_web_httpauth::headers::authorization - Rust
pub struct Basic { /* private fields */ }
Expand description

Credentials for Basic authentication scheme, defined in RFC 7617

Implementations

Creates Basic credentials with provided user_id and optional password.

Examples
@@ -17,4 +17,4 @@ operator. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/headers/authorization/struct.Bearer.html b/actix_web_httpauth/headers/authorization/struct.Bearer.html index f4a4da93a..a1034f815 100644 --- a/actix_web_httpauth/headers/authorization/struct.Bearer.html +++ b/actix_web_httpauth/headers/authorization/struct.Bearer.html @@ -1,4 +1,4 @@ -Bearer in actix_web_httpauth::headers::authorization - Rust
pub struct Bearer { /* private fields */ }
Expand description

Credentials for Bearer authentication scheme, defined in RFC 6750.

+Bearer in actix_web_httpauth::headers::authorization - Rust
pub struct Bearer { /* private fields */ }
Expand description

Credentials for Bearer authentication scheme, defined in RFC 6750.

Should be used in combination with Authorization header.

Implementations

Creates new Bearer credentials with the token provided.

Example
@@ -16,4 +16,4 @@ operator. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/headers/authorization/trait.Scheme.html b/actix_web_httpauth/headers/authorization/trait.Scheme.html index 1c7947448..ebfdbc972 100644 --- a/actix_web_httpauth/headers/authorization/trait.Scheme.html +++ b/actix_web_httpauth/headers/authorization/trait.Scheme.html @@ -1,5 +1,5 @@ -Scheme in actix_web_httpauth::headers::authorization - Rust
pub trait Scheme: TryIntoHeaderValue + Debug + Display + Clone + Send + Sync {
+Scheme in actix_web_httpauth::headers::authorization - Rust
pub trait Scheme: TryIntoHeaderValue + Debug + Display + Clone + Send + Sync {
     fn parse(header: &HeaderValue) -> Result<Self, ParseError>;
 }
Expand description

Authentication scheme for Authorization header.

Required Methods

Try to parse an authentication scheme from the Authorization header.

-

Implementors

\ No newline at end of file +

Implementors

\ No newline at end of file diff --git a/actix_web_httpauth/headers/index.html b/actix_web_httpauth/headers/index.html index e53c85266..020b9ca53 100644 --- a/actix_web_httpauth/headers/index.html +++ b/actix_web_httpauth/headers/index.html @@ -1,2 +1,2 @@ -actix_web_httpauth::headers - Rust
Expand description

Typed HTTP headers.

-

Modules

Authorization header and various auth schemes.
WWW-Authenticate header and various auth challenges.
\ No newline at end of file +actix_web_httpauth::headers - Rust
Expand description

Typed HTTP headers.

+

Modules

Authorization header and various auth schemes.
WWW-Authenticate header and various auth challenges.
\ No newline at end of file diff --git a/actix_web_httpauth/headers/www_authenticate/basic/index.html b/actix_web_httpauth/headers/www_authenticate/basic/index.html index 60e48da86..376c168fe 100644 --- a/actix_web_httpauth/headers/www_authenticate/basic/index.html +++ b/actix_web_httpauth/headers/www_authenticate/basic/index.html @@ -1,3 +1,3 @@ -actix_web_httpauth::headers::www_authenticate::basic - Rust
Expand description

Challenge for the “Basic” HTTP Authentication Scheme.

+actix_web_httpauth::headers::www_authenticate::basic - Rust
Expand description

Challenge for the “Basic” HTTP Authentication Scheme.

Structs

Challenge for WWW-Authenticate header with HTTP Basic auth scheme, -described in RFC 7617
\ No newline at end of file +described in RFC 7617
\ No newline at end of file diff --git a/actix_web_httpauth/headers/www_authenticate/basic/struct.Basic.html b/actix_web_httpauth/headers/www_authenticate/basic/struct.Basic.html index 02a0c4d1f..080a8a36d 100644 --- a/actix_web_httpauth/headers/www_authenticate/basic/struct.Basic.html +++ b/actix_web_httpauth/headers/www_authenticate/basic/struct.Basic.html @@ -1,4 +1,4 @@ -Basic in actix_web_httpauth::headers::www_authenticate::basic - Rust
pub struct Basic { /* private fields */ }
Expand description

Challenge for WWW-Authenticate header with HTTP Basic auth scheme, +Basic in actix_web_httpauth::headers::www_authenticate::basic - Rust

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

Challenge for WWW-Authenticate header with HTTP Basic auth scheme, described in RFC 7617

Examples

use actix_web_httpauth::headers::www_authenticate::basic::Basic;
@@ -32,4 +32,4 @@ operator. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/headers/www_authenticate/bearer/enum.Error.html b/actix_web_httpauth/headers/www_authenticate/bearer/enum.Error.html index 0a136ce26..a345e8b4f 100644 --- a/actix_web_httpauth/headers/www_authenticate/bearer/enum.Error.html +++ b/actix_web_httpauth/headers/www_authenticate/bearer/enum.Error.html @@ -1,4 +1,4 @@ -Error in actix_web_httpauth::headers::www_authenticate::bearer - Rust
pub enum Error {
+Error in actix_web_httpauth::headers::www_authenticate::bearer - Rust
pub enum Error {
     InvalidRequest,
     InvalidToken,
     InsufficientScope,
@@ -21,4 +21,4 @@ operator. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/headers/www_authenticate/bearer/index.html b/actix_web_httpauth/headers/www_authenticate/bearer/index.html index 0666ce9d9..799458089 100644 --- a/actix_web_httpauth/headers/www_authenticate/bearer/index.html +++ b/actix_web_httpauth/headers/www_authenticate/bearer/index.html @@ -1,2 +1,2 @@ -actix_web_httpauth::headers::www_authenticate::bearer - Rust
Expand description

Challenge for the “Bearer” HTTP Authentication Scheme.

-

Structs

Challenge for WWW-Authenticate header with HTTP Bearer auth scheme, described in RFC 6750.
Builder for the Bearer challenge.

Enums

Bearer authorization error types, described in RFC 6750.
\ No newline at end of file +actix_web_httpauth::headers::www_authenticate::bearer - Rust
Expand description

Challenge for the “Bearer” HTTP Authentication Scheme.

+

Structs

Challenge for WWW-Authenticate header with HTTP Bearer auth scheme, described in RFC 6750.
Builder for the Bearer challenge.

Enums

Bearer authorization error types, described in RFC 6750.
\ No newline at end of file diff --git a/actix_web_httpauth/headers/www_authenticate/bearer/struct.Bearer.html b/actix_web_httpauth/headers/www_authenticate/bearer/struct.Bearer.html index bc2d0d3ed..1f0f06e66 100644 --- a/actix_web_httpauth/headers/www_authenticate/bearer/struct.Bearer.html +++ b/actix_web_httpauth/headers/www_authenticate/bearer/struct.Bearer.html @@ -1,4 +1,4 @@ -Bearer in actix_web_httpauth::headers::www_authenticate::bearer - Rust
pub struct Bearer { /* private fields */ }
Expand description

Challenge for WWW-Authenticate header with HTTP Bearer auth scheme, described in RFC 6750.

+Bearer in actix_web_httpauth::headers::www_authenticate::bearer - Rust
pub struct Bearer { /* private fields */ }
Expand description

Challenge for WWW-Authenticate header with HTTP Bearer auth scheme, described in RFC 6750.

Examples

use actix_web_httpauth::headers::www_authenticate::bearer::{
     Bearer, Error,
@@ -36,4 +36,4 @@ operator. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/headers/www_authenticate/bearer/struct.BearerBuilder.html b/actix_web_httpauth/headers/www_authenticate/bearer/struct.BearerBuilder.html index c373188fd..7b0669b4e 100644 --- a/actix_web_httpauth/headers/www_authenticate/bearer/struct.BearerBuilder.html +++ b/actix_web_httpauth/headers/www_authenticate/bearer/struct.BearerBuilder.html @@ -1,4 +1,4 @@ -BearerBuilder in actix_web_httpauth::headers::www_authenticate::bearer - Rust
pub struct BearerBuilder(_);
Expand description

Builder for the Bearer challenge.

+BearerBuilder in actix_web_httpauth::headers::www_authenticate::bearer - Rust
pub struct BearerBuilder(_);
Expand description

Builder for the Bearer challenge.

It is up to implementor to fill all required fields, neither this Builder nor Bearer provide any validation.

Implementations

Provides the scope attribute, as defined in RFC 6749 §3.3.

@@ -17,4 +17,4 @@ provide any validation.

From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/headers/www_authenticate/index.html b/actix_web_httpauth/headers/www_authenticate/index.html index 614986629..3f944cf01 100644 --- a/actix_web_httpauth/headers/www_authenticate/index.html +++ b/actix_web_httpauth/headers/www_authenticate/index.html @@ -1,2 +1,2 @@ -actix_web_httpauth::headers::www_authenticate - Rust
Expand description

WWW-Authenticate header and various auth challenges.

-

Modules

Challenge for the “Basic” HTTP Authentication Scheme.
Challenge for the “Bearer” HTTP Authentication Scheme.

Structs

WWW-Authenticate header, described in RFC 7235.

Traits

Authentication challenge for WWW-Authenticate header.
\ No newline at end of file +actix_web_httpauth::headers::www_authenticate - Rust
Expand description

WWW-Authenticate header and various auth challenges.

+

Modules

Challenge for the “Basic” HTTP Authentication Scheme.
Challenge for the “Bearer” HTTP Authentication Scheme.

Structs

WWW-Authenticate header, described in RFC 7235.

Traits

Authentication challenge for WWW-Authenticate header.
\ No newline at end of file diff --git a/actix_web_httpauth/headers/www_authenticate/struct.WwwAuthenticate.html b/actix_web_httpauth/headers/www_authenticate/struct.WwwAuthenticate.html index ccac58256..38d447926 100644 --- a/actix_web_httpauth/headers/www_authenticate/struct.WwwAuthenticate.html +++ b/actix_web_httpauth/headers/www_authenticate/struct.WwwAuthenticate.html @@ -1,4 +1,4 @@ -WwwAuthenticate in actix_web_httpauth::headers::www_authenticate - Rust
pub struct WwwAuthenticate<C: Challenge>(pub C);
Expand description

WWW-Authenticate header, described in RFC 7235.

+WwwAuthenticate in actix_web_httpauth::headers::www_authenticate - Rust
pub struct WwwAuthenticate<C: Challenge>(pub C);
Expand description

WWW-Authenticate header, described in RFC 7235.

This header is generic over the Challenge trait, see Basic and Bearer challenges for details.

Tuple Fields

0: C

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
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
Returns the name of the header field.
Parse the header from a HTTP message.
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used @@ -13,4 +13,4 @@ operator. From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/actix_web_httpauth/headers/www_authenticate/trait.Challenge.html b/actix_web_httpauth/headers/www_authenticate/trait.Challenge.html index 721969ba2..45e04e4e9 100644 --- a/actix_web_httpauth/headers/www_authenticate/trait.Challenge.html +++ b/actix_web_httpauth/headers/www_authenticate/trait.Challenge.html @@ -1,5 +1,5 @@ -Challenge in actix_web_httpauth::headers::www_authenticate - Rust
pub trait Challenge: TryIntoHeaderValue + Debug + Display + Clone + Send + Sync {
+Challenge in actix_web_httpauth::headers::www_authenticate - Rust
pub trait Challenge: TryIntoHeaderValue + Debug + Display + Clone + Send + Sync {
     fn to_bytes(&self) -> Bytes;
 }
Expand description

Authentication challenge for WWW-Authenticate header.

Required Methods

Converts the challenge into a bytes suitable for HTTP transmission.

-

Implementors

\ No newline at end of file +

Implementors

\ No newline at end of file diff --git a/actix_web_httpauth/index.html b/actix_web_httpauth/index.html index 4f2d6b95f..4329b96f0 100644 --- a/actix_web_httpauth/index.html +++ b/actix_web_httpauth/index.html @@ -1,4 +1,4 @@ -actix_web_httpauth - Rust
Expand description

HTTP authentication schemes for Actix Web.

+actix_web_httpauth - Rust
Expand description

HTTP authentication schemes for Actix Web.

Provides:

-

Modules

Type-safe authentication information extractors.
Typed HTTP headers.
HTTP Authentication middleware.
\ No newline at end of file +

Modules

Type-safe authentication information extractors.
Typed HTTP headers.
HTTP Authentication middleware.
\ No newline at end of file diff --git a/actix_web_httpauth/middleware/index.html b/actix_web_httpauth/middleware/index.html index 9ced9b4b7..e71dc3558 100644 --- a/actix_web_httpauth/middleware/index.html +++ b/actix_web_httpauth/middleware/index.html @@ -1,2 +1,2 @@ -actix_web_httpauth::middleware - Rust
Expand description

HTTP Authentication middleware.

-

Structs

Middleware for checking HTTP authentication.
\ No newline at end of file +actix_web_httpauth::middleware - Rust
Expand description

HTTP Authentication middleware.

+

Structs

Middleware for checking HTTP authentication.
\ No newline at end of file diff --git a/actix_web_httpauth/middleware/struct.HttpAuthentication.html b/actix_web_httpauth/middleware/struct.HttpAuthentication.html index aa1d7fcaa..21532ba5d 100644 --- a/actix_web_httpauth/middleware/struct.HttpAuthentication.html +++ b/actix_web_httpauth/middleware/struct.HttpAuthentication.html @@ -1,4 +1,4 @@ -HttpAuthentication in actix_web_httpauth::middleware - Rust
pub struct HttpAuthentication<T, F>where
    T: FromRequest,
{ /* private fields */ }
Expand description

Middleware for checking HTTP authentication.

+HttpAuthentication in actix_web_httpauth::middleware - Rust
pub struct HttpAuthentication<T, F>where
    T: FromRequest,
{ /* private fields */ }
Expand description

Middleware for checking HTTP authentication.

If there is no Authorization header in the request, this middleware returns an error immediately, without calling the F callback.

Otherwise, it will pass both the request and the parsed credentials into it. In case of @@ -46,4 +46,4 @@ validation callback F.

From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
\ No newline at end of file +WithDispatch wrapper. Read more
\ No newline at end of file diff --git a/ayu.css b/ayu.css deleted file mode 100644 index c4aa72575..000000000 --- a/ayu.css +++ /dev/null @@ -1 +0,0 @@ - :root{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--search-color:#fff;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--example-line-numbers-border-color:none;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}h1,h2,h3,h4{color:white;}h1 a{color:#fff;}h4{border:none;}.docblock code{color:#ffb454;}.code-header{color:#e6e1cf;}.docblock pre>code,pre>code{color:#e6e1cf;}.item-info code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}.sidebar .current,.sidebar a:hover{color:#ffb44c;}.sidebar-elems .location{color:#ff7733;}.src-line-numbers .line-highlighted{color:#708090;padding-right:4px;border-right:1px solid #ffb44c;}.search-results a:hover{color:#fff !important;background-color:#3c3c3c;}.search-results a:focus{color:#fff !important;background-color:#3c3c3c;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.sidebar h2 a,.sidebar h3 a{color:white;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary::before{filter:invert(100%);}#crate-search-div::after{filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);}#crate-search:hover,#crate-search:focus{border-color:#e0e0e0 !important;}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);}.module-item .stab,.import-item .stab{color:#000;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}:target{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}pre.rust .lifetime{}pre.rust .kw{}#titles>button:hover,#titles>button.selected{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute{}pre.rust .kw-2,pre.rust .prelude-ty{}kbd{color:#c5c5c5;background-color:#314559;box-shadow:inset 0 -1px 0 #5c6773;}#settings-menu>a,#help-button>a{color:#fff;}#settings-menu>a img{filter:invert(100);}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:#e0e0e0;}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#source-sidebar>.title{color:#fff;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:#14191f;color:#ffb44c;}#source-sidebar div.files>a.selected{background-color:#14191f;color:#ffb44c;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(15,20,25,1),rgba(15,20,25,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(15,20,25,1),rgba(15,20,25,0));}.toggle-line-inner{background:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file diff --git a/dark.css b/dark.css deleted file mode 100644 index ee3eabcb8..000000000 --- a/dark.css +++ /dev/null @@ -1 +0,0 @@ -:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--search-color:#111;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--example-line-numbers-border-color:#4a4949;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}.content .item-info::before{color:#ccc;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary::before{filter:invert(100%);}#crate-search-div::after{filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);}#crate-search:hover,#crate-search:focus{border-color:#2196f3 !important;}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);}a.test-arrow{color:#dedede;background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}:target{background-color:#494a3d;border-right:3px solid #bb7410;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}kbd{color:#000;background-color:#fafbfc;box-shadow:inset 0 -1px 0 #c6cbd1;}#settings-menu>a,#help-button>a{color:#000;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:#ffb900;}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:#444;}#source-sidebar div.files>a.selected{background-color:#333;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(53,53,53,1),rgba(53,53,53,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(53,53,53,1),rgba(53,53,53,0));}.toggle-line-inner{background:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file diff --git a/help.html b/help.html index f6fe48185..2a7a7b772 100644 --- a/help.html +++ b/help.html @@ -1 +1,2 @@ -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/actix_web/extract/trait.FromRequest.js b/implementors/actix_web/extract/trait.FromRequest.js index 7edc3337d..c202cc4dd 100644 --- a/implementors/actix_web/extract/trait.FromRequest.js +++ b/implementors/actix_web/extract/trait.FromRequest.js @@ -1,6 +1,6 @@ (function() {var implementors = { "actix_identity":[["impl FromRequest for Identity"]], -"actix_protobuf":[["impl<T> FromRequest for ProtoBuf<T>where
    T: Message + Default + 'static,
"]], +"actix_protobuf":[["impl<T> FromRequest for ProtoBuf<T>where
    T: Message + Default + 'static,
"]], "actix_session":[["impl FromRequest for Session"]], "actix_web_httpauth":[["impl FromRequest for BasicAuth"],["impl FromRequest for BearerAuth"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/actix_web/response/responder/trait.Responder.js b/implementors/actix_web/response/responder/trait.Responder.js index 330a02733..eab7ed284 100644 --- a/implementors/actix_web/response/responder/trait.Responder.js +++ b/implementors/actix_web/response/responder/trait.Responder.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"actix_protobuf":[["impl<T: Message + Default> Responder for ProtoBuf<T>"]] +"actix_protobuf":[["impl<T: Message + Default> Responder for ProtoBuf<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/convert/trait.From.js b/implementors/core/convert/trait.From.js index c967b64c3..cc199f1d4 100644 --- a/implementors/core/convert/trait.From.js +++ b/implementors/core/convert/trait.From.js @@ -1,6 +1,6 @@ (function() {var implementors = { "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_protobuf":[["impl From<PayloadError> for ProtoBufPayloadError"],["impl From<DecodeError> for ProtoBufPayloadError"]], "actix_redis":[["impl From<Error> for Error"]], "actix_session":[["impl From<PersistentSession> for SessionLifecycle"],["impl From<BrowserSession> for SessionLifecycle"],["impl From<Error> for SessionGetError"],["impl From<Error> for SessionInsertError"],["impl From<SessionKey> for String"]], "actix_settings":[["impl From<Error> for Error"],["impl From<IoError> for Error"],["impl From<ParseBoolError> for Error"],["impl From<ParseIntError> for Error"],["impl From<Error> for Error"],["impl From<VarError> for Error"],["impl From<Error> for Error"]], diff --git a/implementors/core/fmt/trait.Debug.js b/implementors/core/fmt/trait.Debug.js index 2b671c584..ecc1b7a5c 100644 --- a/implementors/core/fmt/trait.Debug.js +++ b/implementors/core/fmt/trait.Debug.js @@ -2,7 +2,7 @@ "actix_cors":[["impl Debug for Cors"],["impl Debug for CorsError"]], "actix_identity":[["impl Debug for LogoutBehaviour"],["impl Debug for IdentityMiddlewareBuilder"]], "actix_limitation":[["impl Debug for Builder"],["impl Debug for Error"],["impl Debug for RateLimiter"],["impl Debug for Status"],["impl Debug for Limiter"]], -"actix_protobuf":[["impl Debug for ProtoBufPayloadError"],["impl<T: Message> Debug for ProtoBuf<T>where
    T: Debug,
"]], +"actix_protobuf":[["impl Debug for ProtoBufPayloadError"],["impl<T: Message> Debug for ProtoBuf<T>where
    T: Debug,
"]], "actix_redis":[["impl Debug for Command"],["impl Debug for Error"]], "actix_session":[["impl Debug for SessionLifecycle"],["impl Debug for BrowserSession"],["impl Debug for PersistentSession"],["impl Debug for TtlExtensionPolicy"],["impl Debug for CookieContentSecurity"],["impl Debug for SessionStatus"],["impl Debug for SessionGetError"],["impl Debug for SessionInsertError"],["impl Debug for LoadError"],["impl Debug for SaveError"],["impl Debug for UpdateError"],["impl Debug for SessionKey"]], "actix_settings":[["impl Debug for Error"],["impl Debug for Address"],["impl Debug for Backlog"],["impl Debug for KeepAlive"],["impl Debug for MaxConnectionRate"],["impl Debug for MaxConnections"],["impl Debug for Mode"],["impl Debug for NumWorkers"],["impl Debug for Timeout"],["impl Debug for Tls"],["impl Debug for ActixSettings"],["impl<A: Debug> Debug for BasicSettings<A>"],["impl Debug for NoSettings"]], diff --git a/implementors/core/fmt/trait.Display.js b/implementors/core/fmt/trait.Display.js index 07185276c..bc58d44dd 100644 --- a/implementors/core/fmt/trait.Display.js +++ b/implementors/core/fmt/trait.Display.js @@ -1,7 +1,7 @@ (function() {var implementors = { "actix_cors":[["impl Display for CorsError"]], "actix_limitation":[["impl Display for Error"]], -"actix_protobuf":[["impl Display for ProtoBufPayloadError"],["impl<T: Message> Display for ProtoBuf<T>where
    T: Display,
"]], +"actix_protobuf":[["impl Display for ProtoBufPayloadError"],["impl<T: Message> Display for ProtoBuf<T>where
    T: Display,
"]], "actix_redis":[["impl Display for Error"]], "actix_session":[["impl Display for SessionGetError"],["impl Display for SessionInsertError"],["impl Display for LoadError"],["impl Display for SaveError"],["impl Display for UpdateError"]], "actix_web_httpauth":[["impl<C: Challenge> Display for AuthenticationError<C>"],["impl Display for ParseError"],["impl<S: Scheme> Display for Authorization<S>"],["impl Display for Basic"],["impl Display for Bearer"],["impl Display for Basic"],["impl Display for Bearer"],["impl Display for Error"]] diff --git a/implementors/core/future/future/trait.Future.js b/implementors/core/future/future/trait.Future.js index e8231046c..81a93b6d6 100644 --- a/implementors/core/future/future/trait.Future.js +++ b/implementors/core/future/future/trait.Future.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"actix_protobuf":[["impl<T: Message + Default + 'static> Future for ProtoBufMessage<T>"]] +"actix_protobuf":[["impl<T: Message + Default + 'static> Future for ProtoBufMessage<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/ops/deref/trait.Deref.js b/implementors/core/ops/deref/trait.Deref.js index ba7439742..2b0308368 100644 --- a/implementors/core/ops/deref/trait.Deref.js +++ b/implementors/core/ops/deref/trait.Deref.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"actix_protobuf":[["impl<T: Message> Deref for ProtoBuf<T>"]] +"actix_protobuf":[["impl<T: Message> Deref for ProtoBuf<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/ops/deref/trait.DerefMut.js b/implementors/core/ops/deref/trait.DerefMut.js index f9e72dd26..c06823257 100644 --- a/implementors/core/ops/deref/trait.DerefMut.js +++ b/implementors/core/ops/deref/trait.DerefMut.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"actix_protobuf":[["impl<T: Message> DerefMut for ProtoBuf<T>"]] +"actix_protobuf":[["impl<T: Message> DerefMut for ProtoBuf<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/light.css b/light.css deleted file mode 100644 index cc3e95eaa..000000000 --- a/light.css +++ /dev/null @@ -1 +0,0 @@ -:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--sidebar-background-color:#F5F5F5;--sidebar-background-color-hover:#E0E0E0;--code-block-background-color:#F5F5F5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--stab-background-color:#fff5d6;--stab-code-color:#000;--search-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--example-line-numbers-border-color:#c7c7c7;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}.rust-logo{}.content .item-info::before{color:#ccc;}body.source .example-wrap pre.rust a{background:#eee;}#crate-search-div::after{filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);}#crate-search:hover,#crate-search:focus{border-color:#717171 !important;}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);}a.test-arrow{color:#f5f5f5;background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}:target{background:#FDFFD3;border-right:3px solid #AD7C37;}.search-failed a{color:#3873AD;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}kbd{color:#000;background-color:#fafbfc;box-shadow:inset 0 -1px 0 #c6cbd1;}#settings-menu>a,#help-button>a{color:#000;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:#717171;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:#E0E0E0;}#source-sidebar div.files>a.selected{background-color:#fff;}.scraped-example-list .scrape-help{border-color:#555;color:#333;}.scraped-example-list .scrape-help:hover{border-color:black;color:black;}.scraped-example .example-wrap .rust span.highlight{background:#fcffd6;}.scraped-example .example-wrap .rust span.highlight.focus{background:#f6fdb0;}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(255,255,255,1),rgba(255,255,255,0));}.toggle-line-inner{background:#ccc;}.toggle-line:hover .toggle-line-inner{background:#999;} \ No newline at end of file diff --git a/main.js b/main.js deleted file mode 100644 index bc53780fb..000000000 --- a/main.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict";function getVar(name){const el=document.getElementById("rustdoc-vars");if(el){return el.attributes["data-"+name].value}else{return null}}function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function elemIsInParent(elem,parent){while(elem&&elem!==document.body){if(elem===parent){return true}elem=elem.parentElement}return false}function blurHandler(event,parentElem,hideCallback){if(!elemIsInParent(document.activeElement,parentElem)&&!elemIsInParent(event.relatedTarget,parentElem)){hideCallback()}}(function(){window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate")}());function setMobileTopbar(){const mobileLocationTitle=document.querySelector(".mobile-topbar h2");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileLocationTitle&&locationTitle){mobileLocationTitle.innerHTML=locationTitle.innerHTML}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function loadCss(cssFileName){const link=document.createElement("link");link.href=resourcePath(cssFileName,".css");link.type="text/css";link.rel="stylesheet";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}addClass(getSettingsButton(),"rotate");event.preventDefault();loadCss("settings");loadScript(resourcePath("settings",".js"))};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:()=>{switchDisplayedElement(null);document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(resourcePath("search",".js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search);loadSearch()}},};function getPageId(){if(window.location.hash){const tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();switchDisplayedElement(null);if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}ev.preventDefault();searchState.defocus();window.hidePopoverMenus()}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const item of filtered){const name=item[0];const desc=item[1];let path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}const current_page=document.location.href.split("/").pop();const link=document.createElement("a");link.href=path;link.title=desc;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("union","unions","Unions");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Definitions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector("h1.fqn > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=script?script.getAttribute("data-ignore-extern-crates"):"";for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.indexOf(lib)!==-1){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&href.indexOf("http")!==0){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";if(window.rootPath!=="./"&&crate===window.currentCrate){link.className="current"}link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(!hasClass(e,"type-contents-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}});const pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};(function(){if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}}());let oldSidebarScrollPosition=null;window.rustdocMobileScrollLock=function(){const mobile_topbar=document.querySelector(".mobile-topbar");if(window.innerWidth<=window.RUSTDOC_MOBILE_BREAKPOINT){oldSidebarScrollPosition=window.scrollY;document.body.style.width=`${document.body.offsetWidth}px`;document.body.style.position="fixed";document.body.style.top=`-${oldSidebarScrollPosition}px`;if(mobile_topbar){mobile_topbar.style.top=`${oldSidebarScrollPosition}px`;mobile_topbar.style.position="relative"}}else{oldSidebarScrollPosition=null}};window.rustdocMobileScrollUnlock=function(){const mobile_topbar=document.querySelector(".mobile-topbar");if(oldSidebarScrollPosition!==null){document.body.style.width="";document.body.style.position="";document.body.style.top="";if(mobile_topbar){mobile_topbar.style.top="";mobile_topbar.style.position=""}window.scrollTo(0,oldSidebarScrollPosition);oldSidebarScrollPosition=null}};function showSidebar(){window.rustdocMobileScrollLock();const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){window.rustdocMobileScrollUnlock();const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.innerWidth>window.RUSTDOC_MOBILE_BREAKPOINT&&oldSidebarScrollPosition!==null){hideSidebar()}});function handleClick(id,f){const elem=document.getElementById(id);if(elem){elem.addEventListener("click",f)}}handleClick(MAIN_ID,()=>{hideSidebar()});onEachLazy(document.getElementsByTagName("a"),el=>{if(el.hash){el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})}});onEachLazy(document.querySelectorAll(".rustdoc-toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});onEachLazy(document.getElementsByClassName("notable-traits"),e=>{e.onclick=function(){this.getElementsByClassName("notable-traits-tooltiptext")[0].classList.toggle("force-tooltip")}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");book_info.className="top";book_info.innerHTML="You can find more information in \ - the rustdoc book.";const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ - restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ - enum, trait, type, macro, \ - and const.","Search functions by type signature (e.g., vec -> usize or \ - -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ - str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ - your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;container.onclick=event=>{event.preventDefault()};help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hidePopoverMenus=function(){onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hidePopoverMenus();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;window.copy_path=but=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/normalize.css b/normalize.css deleted file mode 100644 index 469959f13..000000000 --- a/normalize.css +++ /dev/null @@ -1,2 +0,0 @@ - /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/noscript.css b/noscript.css deleted file mode 100644 index e81ec197a..000000000 --- a/noscript.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}nav.sub{display:none;}.source .sidebar{display:none;} \ No newline at end of file diff --git a/rustdoc.css b/rustdoc.css deleted file mode 100644 index 55d0abf3a..000000000 --- a/rustdoc.css +++ /dev/null @@ -1 +0,0 @@ - @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}h1.fqn{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;justify-content:space-between;padding-bottom:6px;margin-bottom:15px;}#toggle-all-docs{text-decoration:none;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-left>a,.out-of-band,span.since,a.srclink,#help-button>a,details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.non-exhaustive>summary,.scraped-example-title,.more-examples-toggle summary,.more-examples-toggle .hide-more,.example-links a,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.module-item .stab,.import-item .stab,.result-name .primitive>i,.result-name .keyword>i,.method .where,.fn .where,.where.fmt-newline{color:var(--main-color);}.content span.enum,.content a.enum,.content span.struct,.content a.struct,.content span.union,.content a.union,.content span.primitive,.content a.primitive,.content span.type,.content a.type,.content span.foreigntype,.content a.foreigntype{color:var(--type-link-color);}.content span.trait,.content a.trait,.content span.traitalias,.content a.traitalias{color:var(--trait-link-color);}.content span.associatedtype,.content a.associatedtype,.content span.constant,.content a.constant,.content span.static,.content a.static{color:var(--assoc-item-link-color);}.content span.fn,.content a.fn,.content .fnname,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod{color:var(--function-link-color);}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:var(--macro-link-color);}.content span.mod,.content a.mod{color:var(--mod-link-color);}.content span.keyword,.content a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}p:last-child{margin:0;}button{padding:1px 6px;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.source main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}.source .width-limiter{max-width:unset;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;}.item-decl pre{overflow-x:auto;}.source .content pre{padding:20px;}img{max-width:100%;}.source .content{overflow:visible;}.sub-logo-container{line-height:0;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:var(--sidebar-background-color);}.sidebar{font-size:0.875rem;width:200px;min-width:200px;overflow-y:scroll;position:sticky;height:100vh;top:0;left:0;}.rustdoc.source .sidebar{width:50px;min-width:0px;max-width:300px;flex-grow:0;flex-shrink:0;flex-basis:auto;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.source .sidebar,#sidebar-toggle,#source-sidebar{background-color:var(--sidebar-background-color);}#sidebar-toggle>button:hover,#sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.source .sidebar>*:not(#sidebar-toggle){visibility:hidden;}.source-sidebar-expanded .source .sidebar{overflow-y:auto;width:300px;}.source-sidebar-expanded .source .sidebar>*:not(#sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.sidebar .logo-container{display:flex;margin-top:10px;margin-bottom:10px;justify-content:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.block a,.sidebar h2 a,.sidebar h3 a{display:block;padding:0.25rem;margin-left:-0.25rem;text-overflow:ellipsis;overflow:hidden;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0;margin-top:0.7rem;margin-bottom:0.7rem;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>h2{padding-left:24px;}.sidebar a,.sidebar .current{color:var(--sidebar-link-color);}.sidebar .current,.sidebar a:hover{background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;}.mobile-topbar{display:none;}.source .content pre.rust{overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap>pre{margin:0;flex-grow:1;overflow-x:auto;}.rustdoc .example-wrap>pre.example-line-numbers,.rustdoc .example-wrap>pre.src-line-numbers{flex-grow:0;overflow:initial;text-align:right;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.example-line-numbers{border:1px solid;padding:13px 8px;border-top-left-radius:5px;border-bottom-left-radius:5px;border-color:var(--example-line-numbers-border-color);}.src-line-numbers span{cursor:pointer;color:var(--src-line-numbers-span-color);}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.src-line-numbers :target{background-color:transparent;}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;overflow:hidden;text-overflow:ellipsis;}.docblock>:not(pre)>code,.docblock-short>code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.source .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;width:calc(100% - 2px);overflow-x:auto;display:block;border-collapse:collapse;}.docblock table td{padding:.5em;border:1px dashed var(--border-color);vertical-align:top;}.docblock table th{padding:.5em;text-align:left;border:1px solid var(--border-color);}.method .where,.fn .where,.where.fmt-newline{display:block;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-top:0;margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.source nav.sub{margin:0 0 15px 0;}.source .search-form{margin-left:32px;}a{text-decoration:none;}.small-section-header{display:flex;justify-content:space-between;position:relative;}.small-section-header:hover>.anchor{display:initial;}.impl:hover>.anchor,.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.anchor::before{content:'§';}.main-heading a:hover,.example-wrap>pre.rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):hover,.item-info a{text-decoration:underline;}.crate.block a.current{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;}.item-row{display:table-row;}.item-left,.item-right{display:table-cell;}.item-left{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:inline-flex;max-width:100%;align-items:baseline;}#crate-search-div{display:inline-block;position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0;padding-left:4px;padding-right:23px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}@-moz-document url-prefix(){#crate-search{padding-left:0px;padding-right:19px;}}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url("down-arrow.svg");}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc{width:50%;}.search-results .result-name{padding-right:1em;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.popover{font-size:1rem;position:absolute;right:0;z-index:2;display:block;margin-top:7px;border-radius:3px;border:1px solid var(--border-color);font-size:1rem;}.popover::before{content:'';position:absolute;right:11px;border:solid var(--border-color);border-width:1px 1px 0 0;display:inline-block;padding:4px;transform:rotate(-45deg);top:-5px;}.popover,.popover::before{background-color:var(--main-background-color);color:var(--main-color);}#help.popover{max-width:600px;}#help.popover::before{right:48px;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{width:fit-content;min-height:36px;display:flex;align-items:center;white-space:pre-wrap;}.stab{padding:3px;margin-bottom:5px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji{font-size:1.25rem;margin-right:0.3rem;}.docblock .stab{padding:0 0.125em;margin-bottom:0;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:0.875rem;line-height:1.2;margin-bottom:0;margin-left:0.3125em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;padding-right:2px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attribute{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;cursor:pointer;left:-25px;top:5px;}.example-wrap .tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:1rem;border:1px solid var(--border-color);position:absolute;width:max-content;top:-2px;z-index:1;}.example-wrap .tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;z-index:1;}.example-wrap.ignore .tooltip::after{content:"This example is not tested";}.example-wrap.compile_fail .tooltip::after{content:"This example deliberately fails to compile";}.example-wrap.should_panic .tooltip::after{content:"This example panics";}.example-wrap.edition .tooltip::after{content:"This code runs with edition " attr(data-edition);}.example-wrap .tooltip:hover::before,.example-wrap .tooltip:hover::after{display:inline;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}a.test-arrow{display:inline-block;visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{font-size:1.25rem;}h3.variant{font-weight:600;font-size:1.125rem;margin-bottom:10px;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target>code,:target>.code-header{opacity:1;}:target{padding-right:3px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:1rem;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:1.1875rem;font-weight:600;display:block;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:1.25rem;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#titles>button{text-align:center;font-size:1.125rem;cursor:pointer;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#titles>button>div.count{display:inline-block;font-size:1rem;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:center;align-items:center;z-index:10;}#source-sidebar{width:100%;overflow:auto;}#source-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;cursor:pointer;text-align:center;border:none;outline:none;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;outline:none;}#settings-menu>a,#help-button>a,#copy-path{width:33px;cursor:pointer;line-height:1.5;}#settings-menu>a,#help-button>a{padding:5px;height:100%;display:block;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}#help-button>a{text-align:center;font-size:20px;padding-top:2px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;cursor:default;}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary::after{content:" ►";position:absolute;left:-15px;top:0px;font-size:80%;padding:2px 0px;width:25px;}details[open].dir-entry>summary::after{content:" ▼";}details.dir-entry>summary::-webkit-details-marker,details.dir-entry>summary::marker{display:none;}details.dir-entry>summary{margin:0 0 0 13px;list-style:none;cursor:pointer;position:relative;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.rustdoc-toggle{contain:layout;position:relative;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary{list-style:none;outline:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"";cursor:pointer;width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;vertical-align:middle;opacity:.5;}details.rustdoc-toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.rustdoc-toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.rustdoc-toggle>summary.hideme::after{content:"";}details.rustdoc-toggle>summary:focus::before,details.rustdoc-toggle>summary:hover::before{opacity:1;}details.rustdoc-toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-size:1rem;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{background-image:url("toggle-minus.svg");}details.rustdoc-toggle>summary::before{background-image:url("toggle-plus.svg");}details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;content:"";}details.rustdoc-toggle[open] >summary::after,details.rustdoc-toggle[open] >summary.hideme::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{padding-top:0px;display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}#copy-path{display:none;}.sidebar .sidebar-logo,.sidebar .location{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;margin-left:0;margin:0;padding:0;z-index:11;height:calc(100vh - 45px);}.source main,.rustdoc.source .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.source-sidebar-expanded .source .sidebar,.sidebar:focus-within{left:0;}.rustdoc.source>.sidebar{width:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container{max-height:45px;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin-left:20px;margin-top:5px;margin-bottom:5px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.sidebar-elems{margin-top:1em;background-color:var(--sidebar-background-color);}.content{margin-left:0px;}.anchor{display:none !important;}#titles>button>div.count{display:block;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main-content>details.rustdoc-toggle>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}#sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;border:1px solid;border-left:0;}.source-sidebar-expanded #sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.item-table{display:block;}.item-row{display:flex;flex-flow:column wrap;}.item-left,.item-right{width:100%;}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc{width:100%;}.search-results div.desc,.item-right{padding-left:2em;}.source-sidebar-expanded .source .sidebar{max-width:100vw;width:100vw;}details.rustdoc-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,#main-content>details.rustdoc-toggle:not(.top-doc)>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.source nav.sub{margin:0;padding:8px;}}@media print{nav.sidebar,nav.sub,.out-of-band,a.srclink,#copy-path,details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle>summary::before,details.rustdoc-toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;}#sidebar-toggle{top:10px;}.source-sidebar-expanded #sidebar-toggle{top:unset;}}.method-toggle>summary,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.methods>section{margin-bottom:0.75em;}.method-toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .method-toggle:not(:last-child),#synthetic-implementations-list .method-toggle:not(:last-child),#blanket-implementations-list .method-toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;background:transparent;border-width:1px;border-style:solid;border-radius:50px;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:240px;}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;max-height:240px;padding-bottom:0;}.scraped-example .code-wrapper .prev{position:absolute;top:0.25em;right:2.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .next{position:absolute;top:0.25em;right:1.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .expand{position:absolute;top:0.25em;right:0.25em;z-index:100;cursor:pointer;}.scraped-example:not(.expanded) .code-wrapper:before{content:" ";width:100%;height:5px;position:absolute;z-index:100;top:0;}.scraped-example:not(.expanded) .code-wrapper:after{content:" ";width:100%;height:5px;position:absolute;z-index:100;bottom:0;}.scraped-example .code-wrapper .src-line-numbers{margin:0;padding:14px 0;}.scraped-example .code-wrapper .src-line-numbers span{padding:0 14px;}.scraped-example .code-wrapper .example-wrap{flex:1;overflow-x:auto;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .code-wrapper .example-wrap pre.rust{overflow-x:inherit;width:inherit;overflow-y:hidden;}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;margin-bottom:5px;cursor:pointer;}.more-scraped-examples{margin-left:5px;display:flex;flex-direction:row;}.more-scraped-examples-inner{width:calc(100% - 20px);}.toggle-line{align-self:stretch;margin-right:10px;margin-top:5px;padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;}.more-scraped-examples .scraped-example{margin-bottom:20px;}.more-scraped-examples .scraped-example:last-child{margin-bottom:0;}.example-links a{margin-top:20px;}.example-links ul{margin-bottom:0;} \ No newline at end of file diff --git a/search-index.js b/search-index.js index a54d560c8..86efa6cfb 100644 --- a/search-index.js +++ b/search-index.js @@ -1,12 +1,12 @@ 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,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],"n":["Identity","IdentityExt","IdentityMiddleware","borrow","borrow","borrow_mut","borrow_mut","builder","clone","clone_into","config","default","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"],"q":["actix_identity","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_identity::config","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"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 …","","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 …","",""],"i":[0,0,0,5,2,5,2,2,2,2,0,2,5,2,5,16,5,5,2,5,5,2,2,5,2,5,2,5,2,5,2,11,0,0,11,11,1,11,1,1,11,1,11,1,11,1,11,1,11,1,1,1,11,1,11,1,11,1,11,1,1,11,1],"f":[0,0,0,[[]],[[]],[[]],[[]],[[],1],[2,2],[[]],0,[[],2],[[]],[[]],[[3,4]],[[],[[7,[5,6]]]],[5,[[7,[8,6]]]],[[]],[[]],[[9,8],[[7,[5,6]]]],[5],[2],[[]],[[],7],[[],7],[[],7],[[],7],[[],10],[[],10],[[]],[[]],0,0,0,0,[[]],[[]],[[]],[[]],[1,2],[11,11],[1,1],[[]],[[]],[[11,12],13],[[1,12],13],[[]],[[]],[[]],[[]],[[1,[15,[14]]],1],[[1,11],1],[[]],[[]],[[],7],[[],7],[[],7],[[],7],[[],10],[[],10],[[1,[15,[14]]],1],[[]],[[]]],"p":[[3,"IdentityMiddlewareBuilder"],[3,"IdentityMiddleware"],[3,"HttpRequest"],[4,"Payload"],[3,"Identity"],[3,"Error"],[4,"Result"],[3,"String"],[3,"Extensions"],[3,"TypeId"],[4,"LogoutBehaviour"],[3,"Formatter"],[6,"Result"],[3,"Duration"],[4,"Option"],[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,12,12,12,12],"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","0","0","0","0"],"q":["actix_limitation","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_limitation::Error","","",""],"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,21,22,23,24],"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],[[]],[[]],[[]],[[]],[[]],0,0,0,0],"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,"ComponentRange"],[3,"RedisError"],[15,"usize"],[3,"Duration"],[3,"Demand"],[8,"Error"],[4,"Option"],[3,"TypeId"],[13,"Client"],[13,"LimitExceeded"],[13,"Time"],[13,"Other"]]},\ -"actix_protobuf":{"doc":"Protobuf payload extractor for Actix Web.","t":[12,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,12,12,12],"n":["0","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","0","0","0"],"q":["actix_protobuf","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_protobuf::ProtoBufPayloadError","",""],"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":[3,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,24,25,26],"f":[0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],1],[[[3,[2]]]],[[[3,[2]]]],[4,5],[[[3,[2]],6],7],[[[3,[2]],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],[[]],[[]],[[]],[[]],0,0,0],"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"],[13,"Serialize"],[13,"Deserialize"],[13,"Payload"]]},\ -"actix_redis":{"doc":"Redis integration for actix.","t":[12,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,12,12,12,12,12,12,12,12,12,12,12,12,12],"n":["0","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","0","0","0","0","0","0","0","1","0","0","0","0","0"],"q":["actix_redis","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_redis::Error","actix_redis::RespError","","","","","","","actix_redis::RespValue","","","",""],"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":[7,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,29,30,31,32,33,34,35,32,36,37,38,39,40],"f":[0,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],[[]],[14,1],[15,1],[16,1],[14,1],[[[19,[17,18]]],1],[[]],[[[20,[16]]],1],[[],1],[21,13],[[]],[5,13],[1,[[12,[1,13]]]],[[4,7]],[[4,[12,[1,13]]]],[[]],[[]],[[]],[[]],[[]],[22],[22],[1],0,[4],[10,[[24,[23]]]],[13,[[24,[23]]]],[[[25,[14]]],[[26,[4]]]],[[4,27]],[[]],[[],14],[[],14],[[],12],[[],12],[[],12],[[],12],[[],12],[[],12],[[],12],[[],12],[[],12],[[],12],[[],28],[[],28],[[],28],[[],28],[[],28],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,0],"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"],[3,"String"],[15,"usize"],[15,"str"],[15,"u8"],[3,"Global"],[3,"Vec"],[3,"Arc"],[3,"TrySendError"],[3,"Demand"],[8,"Error"],[4,"Option"],[8,"Into"],[3,"Addr"],[3,"Context"],[3,"TypeId"],[13,"Redis"],[13,"Internal"],[13,"IO"],[13,"Resp"],[13,"Remote"],[13,"Connection"],[13,"Unexpected"],[13,"Array"],[13,"BulkString"],[13,"Error"],[13,"Integer"],[13,"SimpleString"]]},\ -"actix_session":{"doc":"Session management for Actix Web.","t":[13,13,13,3,8,3,3,3,4,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,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,0,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,3,13,4,13,13,3,13,13,4,3,13,4,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,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,3,13,4,13,13,13,3,3,3,3,4,13,13,3,8,4,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,11,11,11,11,11,11,11,11,11,10,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,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12],"n":["Changed","Purged","Renewed","Session","SessionExt","SessionGetError","SessionInsertError","SessionMiddleware","SessionStatus","Unchanged","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","builder","clear","clone","clone","clone","clone_into","clone_into","clone_into","config","default","entries","eq","equivalent","error_response","error_response","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from_request","get","get_session","insert","into","into","into","into","into","new","new_transform","provide","provide","purge","remove","remove_as","renew","source","source","status","storage","to_owned","to_owned","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","BrowserSession","BrowserSession","CookieContentSecurity","OnEveryRequest","OnStateChanges","PersistentSession","PersistentSession","Private","SessionLifecycle","SessionMiddlewareBuilder","Signed","TtlExtensionPolicy","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cookie_content_security","cookie_domain","cookie_http_only","cookie_name","cookie_path","cookie_same_site","cookie_secure","default","default","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","into","into","into","into","into","into","session_lifecycle","session_ttl","session_ttl_extension_policy","state_ttl","state_ttl_extension_policy","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","vzip","0","0","CookieSessionStore","Deserialization","LoadError","Other","Other","Other","RedisActorSessionStore","RedisActorSessionStoreBuilder","RedisSessionStore","RedisSessionStoreBuilder","SaveError","Serialization","Serialization","SessionKey","SessionStore","UpdateError","as_ref","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","build","builder","builder","cache_keygen","cache_keygen","clone","clone_into","default","delete","delete","delete","delete","eq","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","into","into","into","into","into","into","into","into","into","load","load","load","load","new","new","provide","provide","provide","save","save","save","save","source","source","source","to_owned","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","update","update","update","update","update_ttl","update_ttl","update_ttl","update_ttl","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","0","0","0","0","0","0"],"q":["actix_session","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_session::config","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_session::config::SessionLifecycle","","actix_session::storage","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_session::storage::LoadError","","actix_session::storage::SaveError","","actix_session::storage::UpdateError",""],"d":["Session state has been updated - the changes will have to …","The session has been flagged for deletion - the session …","The session has been flagged for renewal.","The primary interface to access and modify session state.","Extract a Session object from various actix-web types …","Error returned by Session::get.","Error returned by Session::insert.","A middleware for session management in Actix Web …","Status of a Session.","The session state has not been modified since its …","","","","","","","","","","","A fluent API to configure SessionMiddleware.","Clear the session.","","","","","","","Configuration options to tune the behaviour of …","","Get all raw key-value data from the session.","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","","Get a value from the session.","Extract a Session object.","Inserts a key-value pair into the session.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Use SessionMiddleware::new to initialize the session …","","","","Removes session both client and server side.","Remove value from the session.","Remove value from the session and deserialize.","Renews the session key, assigning existing session state …","","","Returns session status.","Pluggable storage backends for session state.","","","","","","","","","","","","","","","","","","","","","","","","","","A session lifecycle strategy where the session cookie …","The session cookie will expire when the current browser …","Determines how to secure the content of the session cookie.","The TTL is refreshed every time the server receives a …","The TTL is refreshed every time the session state changes …","A session lifecycle strategy where the session cookie will …","The session cookie will be a persistent cookie.","The cookie content is encrypted when using …","Determines what type of session cookie should be used and …","A fluent, customized SessionMiddleware builder.","The cookie content is signed when using …","Configuration for which events should trigger an extension …","","","","","","","","","","","","","Finalise the builder and return a SessionMiddleware …","","","","","","","","","","","Choose how the session cookie content should be secured.","Set the Domain attribute for the cookie used to store the …","Set the HttpOnly attribute for the cookie used to store …","Set the name of the cookie used to store the session ID.","Set the Path attribute for the cookie used to store the …","Set the SameSite attribute for the cookie used to store …","Set the Secure attribute for the cookie used to store the …","","","","","","","","Returns the argument unchanged.","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).","Calls U::from(self).","Determines what type of session cookie should be used and …","Specifies how long the session cookie should live.","Determines under what circumstances the TTL of your …","Sets a time-to-live (TTL) when storing the session state …","Determine under what circumstances the TTL of your session …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Use the session key, stored in the session cookie, as …","Failed to deserialize session state.","Possible failures modes for SessionStore::load.","Something went wrong when retrieving the session state.","Something went wrong when persisting the session state.","Something went wrong when updating the session state.","Use Redis as session storage backend.","A fluent builder to construct a RedisActorSessionStore …","Use Redis as session storage backend.","A fluent builder to construct a RedisSessionStore instance …","Possible failures modes for SessionStore::save.","Failed to serialize session state.","Failed to serialize session state.","A session key, the string stored in a client-side cookie …","The interface to retrieve and save the current session …","Possible failures modes for SessionStore::update.","","","","","","","","","","","","","","","","","","","","Finalise the builder and return a RedisActorSessionStore …","Finalise the builder and return a RedisActorSessionStore …","A fluent API to configure RedisActorSessionStore.","A fluent API to configure RedisSessionStore. It takes as …","Set a custom cache key generation strategy, expecting a …","Set a custom cache key generation strategy, expecting a …","","","","Deletes a session from the store.","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","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).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Loads the session state associated to a session key.","","","","Create a new instance of RedisActorSessionStore using the …","Create a new instance of RedisSessionStore using the …","","","","Persist the session state for a newly created session.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Updates the session state associated to a pre-existing …","","","","Updates the TTL of the session state associated to a …","","","","","","","","","","","","","","","","","",""],"i":[7,7,7,0,0,0,0,0,0,7,6,4,7,12,15,6,4,7,12,15,6,4,6,4,7,6,4,7,0,7,4,7,7,12,15,7,12,12,15,15,6,4,7,12,12,15,15,4,4,49,4,6,4,7,12,15,6,6,12,15,4,4,4,4,12,15,4,0,6,4,7,12,15,6,4,7,12,15,6,4,7,12,15,6,4,7,12,15,6,4,7,12,15,0,30,0,33,33,0,30,34,0,0,34,0,3,30,31,32,33,34,3,30,31,32,33,34,3,30,31,32,33,34,30,31,32,33,34,3,3,3,3,3,3,3,31,32,30,31,32,33,34,3,30,30,30,31,32,33,34,3,30,31,32,33,34,3,32,32,31,31,30,31,32,33,34,3,30,31,32,33,34,3,30,31,32,33,34,3,30,31,32,33,34,3,30,31,32,33,34,50,51,0,46,0,46,47,48,0,0,0,0,0,47,48,0,0,0,37,39,38,40,46,47,48,37,42,41,39,38,40,46,47,48,37,42,41,38,40,39,41,38,40,41,41,42,1,39,42,41,37,37,46,46,47,47,48,48,37,39,38,40,46,47,48,37,42,41,39,38,40,46,47,48,37,42,41,1,39,42,41,39,41,46,47,48,1,39,42,41,46,47,48,41,46,47,48,39,38,40,46,47,48,37,37,42,41,39,38,40,46,47,48,37,42,41,39,38,40,46,47,48,37,42,41,1,39,42,41,1,39,42,41,39,38,40,46,47,48,37,42,41,52,53,54,55,56,57],"f":[0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[1,2],[[3,[1]]]],[4],[[[6,[[0,[5,1]]]]],[[6,[[0,[5,1]]]]]],[4,4],[7,7],[[]],[[]],[[]],0,[[],7],[4,[[10,[[9,[8,8]]]]]],[[7,7],11],[[],11],[12,[[14,[13]]]],[15,[[14,[13]]]],[[7,16],17],[[12,16],17],[[12,16],17],[[15,16],17],[[15,16],17],[[]],[[]],[[]],[[]],[18,12],[[]],[18,15],[[19,20]],[[4,21],[[24,[[23,[22]],12]]]],[[],4],[[4,[25,[8]],26],[[24,[15]]]],[[]],[[]],[[]],[[]],[[]],[[1,2],[[6,[1]]]],[6],[27],[27],[4],[[4,21],[[23,[8]]]],[[4,21],[[23,[[24,[22,8]]]]]],[4],[12,[[23,[28]]]],[15,[[23,[28]]]],[4,7],0,[[]],[[]],[[]],[[],8],[[],8],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],29],[[],29],[[],29],[[],29],[[],29],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[3,[1]]],[[6,[1]]]],[30,30],[31,31],[32,32],[33,33],[34,34],[[]],[[]],[[]],[[]],[[]],[[[3,[1]],34],[[3,[1]]]],[[[3,[1]],[23,[8]]],[[3,[1]]]],[[[3,[1]],11],[[3,[1]]]],[[[3,[1]],8],[[3,[1]]]],[[[3,[1]],8],[[3,[1]]]],[[[3,[1]],35],[[3,[1]]]],[[[3,[1]],11],[[3,[1]]]],[[],31],[[],32],[[30,16],17],[[31,16],17],[[32,16],17],[[33,16],17],[[34,16],17],[[]],[[]],[31,30],[32,30],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[3,[1]],[25,[30]]],[[3,[1]]]],[[32,36],32],[[32,33],32],[[31,36],31],[[31,33],31],[[]],[[]],[[]],[[]],[[]],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[37,21],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[38,39],[40,[[24,[41,18]]]],[[[25,[8]]],38],[[[25,[8]]],40],[38,38],[40,40],[41,41],[[]],[[],42],[37,[[45,[[44,[43]]]]]],[[39,37],[[45,[[44,[43]]]]]],[[42,37],[[45,[[44,[43]]]]]],[[41,37],[[45,[[44,[43]]]]]],[[37,37],11],[[],11],[[46,16],17],[[46,16],17],[[47,16],17],[[47,16],17],[[48,16],17],[[48,16],17],[[37,16],17],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[37,[[45,[[44,[43]]]]]],[[39,37],[[45,[[44,[43]]]]]],[[42,37],[[45,[[44,[43]]]]]],[[41,37],[[45,[[44,[43]]]]]],[[[25,[8]]],39],[[[25,[8]]],[[24,[41,18]]]],[27],[27],[27],[[[9,[8,8]],36],[[45,[[44,[43]]]]]],[[39,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[42,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[41,[9,[8,8]],36],[[45,[[44,[43]]]]]],[46,[[23,[28]]]],[47,[[23,[28]]]],[48,[[23,[28]]]],[[]],[[],8],[[],8],[[],8],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[8,[[24,[37]]]],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[37,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[39,37,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[42,37,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[41,37,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[37,36],[[45,[[44,[43]]]]]],[[39,37,36],[[45,[[44,[43]]]]]],[[42,37,36],[[45,[[44,[43]]]]]],[[41,37,36],[[45,[[44,[43]]]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0],"p":[[8,"SessionStore"],[3,"Key"],[3,"SessionMiddlewareBuilder"],[3,"Session"],[8,"Clone"],[3,"SessionMiddleware"],[4,"SessionStatus"],[3,"String"],[3,"HashMap"],[3,"Ref"],[15,"bool"],[3,"SessionGetError"],[3,"BoxBody"],[3,"HttpResponse"],[3,"SessionInsertError"],[3,"Formatter"],[6,"Result"],[3,"Error"],[3,"HttpRequest"],[4,"Payload"],[15,"str"],[8,"DeserializeOwned"],[4,"Option"],[4,"Result"],[8,"Into"],[8,"Serialize"],[3,"Demand"],[8,"Error"],[3,"TypeId"],[4,"SessionLifecycle"],[3,"BrowserSession"],[3,"PersistentSession"],[4,"TtlExtensionPolicy"],[4,"CookieContentSecurity"],[4,"SameSite"],[3,"Duration"],[3,"SessionKey"],[3,"RedisActorSessionStoreBuilder"],[3,"RedisActorSessionStore"],[3,"RedisSessionStoreBuilder"],[3,"RedisSessionStore"],[3,"CookieSessionStore"],[8,"Future"],[3,"Box"],[3,"Pin"],[4,"LoadError"],[4,"SaveError"],[4,"UpdateError"],[8,"SessionExt"],[13,"BrowserSession"],[13,"PersistentSession"],[13,"Deserialization"],[13,"Other"],[13,"Serialization"],[13,"Other"],[13,"Serialization"],[13,"Other"]]},\ -"actix_settings":{"doc":"Easily manage Actix Web’s settings from a TOML file and …","t":[3,3,8,4,3,13,13,13,13,13,13,13,13,13,4,13,13,13,4,13,13,13,13,4,4,13,4,3,4,13,8,13,13,13,13,13,13,6,4,3,13,12,12,10,12,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,12,12,12,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,12,12,12,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,11,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,11,11,10,11,11,11,11,11,11,11,11,11,12,12,12,12,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,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12],"n":["ActixSettings","Address","ApplySettings","Backlog","BasicSettings","Default","Default","Default","Default","Default","Default","Development","Disabled","EnvVarError","Error","FileExists","InvalidValue","IoError","KeepAlive","Manual","Manual","Manual","Manual","MaxConnectionRate","MaxConnections","Milliseconds","Mode","NoSettings","NumWorkers","Os","Parse","ParseAddressError","ParseBoolError","ParseIntError","Production","Seconds","Seconds","Settings","Timeout","Tls","TomlError","actix","application","apply_settings","backlog","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","certificate","client_shutdown","client_timeout","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","enable_compression","enable_log","enabled","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_default_template","from_template","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","host","hosts","into","into","into","into","into","into","into","into","into","into","into","into","into","keep_alive","max_connection_rate","max_connections","mode","num_workers","override_field","override_field_with_env_var","parse","parse","parse","parse","parse","parse","parse","parse","parse","parse_toml","port","private_key","shutdown_timeout","tls","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","write_toml_file","0","0","0","0","0","0","0","0","column","expected","file","got","line","0","0","0","0","0","0"],"q":["actix_settings","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_settings::Backlog","actix_settings::Error","","","","","","","","","","","","actix_settings::KeepAlive","actix_settings::MaxConnectionRate","actix_settings::MaxConnections","actix_settings::NumWorkers","actix_settings::Timeout",""],"d":["Settings types for Actix Web.","A host/port pair for the server to bind to.","Extension trait for applying parsed settings to the server …","The maximum number of pending connections.","Wrapper for server and application-specific settings.","The default number of connections. See struct docs.","The default keep-alive as defined by Actix Web.","The default connection limit. See struct docs.","The default number of connections. See struct docs.","The default number of workers. See struct docs.","The default timeout. Depends on context.","Marks development environment.","Disable keep-alive.","Environment variable does not exists or is invalid.","Errors that can be returned from methods in this crate.","File already exists on disk.","Invalid value.","I/O error.","The server keep-alive preference.","A specific number of connections.","A specific connection limit.","A specific number of connections.","A specific number of workers.","The maximum per-worker concurrent TLS connection limit.","The maximum per-worker number of concurrent connections.","Timeout in milliseconds.","Marker of intended deployment environment.","Marker type representing no defined application-specific …","The number of workers that the server should start.","Let the OS determine keep-alive duration.","A specialized FromStr trait that returns [AtError] errors","Value is not an address.","Value is not a boolean.","Value is not an integer.","Marks production environment.","A specific keep-alive duration (in seconds).","Timeout in seconds.","Convenience type alias for BasicSettings with no defined …","A timeout duration in milliseconds or seconds.","TLS (HTTPS) configuration.","Error deserializing as TOML.","Actix Web server settings.","Application-specific settings.","Apply a BasicSettings value to self.","The maximum number of pending connections.","","","","","","","","","","","","","","","","","","","","","","","","","","","Path to certificate .pem file.","Timeout duration for connection shutdown.","Timeout duration for reading client request header.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","True if the Compress middleware should be enabled.","True if the Logger middleware should be enabled.","Tru if accepting TLS connections should be enabled.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Parse an instance of Self straight from the default TOML …","Parse an instance of Self straight from the default TOML …","","","","","","","","","","","","","","","","","","","","","","","","","Host part of address.","List of addresses for the server to bind to.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Server keep-alive preference.","The per-worker maximum concurrent TLS connection limit.","The per-worker maximum number of concurrent connections.","Marker of intended deployment environment.","The number of workers that the server should start.","Attempts to parse value and override the referenced field.","Attempts to read an environment variable, parse it, and …","Parse Self from string.","","","","","","","","","Parse an instance of Self from a TOML file located at …","Port part of address.","Path to private key .pem file.","Timeout duration for graceful worker shutdown.","TLS (HTTPS) configuration.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Writes the default TOML template to a new file, located at …","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,0,0,4,5,6,7,9,10,8,5,2,0,2,2,2,0,4,6,7,9,0,0,10,0,0,0,5,0,2,2,2,8,5,10,0,0,0,2,1,1,31,12,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,11,12,12,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,3,4,5,6,7,8,9,10,11,12,1,14,12,12,11,3,4,5,6,7,8,9,10,11,12,1,14,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,2,2,2,2,2,2,2,3,4,5,6,7,8,9,10,11,12,1,14,1,1,3,4,5,6,7,8,9,10,11,12,1,14,3,4,5,6,7,8,9,10,11,12,1,14,3,12,2,3,4,5,6,7,8,9,10,11,12,1,14,12,12,12,12,12,1,1,32,3,4,5,6,7,8,9,10,1,3,11,12,12,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,1,33,34,35,36,37,38,39,40,41,41,41,41,41,42,43,44,45,46,47],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1],0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10],[11,11],[12,12],[[[1,[13]]],[[1,[13]]]],[14,14],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],[[15,[3]]]],[[],[[15,[4]]]],[[],[[15,[5]]]],[[],[[15,[6]]]],[[],[[15,[7]]]],[[],[[15,[8]]]],[[],[[15,[9]]]],[[],[[15,[10]]]],[[],[[15,[11]]]],[[],[[15,[12]]]],[[],[[15,[1]]]],[[],[[15,[14]]]],0,0,0,[[3,3],16],[[4,4],16],[[5,5],16],[[6,6],16],[[7,7],16],[[8,8],16],[[9,9],16],[[10,10],16],[[11,11],16],[[12,12],16],[[[1,[17]],1],16],[[14,14],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[2,18],19],[[3,18],19],[[4,18],19],[[5,18],19],[[6,18],19],[[7,18],19],[[8,18],19],[[9,18],19],[[10,18],19],[[11,18],19],[[12,18],19],[[[1,[20]],18],19],[[14,18],19],[[]],[21,2],[22,2],[23,2],[24,2],[25,2],[26,2],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],[[15,[1,2]]]],[27,[[15,[1,2]]]],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12],[[[1,[29]]]],[14],0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,[[],[[15,[2]]]],[[],[[15,[2]]]],[27,[[15,[2]]]],[27,[[15,[3,2]]]],[27,[[15,[4,2]]]],[27,[[15,[5,2]]]],[27,[[15,[6,2]]]],[27,[[15,[7,2]]]],[27,[[15,[8,2]]]],[27,[[15,[9,2]]]],[27,[[15,[10,2]]]],[[],[[15,[1,2]]]],0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],[[15,[2]]]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"p":[[3,"BasicSettings"],[4,"Error"],[3,"Address"],[4,"Backlog"],[4,"KeepAlive"],[4,"MaxConnectionRate"],[4,"MaxConnections"],[4,"Mode"],[4,"NumWorkers"],[4,"Timeout"],[3,"Tls"],[3,"ActixSettings"],[8,"Clone"],[3,"NoSettings"],[4,"Result"],[15,"bool"],[8,"PartialEq"],[3,"Formatter"],[6,"Result"],[8,"Debug"],[3,"Error"],[4,"VarError"],[3,"IoError"],[3,"ParseBoolError"],[3,"ParseIntError"],[3,"Error"],[15,"str"],[15,"u64"],[8,"Hash"],[3,"TypeId"],[8,"ApplySettings"],[8,"Parse"],[13,"Manual"],[13,"EnvVarError"],[13,"FileExists"],[13,"IoError"],[13,"ParseBoolError"],[13,"ParseIntError"],[13,"ParseAddressError"],[13,"TomlError"],[13,"InvalidValue"],[13,"Seconds"],[13,"Manual"],[13,"Manual"],[13,"Manual"],[13,"Milliseconds"],[13,"Seconds"]],"a":{"https":[39],"ssl":[39]}},\ -"actix_web_httpauth":{"doc":"HTTP authentication schemes for Actix Web.","t":[0,0,0,8,3,16,0,0,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,3,3,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,3,3,4,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,11,11,11,11,11,11,0,0,3,13,3,3,13,13,13,4,8,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,10,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,12,12,12,12,12,8,3,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,4,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,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["extractors","headers","middleware","AuthExtractorConfig","AuthenticationError","Inner","basic","bearer","borrow","borrow_mut","challenge_mut","error_response","fmt","fmt","from","from","into","into_inner","new","provide","status_code","status_code_mut","to_string","try_from","try_into","type_id","vzip","with_error","with_error_description","with_error_uri","BasicAuth","Config","as_ref","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","default","fmt","fmt","from","from","from_request","into","into","into_inner","password","realm","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","user_id","vzip","vzip","BearerAuth","Config","Error","InsufficientScope","InvalidRequest","InvalidToken","as_ref","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","cmp","default","eq","equivalent","fmt","fmt","fmt","fmt","from","from","from","from_request","get_hash","hash","into","into","into","into_inner","partial_cmp","realm","scope","status_code","to_owned","to_owned","to_owned","to_string","token","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","vzip","vzip","vzip","authorization","www_authenticate","Authorization","Base64DecodeError","Basic","Bearer","Invalid","MissingField","MissingScheme","ParseError","Scheme","ToStrError","Utf8Error","as_mut","as_ref","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","cmp","cmp","cmp","default","eq","eq","eq","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","get_hash","hash","into","into","into","into","into_scheme","name","new","new","parse","parse","parse","parse","partial_cmp","partial_cmp","partial_cmp","password","provide","source","to_owned","to_owned","to_owned","to_string","to_string","to_string","to_string","token","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into_pair","try_into_value","try_into_value","try_into_value","type_id","type_id","type_id","type_id","user_id","vzip","vzip","vzip","vzip","0","0","0","0","0","Challenge","WwwAuthenticate","basic","bearer","borrow","borrow_mut","clone","clone_into","cmp","default","eq","equivalent","fmt","from","get_hash","hash","into","name","parse","partial_cmp","to_bytes","to_owned","try_from","try_into","try_into_pair","try_into_value","type_id","vzip","Basic","borrow","borrow_mut","clone","clone_into","cmp","default","eq","equivalent","fmt","fmt","from","get_hash","hash","into","new","partial_cmp","to_owned","to_string","try_from","try_into","try_into_value","type_id","vzip","with_realm","Bearer","BearerBuilder","Error","InsufficientScope","InvalidRequest","InvalidToken","borrow","borrow","borrow_mut","borrow_mut","build","clone","clone_into","cmp","default","default","eq","equivalent","error","error_description","error_uri","finish","fmt","fmt","fmt","from","from","get_hash","hash","into","into","partial_cmp","realm","scope","to_owned","to_string","try_from","try_from","try_into","try_into","try_into_value","type_id","type_id","vzip","vzip","HttpAuthentication","basic","bearer","borrow","borrow_mut","clone","clone_into","fmt","from","into","new_transform","to_owned","try_from","try_into","type_id","vzip","with_fn"],"q":["actix_web_httpauth","","","actix_web_httpauth::extractors","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::extractors::basic","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::extractors::bearer","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::headers","","actix_web_httpauth::headers::authorization","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::headers::authorization::ParseError","","","","actix_web_httpauth::headers::www_authenticate","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::headers::www_authenticate::basic","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::headers::www_authenticate::bearer","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::middleware","","","","","","","","","","","","","","","",""],"d":["Type-safe authentication information extractors.","Typed HTTP headers.","HTTP Authentication middleware.","Trait implemented for types that provides configuration …","Authentication error returned by authentication extractors.","Associated challenge type.","Extractor for the “Basic” HTTP Authentication Scheme.","Extractor for the “Bearer” HTTP Authentication Scheme.","","","Returns mutable reference to the inner challenge instance.","","","","Returns the argument unchanged.","","Calls U::from(self).","Convert the config instance into a HTTP challenge.","Creates new authentication error from the provided …","","","Returns mutable reference to the inner status code.","","","","","","Attach Error to the current Authentication error.","Attach error description to the current Authentication …","Attach error URI to the current Authentication error.","Extractor for HTTP Basic auth.","BasicAuth extractor configuration used for WWW-Authenticate…","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","Calls U::from(self).","Calls U::from(self).","","Returns client’s password.","Set challenge realm attribute.","","","","","","","","","Returns client’s user-ID.","","","Extractor for HTTP Bearer auth","BearerAuth extractor configuration.","Bearer authorization error types, described in RFC 6750.","The request requires higher privileges than provided by …","The request is missing a required parameter, includes an …","The access token provided is expired, revoked, malformed, …","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","Set challenge realm attribute.","Set challenge scope attribute.","Returns HTTP status code suitable for current error type.","","","","","Returns bearer token provided by client.","","","","","","","","","","","","","Authorization header and various auth schemes.","WWW-Authenticate header and various auth challenges.","Authorization header, defined in RFC 7235","Malformed base64 string.","Credentials for Basic authentication scheme, defined in …","Credentials for Bearer authentication scheme, defined in …","Header value is malformed.","Required authentication field is missing.","Authentication scheme is missing.","Possible errors while parsing Authorization header.","Authentication scheme for Authorization header.","Unable to convert header into the str.","Malformed UTF-8 string.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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).","Consumes Authorization header and returns inner Scheme …","","Creates Basic credentials with provided user_id and …","Creates new Bearer credentials with the token provided.","Try to parse an authentication scheme from the …","","","","","","","Returns client’s password if provided.","","","","","","","","","","Gets reference to the credentials token.","","","","","","","","","","","","","","","","","Returns client’s user-ID.","","","","","","","","","","Authentication challenge for WWW-Authenticate header.","WWW-Authenticate header, described in RFC 7235.","Challenge for the “Basic” HTTP Authentication Scheme.","Challenge for the “Bearer” HTTP Authentication Scheme.","","","","","","","","","","Returns the argument unchanged.","","","Calls U::from(self).","","","","Converts the challenge into a bytes suitable for HTTP …","","","","","","","","Challenge for WWW-Authenticate header with HTTP Basic auth …","","","","","","","","","","","Returns the argument unchanged.","","","Calls U::from(self).","Creates new Basic challenge with an empty realm field.","","","","","","","","","Creates new Basic challenge from the provided realm field …","Challenge for WWW-Authenticate header with HTTP Bearer …","Builder for the Bearer challenge.","Bearer authorization error types, described in RFC 6750.","The request requires higher privileges than provided by …","The request is missing a required parameter, includes an …","The access token provided is expired, revoked, malformed, …","","","","","Creates the builder for Bearer challenge.","","","","","","","","Provides the error attribute, as defined in [RFC 6750, …","Provides the error_description attribute, as defined in […","Provides the error_uri attribute, as defined in [RFC 6750 …","Consumes the builder and returns built Bearer instance.","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","","Provides the realm attribute, as defined in RFC 2617.","Provides the scope attribute, as defined in RFC 6749 §3.3.","","","","","","","","","","","","Middleware for checking HTTP authentication.","Construct HttpAuthentication middleware for the HTTP “…","Construct HttpAuthentication middleware for the HTTP “…","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","Construct HttpAuthentication middleware with the provided …"],"i":[0,0,0,0,0,52,0,0,2,2,2,2,2,2,2,2,2,52,2,2,2,2,2,2,2,2,2,2,2,2,0,0,14,14,16,14,16,14,16,14,16,14,14,16,14,16,16,14,16,14,16,14,14,16,14,16,14,16,14,16,16,14,16,0,0,0,13,13,13,21,21,22,13,21,22,13,21,22,13,21,22,13,13,21,13,13,21,22,13,13,21,22,13,22,13,13,21,22,13,21,13,21,21,13,21,22,13,13,22,21,22,13,21,22,13,21,22,13,21,22,13,0,0,0,36,0,0,36,36,36,0,0,36,36,29,29,36,29,31,32,36,29,31,32,29,31,32,29,31,32,29,31,32,29,29,31,32,29,31,32,36,36,29,29,31,31,32,32,36,36,36,36,29,29,29,31,32,29,29,36,29,31,32,29,29,31,32,28,29,31,32,29,31,32,31,36,36,29,31,32,36,29,31,32,32,36,29,31,32,36,29,31,32,29,29,31,32,36,29,31,32,31,36,29,31,32,53,54,55,56,47,0,0,0,0,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,1,47,47,47,47,47,47,47,0,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,13,13,13,50,12,50,12,12,12,12,12,50,12,12,12,50,50,50,50,50,12,12,50,12,12,12,50,12,12,50,50,12,12,50,12,50,12,12,50,12,50,12,0,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51],"f":[0,0,0,0,0,0,0,0,[[]],[[]],[[[2,[1]]]],[[[2,[1]]],3],[[[2,[[0,[4,1]]]],5],6],[[[2,[1]],5],6],[[]],[[],2],[[]],[[]],[1,[[2,[1]]]],[7],[[[2,[1]]],8],[[[2,[1]]],8],[[],9],[[],10],[[],10],[[],11],[[]],[[[2,[12]],13],[[2,[12]]]],[[[2,[12]]],[[2,[12]]]],[[[2,[12]]],[[2,[12]]]],0,0,[14,15],[[]],[[]],[[]],[[]],[14,14],[16,16],[[]],[[]],[[],14],[[14,5],6],[[16,5],6],[[]],[[]],[[17,18]],[[]],[[]],[14],[16,[[20,[19]]]],[14,14],[[]],[[]],[[],10],[[],10],[[],10],[[],10],[[],11],[[],11],[16,19],[[]],[[]],0,0,0,0,0,0,[21,12],[[]],[[]],[[]],[[]],[[]],[[]],[21,21],[22,22],[13,13],[[]],[[]],[[]],[[13,13],23],[[],21],[[13,13],24],[[],24],[[21,5],6],[[22,5],6],[[13,5],6],[[13,5],6],[[]],[[]],[[]],[[17,18]],[[],25],[13],[[]],[[]],[[]],[21],[[13,13],[[20,[23]]]],[[21,[27,[[26,[19]]]]],21],[[21,[27,[[26,[19]]]]],21],[13,8],[[]],[[]],[[]],[[],9],[22,19],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],11],[[],11],[[],11],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,[[[29,[28]]]],[[[29,[28]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[29,[[0,[30,28]]]]],[[29,[[0,[30,28]]]]]],[31,31],[32,32],[[]],[[]],[[]],[[[29,[[0,[33,28]]]],29],23],[[31,31],23],[[32,32],23],[[],[[29,[[0,[34,28]]]]]],[[[29,[[0,[35,28]]]],29],24],[[31,31],24],[[32,32],24],[[],24],[[],24],[[],24],[[36,5],6],[[36,5],6],[[[29,[[0,[4,28]]]],5],6],[[[29,[28]],5],6],[[31,5],6],[[31,5],6],[[32,5],6],[[32,5],6],[37,36],[[]],[38,36],[39,36],[[]],[40],[28,[[29,[28]]]],[[]],[[]],[[],25],[[[29,[[0,[41,28]]]]]],[[]],[[]],[[]],[[]],[[[29,[28]]],28],[[],42],[20,31],[[],32],[43,[[10,[36]]]],[[],[[10,[[29,[28]],44]]]],[43,[[10,[31,36]]]],[43,[[10,[32,36]]]],[[[29,[[0,[45,28]]]],29],[[20,[23]]]],[[31,31],[[20,[23]]]],[[32,32],[[20,[23]]]],[31,[[20,[19]]]],[7],[36,[[20,[46]]]],[[]],[[]],[[]],[[],9],[[],9],[[],9],[[],9],[32,19],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[[29,[28]]],[[10,[43]]]],[31,[[10,[43]]]],[32,[[10,[43]]]],[[],11],[[],11],[[],11],[[],11],[31,19],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,[[]],[[]],[[[47,[[0,[30,1]]]]],[[47,[[0,[30,1]]]]]],[[]],[[[47,[[0,[33,1]]]],47],23],[[],[[47,[[0,[34,1]]]]]],[[[47,[[0,[35,1]]]],47],24],[[],24],[[[47,[[0,[4,1]]]],5],6],[[]],[[],25],[[[47,[[0,[41,1]]]]]],[[]],[[],42],[[],[[10,[[47,[1]],44]]]],[[[47,[[0,[45,1]]]],47],[[20,[23]]]],[[],48],[[]],[[],10],[[],10],[[],10],[[[47,[1]]],[[10,[43]]]],[[],11],[[]],0,[[]],[[]],[15,15],[[]],[[15,15],23],[[],15],[[15,15],24],[[],24],[[15,5],[[10,[49]]]],[[15,5],6],[[]],[[],25],[15],[[]],[[],15],[[15,15],[[20,[23]]]],[[]],[[],9],[[],10],[[],10],[15,[[10,[43]]]],[[],11],[[]],[[],15],0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[],50],[12,12],[[]],[[12,12],23],[[],50],[[],12],[[12,12],24],[[],24],[[50,13],50],[50,50],[50,50],[50,12],[[50,5],6],[[12,5],6],[[12,5],[[10,[49]]]],[[]],[[]],[[],25],[12],[[]],[[]],[[12,12],[[20,[23]]]],[50,50],[50,50],[[]],[[],9],[[],10],[[],10],[[],10],[[],10],[12,[[10,[43]]]],[[],11],[[],11],[[]],[[]],0,[[],[[51,[16]]]],[[],[[51,[22]]]],[[]],[[]],[[[51,[30,30]]],[[51,[30,30]]]],[[]],[[[51,[4,4]],5],6],[[]],[[]],[51],[[]],[[],10],[[],10],[[],11],[[]],[[],51]],"p":[[8,"Challenge"],[3,"AuthenticationError"],[3,"HttpResponse"],[8,"Debug"],[3,"Formatter"],[6,"Result"],[3,"Demand"],[3,"StatusCode"],[3,"String"],[4,"Result"],[3,"TypeId"],[3,"Bearer"],[4,"Error"],[3,"Config"],[3,"Basic"],[3,"BasicAuth"],[3,"HttpRequest"],[4,"Payload"],[15,"str"],[4,"Option"],[3,"Config"],[3,"BearerAuth"],[4,"Ordering"],[15,"bool"],[15,"u64"],[4,"Cow"],[8,"Into"],[8,"Scheme"],[3,"Authorization"],[8,"Clone"],[3,"Basic"],[3,"Bearer"],[8,"Ord"],[8,"Default"],[8,"PartialEq"],[4,"ParseError"],[3,"Utf8Error"],[4,"DecodeError"],[3,"ToStrError"],[15,"never"],[8,"Hash"],[3,"HeaderName"],[3,"HeaderValue"],[4,"ParseError"],[8,"PartialOrd"],[8,"Error"],[3,"WwwAuthenticate"],[3,"Bytes"],[3,"Error"],[3,"BearerBuilder"],[3,"HttpAuthentication"],[8,"AuthExtractorConfig"],[13,"MissingField"],[13,"ToStrError"],[13,"Base64DecodeError"],[13,"Utf8Error"]]}\ +"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,[2]],6],7],[[[3,[2]],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"],[4,"PayloadError"],[3,"DecodeError"],[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],[14,1],[[[17,[15,16]]],1],[14,1],[[],1],[[]],[[[19,[18]]],1],[18,1],[20,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,[14]]],[[26,[4]]]],[[4,27]],[[]],[[],14],[[],14],[[],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"],[3,"String"],[15,"u8"],[3,"Global"],[3,"Vec"],[15,"str"],[3,"Arc"],[15,"usize"],[3,"TrySendError"],[3,"Demand"],[8,"Error"],[4,"Option"],[8,"Into"],[3,"Addr"],[3,"Context"],[3,"TypeId"]]},\ +"actix_session":{"doc":"Session management for Actix Web.","t":[13,13,13,3,8,3,3,3,4,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,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,0,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,3,13,4,13,13,3,13,13,4,3,13,4,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,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,13,4,13,13,13,3,3,3,3,4,13,13,3,8,4,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,11,11,11,11,11,11,11,11,11,10,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,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11],"n":["Changed","Purged","Renewed","Session","SessionExt","SessionGetError","SessionInsertError","SessionMiddleware","SessionStatus","Unchanged","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","builder","clear","clone","clone","clone","clone_into","clone_into","clone_into","config","default","entries","eq","equivalent","error_response","error_response","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from_request","get","get_session","insert","into","into","into","into","into","new","new_transform","provide","provide","purge","remove","remove_as","renew","source","source","status","storage","to_owned","to_owned","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","BrowserSession","BrowserSession","CookieContentSecurity","OnEveryRequest","OnStateChanges","PersistentSession","PersistentSession","Private","SessionLifecycle","SessionMiddlewareBuilder","Signed","TtlExtensionPolicy","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cookie_content_security","cookie_domain","cookie_http_only","cookie_name","cookie_path","cookie_same_site","cookie_secure","default","default","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","into","into","into","into","into","into","session_lifecycle","session_ttl","session_ttl_extension_policy","state_ttl","state_ttl_extension_policy","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","vzip","CookieSessionStore","Deserialization","LoadError","Other","Other","Other","RedisActorSessionStore","RedisActorSessionStoreBuilder","RedisSessionStore","RedisSessionStoreBuilder","SaveError","Serialization","Serialization","SessionKey","SessionStore","UpdateError","as_ref","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","build","builder","builder","cache_keygen","cache_keygen","clone","clone_into","default","delete","delete","delete","delete","eq","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","into","into","into","into","into","into","into","into","into","load","load","load","load","new","new","provide","provide","provide","save","save","save","save","source","source","source","to_owned","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","update","update","update","update","update_ttl","update_ttl","update_ttl","update_ttl","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip"],"q":["actix_session","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_session::config","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_session::storage","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["Session state has been updated - the changes will have to …","The session has been flagged for deletion - the session …","The session has been flagged for renewal.","The primary interface to access and modify session state.","Extract a Session object from various actix-web types …","Error returned by Session::get.","Error returned by Session::insert.","A middleware for session management in Actix Web …","Status of a Session.","The session state has not been modified since its …","","","","","","","","","","","A fluent API to configure SessionMiddleware.","Clear the session.","","","","","","","Configuration options to tune the behaviour of …","","Get all raw key-value data from the session.","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","","Get a value from the session.","Extract a Session object.","Inserts a key-value pair into the session.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Use SessionMiddleware::new to initialize the session …","","","","Removes session both client and server side.","Remove value from the session.","Remove value from the session and deserialize.","Renews the session key, assigning existing session state …","","","Returns session status.","Pluggable storage backends for session state.","","","","","","","","","","","","","","","","","","","","","","","","","","A session lifecycle strategy where the session cookie …","The session cookie will expire when the current browser …","Determines how to secure the content of the session cookie.","The TTL is refreshed every time the server receives a …","The TTL is refreshed every time the session state changes …","A session lifecycle strategy where the session cookie will …","The session cookie will be a persistent cookie.","The cookie content is encrypted when using …","Determines what type of session cookie should be used and …","A fluent, customized SessionMiddleware builder.","The cookie content is signed when using …","Configuration for which events should trigger an extension …","","","","","","","","","","","","","Finalise the builder and return a SessionMiddleware …","","","","","","","","","","","Choose how the session cookie content should be secured.","Set the Domain attribute for the cookie used to store the …","Set the HttpOnly attribute for the cookie used to store …","Set the name of the cookie used to store the session ID.","Set the Path attribute for the cookie used to store the …","Set the SameSite attribute for the cookie used to store …","Set the Secure attribute for the cookie used to store the …","","","","","","","","Returns the argument unchanged.","","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).","Calls U::from(self).","Determines what type of session cookie should be used and …","Specifies how long the session cookie should live.","Determines under what circumstances the TTL of your …","Sets a time-to-live (TTL) when storing the session state …","Determine under what circumstances the TTL of your session …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Use the session key, stored in the session cookie, as …","Failed to deserialize session state.","Possible failures modes for SessionStore::load.","Something went wrong when retrieving the session state.","Something went wrong when persisting the session state.","Something went wrong when updating the session state.","Use Redis as session storage backend.","A fluent builder to construct a RedisActorSessionStore …","Use Redis as session storage backend.","A fluent builder to construct a RedisSessionStore instance …","Possible failures modes for SessionStore::save.","Failed to serialize session state.","Failed to serialize session state.","A session key, the string stored in a client-side cookie …","The interface to retrieve and save the current session …","Possible failures modes for SessionStore::update.","","","","","","","","","","","","","","","","","","","","Finalise the builder and return a RedisActorSessionStore …","Finalise the builder and return a RedisActorSessionStore …","A fluent API to configure RedisActorSessionStore.","A fluent API to configure RedisSessionStore. It takes as …","Set a custom cache key generation strategy, expecting a …","Set a custom cache key generation strategy, expecting a …","","","","Deletes a session from the store.","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","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).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Loads the session state associated to a session key.","","","","Create a new instance of RedisActorSessionStore using the …","Create a new instance of RedisSessionStore using the …","","","","Persist the session state for a newly created session.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Updates the session state associated to a pre-existing …","","","","Updates the TTL of the session state associated to a …","","","","","","","","","","","",""],"i":[7,7,7,0,0,0,0,0,0,7,6,4,7,12,15,6,4,7,12,15,6,4,6,4,7,6,4,7,0,7,4,7,7,12,15,7,12,12,15,15,6,4,7,12,12,15,15,4,4,49,4,6,4,7,12,15,6,6,12,15,4,4,4,4,12,15,4,0,6,4,7,12,15,6,4,7,12,15,6,4,7,12,15,6,4,7,12,15,6,4,7,12,15,0,30,0,33,33,0,30,34,0,0,34,0,3,30,31,32,33,34,3,30,31,32,33,34,3,30,31,32,33,34,30,31,32,33,34,3,3,3,3,3,3,3,31,32,30,31,32,33,34,3,30,30,30,31,32,33,34,3,30,31,32,33,34,3,32,32,31,31,30,31,32,33,34,3,30,31,32,33,34,3,30,31,32,33,34,3,30,31,32,33,34,3,30,31,32,33,34,0,46,0,46,47,48,0,0,0,0,0,47,48,0,0,0,37,39,38,40,46,47,48,37,42,41,39,38,40,46,47,48,37,42,41,38,40,39,41,38,40,41,41,42,1,39,42,41,37,37,46,46,47,47,48,48,37,39,38,40,46,47,48,37,42,41,39,38,40,46,47,48,37,42,41,1,39,42,41,39,41,46,47,48,1,39,42,41,46,47,48,41,46,47,48,39,38,40,46,47,48,37,37,42,41,39,38,40,46,47,48,37,42,41,39,38,40,46,47,48,37,42,41,1,39,42,41,1,39,42,41,39,38,40,46,47,48,37,42,41],"f":[0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[1,2],[[3,[1]]]],[4],[[[6,[[0,[5,1]]]]],[[6,[[0,[5,1]]]]]],[4,4],[7,7],[[]],[[]],[[]],0,[[],7],[4,[[10,[[9,[8,8]]]]]],[[7,7],11],[[],11],[12,[[14,[13]]]],[15,[[14,[13]]]],[[7,16],17],[[12,16],17],[[12,16],17],[[15,16],17],[[15,16],17],[[]],[[]],[[]],[18,12],[[]],[18,15],[[]],[[19,20]],[[4,21],[[24,[[23,[22]],12]]]],[[],4],[[4,[25,[8]],26],[[24,[15]]]],[[]],[[]],[[]],[[]],[[]],[[1,2],[[6,[1]]]],[6],[27],[27],[4],[[4,21],[[23,[8]]]],[[4,21],[[23,[[24,[22,8]]]]]],[4],[12,[[23,[28]]]],[15,[[23,[28]]]],[4,7],0,[[]],[[]],[[]],[[],8],[[],8],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],29],[[],29],[[],29],[[],29],[[],29],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[3,[1]]],[[6,[1]]]],[30,30],[31,31],[32,32],[33,33],[34,34],[[]],[[]],[[]],[[]],[[]],[[[3,[1]],34],[[3,[1]]]],[[[3,[1]],[23,[8]]],[[3,[1]]]],[[[3,[1]],11],[[3,[1]]]],[[[3,[1]],8],[[3,[1]]]],[[[3,[1]],8],[[3,[1]]]],[[[3,[1]],35],[[3,[1]]]],[[[3,[1]],11],[[3,[1]]]],[[],31],[[],32],[[30,16],17],[[31,16],17],[[32,16],17],[[33,16],17],[[34,16],17],[[]],[32,30],[[]],[31,30],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[3,[1]],[25,[30]]],[[3,[1]]]],[[32,36],32],[[32,33],32],[[31,36],31],[[31,33],31],[[]],[[]],[[]],[[]],[[]],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[37,21],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[38,39],[40,[[24,[41,18]]]],[[[25,[8]]],38],[[[25,[8]]],40],[38,38],[40,40],[41,41],[[]],[[],42],[37,[[45,[[44,[43]]]]]],[[39,37],[[45,[[44,[43]]]]]],[[42,37],[[45,[[44,[43]]]]]],[[41,37],[[45,[[44,[43]]]]]],[[37,37],11],[[],11],[[46,16],17],[[46,16],17],[[47,16],17],[[47,16],17],[[48,16],17],[[48,16],17],[[37,16],17],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[37,[[45,[[44,[43]]]]]],[[39,37],[[45,[[44,[43]]]]]],[[42,37],[[45,[[44,[43]]]]]],[[41,37],[[45,[[44,[43]]]]]],[[[25,[8]]],39],[[[25,[8]]],[[24,[41,18]]]],[27],[27],[27],[[[9,[8,8]],36],[[45,[[44,[43]]]]]],[[39,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[42,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[41,[9,[8,8]],36],[[45,[[44,[43]]]]]],[46,[[23,[28]]]],[47,[[23,[28]]]],[48,[[23,[28]]]],[[]],[[],8],[[],8],[[],8],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[8,[[24,[37]]]],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[37,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[39,37,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[42,37,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[41,37,[9,[8,8]],36],[[45,[[44,[43]]]]]],[[37,36],[[45,[[44,[43]]]]]],[[39,37,36],[[45,[[44,[43]]]]]],[[42,37,36],[[45,[[44,[43]]]]]],[[41,37,36],[[45,[[44,[43]]]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]]],"p":[[8,"SessionStore"],[3,"Key"],[3,"SessionMiddlewareBuilder"],[3,"Session"],[8,"Clone"],[3,"SessionMiddleware"],[4,"SessionStatus"],[3,"String"],[3,"HashMap"],[3,"Ref"],[15,"bool"],[3,"SessionGetError"],[3,"BoxBody"],[3,"HttpResponse"],[3,"SessionInsertError"],[3,"Formatter"],[6,"Result"],[3,"Error"],[3,"HttpRequest"],[4,"Payload"],[15,"str"],[8,"DeserializeOwned"],[4,"Option"],[4,"Result"],[8,"Into"],[8,"Serialize"],[3,"Demand"],[8,"Error"],[3,"TypeId"],[4,"SessionLifecycle"],[3,"BrowserSession"],[3,"PersistentSession"],[4,"TtlExtensionPolicy"],[4,"CookieContentSecurity"],[4,"SameSite"],[3,"Duration"],[3,"SessionKey"],[3,"RedisActorSessionStoreBuilder"],[3,"RedisActorSessionStore"],[3,"RedisSessionStoreBuilder"],[3,"RedisSessionStore"],[3,"CookieSessionStore"],[8,"Future"],[3,"Box"],[3,"Pin"],[4,"LoadError"],[4,"SaveError"],[4,"UpdateError"],[8,"SessionExt"]]},\ +"actix_settings":{"doc":"Easily manage Actix Web’s settings from a TOML file and …","t":[3,3,8,4,3,13,13,13,13,13,13,13,13,13,4,13,13,13,4,13,13,13,13,4,4,13,4,3,4,13,8,13,13,13,13,13,13,6,4,3,13,12,12,10,12,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,12,12,12,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,12,12,12,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,11,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,11,11,10,11,11,11,11,11,11,11,11,11,12,12,12,12,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,12,12,12,12,12],"n":["ActixSettings","Address","ApplySettings","Backlog","BasicSettings","Default","Default","Default","Default","Default","Default","Development","Disabled","EnvVarError","Error","FileExists","InvalidValue","IoError","KeepAlive","Manual","Manual","Manual","Manual","MaxConnectionRate","MaxConnections","Milliseconds","Mode","NoSettings","NumWorkers","Os","Parse","ParseAddressError","ParseBoolError","ParseIntError","Production","Seconds","Seconds","Settings","Timeout","Tls","TomlError","actix","application","apply_settings","backlog","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","certificate","client_shutdown","client_timeout","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","enable_compression","enable_log","enabled","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_default_template","from_template","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","host","hosts","into","into","into","into","into","into","into","into","into","into","into","into","into","keep_alive","max_connection_rate","max_connections","mode","num_workers","override_field","override_field_with_env_var","parse","parse","parse","parse","parse","parse","parse","parse","parse","parse_toml","port","private_key","shutdown_timeout","tls","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","write_toml_file","column","expected","file","got","line"],"q":["actix_settings","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_settings::Error","","","",""],"d":["Settings types for Actix Web.","A host/port pair for the server to bind to.","Extension trait for applying parsed settings to the server …","The maximum number of pending connections.","Wrapper for server and application-specific settings.","The default number of connections. See struct docs.","The default keep-alive as defined by Actix Web.","The default connection limit. See struct docs.","The default number of connections. See struct docs.","The default number of workers. See struct docs.","The default timeout. Depends on context.","Marks development environment.","Disable keep-alive.","Environment variable does not exists or is invalid.","Errors that can be returned from methods in this crate.","File already exists on disk.","Invalid value.","I/O error.","The server keep-alive preference.","A specific number of connections.","A specific connection limit.","A specific number of connections.","A specific number of workers.","The maximum per-worker concurrent TLS connection limit.","The maximum per-worker number of concurrent connections.","Timeout in milliseconds.","Marker of intended deployment environment.","Marker type representing no defined application-specific …","The number of workers that the server should start.","Let the OS determine keep-alive duration.","A specialized FromStr trait that returns [AtError] errors","Value is not an address.","Value is not a boolean.","Value is not an integer.","Marks production environment.","A specific keep-alive duration (in seconds).","Timeout in seconds.","Convenience type alias for BasicSettings with no defined …","A timeout duration in milliseconds or seconds.","TLS (HTTPS) configuration.","Error deserializing as TOML.","Actix Web server settings.","Application-specific settings.","Apply a BasicSettings value to self.","The maximum number of pending connections.","","","","","","","","","","","","","","","","","","","","","","","","","","","Path to certificate .pem file.","Timeout duration for connection shutdown.","Timeout duration for reading client request header.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","True if the Compress middleware should be enabled.","True if the Logger middleware should be enabled.","Tru if accepting TLS connections should be enabled.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Parse an instance of Self straight from the default TOML …","Parse an instance of Self straight from the default TOML …","","","","","","","","","","","","","","","","","","","","","","","","","Host part of address.","List of addresses for the server to bind to.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Server keep-alive preference.","The per-worker maximum concurrent TLS connection limit.","The per-worker maximum number of concurrent connections.","Marker of intended deployment environment.","The number of workers that the server should start.","Attempts to parse value and override the referenced field.","Attempts to read an environment variable, parse it, and …","Parse Self from string.","","","","","","","","","Parse an instance of Self from a TOML file located at …","Port part of address.","Path to private key .pem file.","Timeout duration for graceful worker shutdown.","TLS (HTTPS) configuration.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Writes the default TOML template to a new file, located at …","","","","",""],"i":[0,0,0,0,0,4,5,6,7,9,10,8,5,2,0,2,2,2,0,4,6,7,9,0,0,10,0,0,0,5,0,2,2,2,8,5,10,0,0,0,2,1,1,31,12,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,11,12,12,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,3,4,5,6,7,8,9,10,11,12,1,14,12,12,11,3,4,5,6,7,8,9,10,11,12,1,14,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,2,2,2,2,2,2,2,3,4,5,6,7,8,9,10,11,12,1,14,1,1,3,4,5,6,7,8,9,10,11,12,1,14,3,4,5,6,7,8,9,10,11,12,1,14,3,12,2,3,4,5,6,7,8,9,10,11,12,1,14,12,12,12,12,12,1,1,32,3,4,5,6,7,8,9,10,1,3,11,12,12,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,2,3,4,5,6,7,8,9,10,11,12,1,14,1,33,33,33,33,33],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1],0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10],[11,11],[12,12],[[[1,[13]]],[[1,[13]]]],[14,14],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],[[15,[3]]]],[[],[[15,[4]]]],[[],[[15,[5]]]],[[],[[15,[6]]]],[[],[[15,[7]]]],[[],[[15,[8]]]],[[],[[15,[9]]]],[[],[[15,[10]]]],[[],[[15,[11]]]],[[],[[15,[12]]]],[[],[[15,[1]]]],[[],[[15,[14]]]],0,0,0,[[3,3],16],[[4,4],16],[[5,5],16],[[6,6],16],[[7,7],16],[[8,8],16],[[9,9],16],[[10,10],16],[[11,11],16],[[12,12],16],[[[1,[17]],1],16],[[14,14],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[2,18],19],[[3,18],19],[[4,18],19],[[5,18],19],[[6,18],19],[[7,18],19],[[8,18],19],[[9,18],19],[[10,18],19],[[11,18],19],[[12,18],19],[[[1,[20]],18],19],[[14,18],19],[21,2],[22,2],[[]],[23,2],[24,2],[25,2],[26,2],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],[[15,[1,2]]]],[27,[[15,[1,2]]]],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[[],28],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12],[[[1,[29]]]],[14],0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,[[],[[15,[2]]]],[[],[[15,[2]]]],[27,[[15,[2]]]],[27,[[15,[3,2]]]],[27,[[15,[4,2]]]],[27,[[15,[5,2]]]],[27,[[15,[6,2]]]],[27,[[15,[7,2]]]],[27,[[15,[8,2]]]],[27,[[15,[9,2]]]],[27,[[15,[10,2]]]],[[],[[15,[1,2]]]],0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[],30],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],[[15,[2]]]],0,0,0,0,0],"p":[[3,"BasicSettings"],[4,"Error"],[3,"Address"],[4,"Backlog"],[4,"KeepAlive"],[4,"MaxConnectionRate"],[4,"MaxConnections"],[4,"Mode"],[4,"NumWorkers"],[4,"Timeout"],[3,"Tls"],[3,"ActixSettings"],[8,"Clone"],[3,"NoSettings"],[4,"Result"],[15,"bool"],[8,"PartialEq"],[3,"Formatter"],[6,"Result"],[8,"Debug"],[4,"VarError"],[3,"Error"],[3,"Error"],[3,"IoError"],[3,"ParseIntError"],[3,"ParseBoolError"],[15,"str"],[15,"u64"],[8,"Hash"],[3,"TypeId"],[8,"ApplySettings"],[8,"Parse"],[13,"InvalidValue"]],"a":{"https":[39],"ssl":[39]}},\ +"actix_web_httpauth":{"doc":"HTTP authentication schemes for Actix Web.","t":[0,0,0,8,3,16,0,0,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,3,3,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,3,3,4,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,11,11,11,11,11,11,0,0,3,13,3,3,13,13,13,4,8,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,10,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,8,3,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,4,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,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["extractors","headers","middleware","AuthExtractorConfig","AuthenticationError","Inner","basic","bearer","borrow","borrow_mut","challenge_mut","error_response","fmt","fmt","from","from","into","into_inner","new","provide","status_code","status_code_mut","to_string","try_from","try_into","type_id","vzip","with_error","with_error_description","with_error_uri","BasicAuth","Config","as_ref","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","default","fmt","fmt","from","from","from_request","into","into","into_inner","password","realm","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","user_id","vzip","vzip","BearerAuth","Config","Error","InsufficientScope","InvalidRequest","InvalidToken","as_ref","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","cmp","default","eq","equivalent","fmt","fmt","fmt","fmt","from","from","from","from_request","get_hash","hash","into","into","into","into_inner","partial_cmp","realm","scope","status_code","to_owned","to_owned","to_owned","to_string","token","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","vzip","vzip","vzip","authorization","www_authenticate","Authorization","Base64DecodeError","Basic","Bearer","Invalid","MissingField","MissingScheme","ParseError","Scheme","ToStrError","Utf8Error","as_mut","as_ref","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","cmp","cmp","cmp","default","eq","eq","eq","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","get_hash","hash","into","into","into","into","into_scheme","name","new","new","parse","parse","parse","parse","partial_cmp","partial_cmp","partial_cmp","password","provide","source","to_owned","to_owned","to_owned","to_string","to_string","to_string","to_string","token","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into_pair","try_into_value","try_into_value","try_into_value","type_id","type_id","type_id","type_id","user_id","vzip","vzip","vzip","vzip","Challenge","WwwAuthenticate","basic","bearer","borrow","borrow_mut","clone","clone_into","cmp","default","eq","equivalent","fmt","from","get_hash","hash","into","name","parse","partial_cmp","to_bytes","to_owned","try_from","try_into","try_into_pair","try_into_value","type_id","vzip","Basic","borrow","borrow_mut","clone","clone_into","cmp","default","eq","equivalent","fmt","fmt","from","get_hash","hash","into","new","partial_cmp","to_owned","to_string","try_from","try_into","try_into_value","type_id","vzip","with_realm","Bearer","BearerBuilder","Error","InsufficientScope","InvalidRequest","InvalidToken","borrow","borrow","borrow_mut","borrow_mut","build","clone","clone_into","cmp","default","default","eq","equivalent","error","error_description","error_uri","finish","fmt","fmt","fmt","from","from","get_hash","hash","into","into","partial_cmp","realm","scope","to_owned","to_string","try_from","try_from","try_into","try_into","try_into_value","type_id","type_id","vzip","vzip","HttpAuthentication","basic","bearer","borrow","borrow_mut","clone","clone_into","fmt","from","into","new_transform","to_owned","try_from","try_into","type_id","vzip","with_fn"],"q":["actix_web_httpauth","","","actix_web_httpauth::extractors","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::extractors::basic","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::extractors::bearer","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::headers","","actix_web_httpauth::headers::authorization","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::headers::www_authenticate","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::headers::www_authenticate::basic","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::headers::www_authenticate::bearer","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web_httpauth::middleware","","","","","","","","","","","","","","","",""],"d":["Type-safe authentication information extractors.","Typed HTTP headers.","HTTP Authentication middleware.","Trait implemented for types that provides configuration …","Authentication error returned by authentication extractors.","Associated challenge type.","Extractor for the “Basic” HTTP Authentication Scheme.","Extractor for the “Bearer” HTTP Authentication Scheme.","","","Returns mutable reference to the inner challenge instance.","","","","Returns the argument unchanged.","","Calls U::from(self).","Convert the config instance into a HTTP challenge.","Creates new authentication error from the provided …","","","Returns mutable reference to the inner status code.","","","","","","Attach Error to the current Authentication error.","Attach error description to the current Authentication …","Attach error URI to the current Authentication error.","Extractor for HTTP Basic auth.","BasicAuth extractor configuration used for WWW-Authenticate…","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","Calls U::from(self).","Calls U::from(self).","","Returns client’s password.","Set challenge realm attribute.","","","","","","","","","Returns client’s user-ID.","","","Extractor for HTTP Bearer auth","BearerAuth extractor configuration.","Bearer authorization error types, described in RFC 6750.","The request requires higher privileges than provided by …","The request is missing a required parameter, includes an …","The access token provided is expired, revoked, malformed, …","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","Set challenge realm attribute.","Set challenge scope attribute.","Returns HTTP status code suitable for current error type.","","","","","Returns bearer token provided by client.","","","","","","","","","","","","","Authorization header and various auth schemes.","WWW-Authenticate header and various auth challenges.","Authorization header, defined in RFC 7235","Malformed base64 string.","Credentials for Basic authentication scheme, defined in …","Credentials for Bearer authentication scheme, defined in …","Header value is malformed.","Required authentication field is missing.","Authentication scheme is missing.","Possible errors while parsing Authorization header.","Authentication scheme for Authorization header.","Unable to convert header into the str.","Malformed UTF-8 string.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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).","Consumes Authorization header and returns inner Scheme …","","Creates Basic credentials with provided user_id and …","Creates new Bearer credentials with the token provided.","Try to parse an authentication scheme from the …","","","","","","","Returns client’s password if provided.","","","","","","","","","","Gets reference to the credentials token.","","","","","","","","","","","","","","","","","Returns client’s user-ID.","","","","","Authentication challenge for WWW-Authenticate header.","WWW-Authenticate header, described in RFC 7235.","Challenge for the “Basic” HTTP Authentication Scheme.","Challenge for the “Bearer” HTTP Authentication Scheme.","","","","","","","","","","Returns the argument unchanged.","","","Calls U::from(self).","","","","Converts the challenge into a bytes suitable for HTTP …","","","","","","","","Challenge for WWW-Authenticate header with HTTP Basic auth …","","","","","","","","","","","Returns the argument unchanged.","","","Calls U::from(self).","Creates new Basic challenge with an empty realm field.","","","","","","","","","Creates new Basic challenge from the provided realm field …","Challenge for WWW-Authenticate header with HTTP Bearer …","Builder for the Bearer challenge.","Bearer authorization error types, described in RFC 6750.","The request requires higher privileges than provided by …","The request is missing a required parameter, includes an …","The access token provided is expired, revoked, malformed, …","","","","","Creates the builder for Bearer challenge.","","","","","","","","Provides the error attribute, as defined in [RFC 6750, …","Provides the error_description attribute, as defined in […","Provides the error_uri attribute, as defined in [RFC 6750 …","Consumes the builder and returns built Bearer instance.","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","","Provides the realm attribute, as defined in RFC 2617.","Provides the scope attribute, as defined in RFC 6749 §3.3.","","","","","","","","","","","","Middleware for checking HTTP authentication.","Construct HttpAuthentication middleware for the HTTP “…","Construct HttpAuthentication middleware for the HTTP “…","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","Construct HttpAuthentication middleware with the provided …"],"i":[0,0,0,0,0,52,0,0,2,2,2,2,2,2,2,2,2,52,2,2,2,2,2,2,2,2,2,2,2,2,0,0,14,14,16,14,16,14,16,14,16,14,14,16,14,16,16,14,16,14,16,14,14,16,14,16,14,16,14,16,16,14,16,0,0,0,13,13,13,21,21,22,13,21,22,13,21,22,13,21,22,13,13,21,13,13,21,22,13,13,21,22,13,22,13,13,21,22,13,21,13,21,21,13,21,22,13,13,22,21,22,13,21,22,13,21,22,13,21,22,13,0,0,0,36,0,0,36,36,36,0,0,36,36,29,29,36,29,31,32,36,29,31,32,29,31,32,29,31,32,29,31,32,29,29,31,32,29,31,32,36,36,29,29,31,31,32,32,36,36,36,36,29,29,29,31,32,29,29,36,29,31,32,29,29,31,32,28,29,31,32,29,31,32,31,36,36,29,31,32,36,29,31,32,32,36,29,31,32,36,29,31,32,29,29,31,32,36,29,31,32,31,36,29,31,32,0,0,0,0,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,1,47,47,47,47,47,47,47,0,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,13,13,13,50,12,50,12,12,12,12,12,50,12,12,12,50,50,50,50,50,12,12,50,12,12,12,50,12,12,50,50,12,12,50,12,50,12,12,50,12,50,12,0,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51],"f":[0,0,0,0,0,0,0,0,[[]],[[]],[[[2,[1]]]],[[[2,[1]]],3],[[[2,[[0,[4,1]]]],5],6],[[[2,[1]],5],6],[[]],[[],2],[[]],[[]],[1,[[2,[1]]]],[7],[[[2,[1]]],8],[[[2,[1]]],8],[[],9],[[],10],[[],10],[[],11],[[]],[[[2,[12]],13],[[2,[12]]]],[[[2,[12]]],[[2,[12]]]],[[[2,[12]]],[[2,[12]]]],0,0,[14,15],[[]],[[]],[[]],[[]],[14,14],[16,16],[[]],[[]],[[],14],[[14,5],6],[[16,5],6],[[]],[[]],[[17,18]],[[]],[[]],[14],[16,[[20,[19]]]],[14,14],[[]],[[]],[[],10],[[],10],[[],10],[[],10],[[],11],[[],11],[16,19],[[]],[[]],0,0,0,0,0,0,[21,12],[[]],[[]],[[]],[[]],[[]],[[]],[21,21],[22,22],[13,13],[[]],[[]],[[]],[[13,13],23],[[],21],[[13,13],24],[[],24],[[21,5],6],[[22,5],6],[[13,5],6],[[13,5],6],[[]],[[]],[[]],[[17,18]],[[],25],[13],[[]],[[]],[[]],[21],[[13,13],[[20,[23]]]],[[21,[27,[[26,[19]]]]],21],[[21,[27,[[26,[19]]]]],21],[13,8],[[]],[[]],[[]],[[],9],[22,19],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],11],[[],11],[[],11],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,[[[29,[28]]]],[[[29,[28]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[29,[[0,[30,28]]]]],[[29,[[0,[30,28]]]]]],[31,31],[32,32],[[]],[[]],[[]],[[[29,[[0,[33,28]]]],29],23],[[31,31],23],[[32,32],23],[[],[[29,[[0,[34,28]]]]]],[[[29,[[0,[35,28]]]],29],24],[[31,31],24],[[32,32],24],[[],24],[[],24],[[],24],[[36,5],6],[[36,5],6],[[[29,[28]],5],6],[[[29,[[0,[4,28]]]],5],6],[[31,5],6],[[31,5],6],[[32,5],6],[[32,5],6],[37,36],[38,36],[[]],[39,36],[40],[[]],[28,[[29,[28]]]],[[]],[[]],[[],25],[[[29,[[0,[41,28]]]]]],[[]],[[]],[[]],[[]],[[[29,[28]]],28],[[],42],[20,31],[[],32],[43,[[10,[36]]]],[[],[[10,[[29,[28]],44]]]],[43,[[10,[31,36]]]],[43,[[10,[32,36]]]],[[[29,[[0,[45,28]]]],29],[[20,[23]]]],[[31,31],[[20,[23]]]],[[32,32],[[20,[23]]]],[31,[[20,[19]]]],[7],[36,[[20,[46]]]],[[]],[[]],[[]],[[],9],[[],9],[[],9],[[],9],[32,19],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[[29,[28]]],[[10,[43]]]],[31,[[10,[43]]]],[32,[[10,[43]]]],[[],11],[[],11],[[],11],[[],11],[31,19],[[]],[[]],[[]],[[]],0,0,0,0,[[]],[[]],[[[47,[[0,[30,1]]]]],[[47,[[0,[30,1]]]]]],[[]],[[[47,[[0,[33,1]]]],47],23],[[],[[47,[[0,[34,1]]]]]],[[[47,[[0,[35,1]]]],47],24],[[],24],[[[47,[[0,[4,1]]]],5],6],[[]],[[],25],[[[47,[[0,[41,1]]]]]],[[]],[[],42],[[],[[10,[[47,[1]],44]]]],[[[47,[[0,[45,1]]]],47],[[20,[23]]]],[[],48],[[]],[[],10],[[],10],[[],10],[[[47,[1]]],[[10,[43]]]],[[],11],[[]],0,[[]],[[]],[15,15],[[]],[[15,15],23],[[],15],[[15,15],24],[[],24],[[15,5],[[10,[49]]]],[[15,5],6],[[]],[[],25],[15],[[]],[[],15],[[15,15],[[20,[23]]]],[[]],[[],9],[[],10],[[],10],[15,[[10,[43]]]],[[],11],[[]],[[],15],0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[],50],[12,12],[[]],[[12,12],23],[[],50],[[],12],[[12,12],24],[[],24],[[50,13],50],[50,50],[50,50],[50,12],[[50,5],6],[[12,5],6],[[12,5],[[10,[49]]]],[[]],[[]],[[],25],[12],[[]],[[]],[[12,12],[[20,[23]]]],[50,50],[50,50],[[]],[[],9],[[],10],[[],10],[[],10],[[],10],[12,[[10,[43]]]],[[],11],[[],11],[[]],[[]],0,[[],[[51,[16]]]],[[],[[51,[22]]]],[[]],[[]],[[[51,[30,30]]],[[51,[30,30]]]],[[]],[[[51,[4,4]],5],6],[[]],[[]],[51],[[]],[[],10],[[],10],[[],11],[[]],[[],51]],"p":[[8,"Challenge"],[3,"AuthenticationError"],[3,"HttpResponse"],[8,"Debug"],[3,"Formatter"],[6,"Result"],[3,"Demand"],[3,"StatusCode"],[3,"String"],[4,"Result"],[3,"TypeId"],[3,"Bearer"],[4,"Error"],[3,"Config"],[3,"Basic"],[3,"BasicAuth"],[3,"HttpRequest"],[4,"Payload"],[15,"str"],[4,"Option"],[3,"Config"],[3,"BearerAuth"],[4,"Ordering"],[15,"bool"],[15,"u64"],[4,"Cow"],[8,"Into"],[8,"Scheme"],[3,"Authorization"],[8,"Clone"],[3,"Basic"],[3,"Bearer"],[8,"Ord"],[8,"Default"],[8,"PartialEq"],[4,"ParseError"],[3,"Utf8Error"],[3,"ToStrError"],[4,"DecodeError"],[15,"never"],[8,"Hash"],[3,"HeaderName"],[3,"HeaderValue"],[4,"ParseError"],[8,"PartialOrd"],[8,"Error"],[3,"WwwAuthenticate"],[3,"Bytes"],[3,"Error"],[3,"BearerBuilder"],[3,"HttpAuthentication"],[8,"AuthExtractorConfig"]]}\ }'); if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/search.js b/search.js deleted file mode 100644 index f0ccdfb1b..000000000 --- a/search.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("titles").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb}else if(nb!==0){printTab(0)}}const levenshtein_row2=[];function levenshtein(s1,s2){if(s1===s2){return 0}const s1_len=s1.length,s2_len=s2.length;if(s1_len&&s2_len){let i1=0,i2=0,a,b,c,c2;const row=levenshtein_row2;while(i1-".indexOf(c)!==-1}function isStopCharacter(c){return isWhitespace(c)||isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){for(let i=0,len=itemTypes.length;i0){throw new Error("Cannot use literal search when there is more than one element")}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw new Error("Unclosed `\"`")}else if(parserState.userQuery[end]!=="\""){throw new Error(`Unexpected \`${parserState.userQuery[end]}\` in a string element`)}else if(start===end){throw new Error("Cannot have empty string element")}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||isWhitespaceCharacter(c)}function isWhitespaceCharacter(c){return c===" "||c==="\t"}function createQueryElement(query,parserState,name,generics,isInGenerics){if(name==="*"||(name.length===0&&generics.length===0)){return}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){throw new Error("You cannot have more than one element if you use quotes")}const pathSegments=name.split("::");if(pathSegments.length>1){for(let i=0,len=pathSegments.length;i=end){throw new Error("Found generics without a path")}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;while(parserState.pos"){extra="`<`"}else if(endChar===""){extra="`->`"}throw new Error("Unexpected `"+c+"` after "+extra)}if(!foundStopChar){if(endChar!==""){throw new Error(`Expected \`,\`, \` \` or \`${endChar}\`, found \`${c}\``)}throw new Error(`Expected \`,\` or \` \`, found \`${c}\``)}const posBefore=parserState.pos;getNextElem(query,parserState,elems,endChar===">");if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}parserState.pos+=1}function checkExtraTypeFilterCharacters(parserState){const query=parserState.userQuery;for(let pos=0;pos"){if(isReturnArrow(parserState)){break}throw new Error(`Unexpected \`${c}\` (did you mean \`->\`?)`)}throw new Error(`Unexpected \`${c}\``)}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw new Error("Unexpected `:`")}if(query.elems.length===0){throw new Error("Expected type filter before `:`")}else if(query.elems.length!==1||parserState.totalElems!==1){throw new Error("Unexpected `:`")}else if(query.literalSearch){throw new Error("You cannot use quotes on type filter")}checkExtraTypeFilterCharacters(parserState);parserState.typeFilter=query.elems.pop().name;parserState.pos+=1;parserState.totalElems=0;query.literalSearch=false;foundStopChar=true;continue}if(!foundStopChar){if(parserState.typeFilter!==null){throw new Error(`Expected \`,\`, \` \` or \`->\`, found \`${c}\``)}throw new Error(`Expected \`,\`, \` \`, \`:\` or \`->\`, found \`${c}\``)}before=query.elems.length;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}while(parserState.pos`")}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),typeFilter:NO_TYPE_FILTER,elems:[],returned:[],foundElems:0,literalSearch:false,error:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);if(parserState.typeFilter!==null){let typeFilter=parserState.typeFilter;if(typeFilter==="const"){typeFilter="constant"}query.typeFilter=itemTypeFromName(typeFilter)}}catch(err){query=newParsedQuery(userQuery);query.error=err.message;query.typeFilter=-1;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others={},results_in_args={},results_returned={};function transformResults(results){const duplicates={};const out=[];for(const result of results){if(result.id>-1){const obj=searchIndex[result.id];obj.lev=result.lev;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates[obj.fullPath]){continue}duplicates[obj.fullPath]=true;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const ar=[];for(const entry in results){if(hasOwnPropertyRustdoc(results,entry)){const result=results[entry];result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};ar.push(result)}}results=ar;if(results.length===0){return[]}results.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.lev);b=(bbb.lev);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of results){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(results)}function checkGenerics(row,elem,defaultLev){if(row.generics.length===0){return elem.generics.length===0?defaultLev:MAX_LEV_DISTANCE+1}else if(row.generics.length>0&&row.generics[0].name===null){return checkGenerics(row.generics[0],elem,defaultLev)}let elem_name;if(elem.generics.length>0&&row.generics.length>=elem.generics.length){const elems=Object.create(null);for(const entry of row.generics){elem_name=entry.name;if(elem_name===""){if(checkGenerics(entry,elem,MAX_LEV_DISTANCE+1)!==0){return MAX_LEV_DISTANCE+1}continue}if(elems[elem_name]===undefined){elems[elem_name]=0}elems[elem_name]+=1}for(const generic of elem.generics){let match=null;if(elems[generic.name]){match=generic.name}else{for(elem_name in elems){if(!hasOwnPropertyRustdoc(elems,elem_name)){continue}if(elem_name===generic){match=elem_name;break}}}if(match===null){return MAX_LEV_DISTANCE+1}elems[match]-=1;if(elems[match]===0){delete elems[match]}}return 0}return MAX_LEV_DISTANCE+1}function checkIfInGenerics(row,elem){let lev=MAX_LEV_DISTANCE+1;for(const entry of row.generics){lev=Math.min(checkType(entry,elem,true),lev);if(lev===0){break}}return lev}function checkType(row,elem,literalSearch){if(row.name===null){if(row.generics.length>0){return checkIfInGenerics(row,elem)}return MAX_LEV_DISTANCE+1}let lev=levenshtein(row.name,elem.name);if(literalSearch){if(lev!==0){if(elem.generics.length===0){const checkGeneric=row.generics.length>0;if(checkGeneric&&row.generics.findIndex(tmp_elem=>tmp_elem.name===elem.name)!==-1){return 0}}return MAX_LEV_DISTANCE+1}else if(elem.generics.length>0){return checkGenerics(row,elem,MAX_LEV_DISTANCE+1)}return 0}else if(row.generics.length>0){if(elem.generics.length===0){if(lev===0){return 0}lev=checkIfInGenerics(row,elem);return lev+0.5}else if(lev>MAX_LEV_DISTANCE){return checkIfInGenerics(row,elem)}else{const tmp_lev=checkGenerics(row,elem,lev);if(tmp_lev>MAX_LEV_DISTANCE){return MAX_LEV_DISTANCE+1}return(tmp_lev+lev)/2}}else if(elem.generics.length>0){return MAX_LEV_DISTANCE+1}return lev}function findArg(row,elem,typeFilter){let lev=MAX_LEV_DISTANCE+1;if(row&&row.type&&row.type.inputs&&row.type.inputs.length>0){for(const input of row.type.inputs){if(!typePassesFilter(typeFilter,input.ty)){continue}lev=Math.min(lev,checkType(input,elem,parsedQuery.literalSearch));if(lev===0){return 0}}}return parsedQuery.literalSearch?MAX_LEV_DISTANCE+1:lev}function checkReturned(row,elem,typeFilter){let lev=MAX_LEV_DISTANCE+1;if(row&&row.type&&row.type.output.length>0){const ret=row.type.output;for(const ret_ty of ret){if(!typePassesFilter(typeFilter,ret_ty.ty)){continue}lev=Math.min(lev,checkType(ret_ty,elem,parsedQuery.literalSearch));if(lev===0){return 0}}}return parsedQuery.literalSearch?MAX_LEV_DISTANCE+1:lev}function checkPath(contains,ty){if(contains.length===0){return 0}let ret_lev=MAX_LEV_DISTANCE+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return MAX_LEV_DISTANCE+1}for(let i=0;ilength){break}let lev_total=0;let aborted=false;for(let x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES[filterCrates]&&ALIASES[filterCrates][lowerQuery]){const query_aliases=ALIASES[filterCrates][lowerQuery];for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{Object.keys(ALIASES).forEach(crate=>{if(ALIASES[crate][lowerQuery]){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=ALIASES[crate][lowerQuery];for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}})}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,lev){if(lev===0||(!parsedQuery.literalSearch&&lev<=MAX_LEV_DISTANCE)){if(results[fullId]!==undefined){const result=results[fullId];if(result.dontValidate||result.lev<=lev){return}}results[fullId]={id:id,index:index,dontValidate:parsedQuery.literalSearch,lev:lev,}}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let lev,lev_add=0,index=-1;const fullId=row.id;const in_args=findArg(row,elem,parsedQuery.typeFilter);const returned=checkReturned(row,elem,parsedQuery.typeFilter);addIntoResults(results_in_args,fullId,pos,index,in_args);addIntoResults(results_returned,fullId,pos,index,returned);if(!typePassesFilter(parsedQuery.typeFilter,row.ty)){return}const searchWord=searchWords[pos];if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,-1,0)}return}if(elem.name.length===0){if(row.type!==null){lev=checkGenerics(row.type,elem,MAX_LEV_DISTANCE+1);addIntoResults(results_others,fullId,pos,index,lev)}return}if(elem.fullPath.length>1){lev=checkPath(elem.pathWithoutLast,row);if(lev>MAX_LEV_DISTANCE||(parsedQuery.literalSearch&&lev!==0)){return}else if(lev>0){lev_add=lev/10}}if(searchWord.indexOf(elem.pathLast)>-1||row.normalizedName.indexOf(elem.pathLast)>-1){index=row.normalizedName.indexOf(elem.pathLast)}lev=levenshtein(searchWord,elem.pathLast);if(lev>0&&elem.pathLast.length>2&&searchWord.indexOf(elem.pathLast)>-1){if(elem.pathLast.length<6){lev=1}else{lev=0}}lev+=lev_add;if(lev>MAX_LEV_DISTANCE){return}else if(index!==-1&&elem.fullPath.length<2){lev-=1}if(lev<0){lev=0}addIntoResults(results_others,fullId,pos,index,lev)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let totalLev=0;let nbLev=0;function checkArgs(elems,callback){for(const elem of elems){const lev=callback(row,elem,NO_TYPE_FILTER);if(lev<=1){nbLev+=1;totalLev+=lev}else{return false}}return true}if(!checkArgs(parsedQuery.elems,findArg)){return}if(!checkArgs(parsedQuery.returned,checkReturned)){return}if(nbLev===0){return}const lev=Math.round(totalLev/nbLev);addIntoResults(results,row.id,pos,0,lev)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||levenshtein(name,key)<=MAX_LEV_DISTANCE)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#titles > button").item(searchState.currentTab);if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor="#"+type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];length+=1;let extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const wrapper=document.createElement("div");const resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){const alias=document.createElement("span");alias.className="alias";const bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend"," - see ");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+""+name+extra+"");wrapper.appendChild(resultName);const description=document.createElement("div");description.className="desc";const spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText))){const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){output+=`

Query parser error: "${results.query.error}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("titles").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function search(e,forced){const params=searchState.getQueryStringParams();const query=parseQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}let filterCrates=getFilterCrates();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";if(browserSupportsHistoryApi()){const newURL=buildUrl(query.original,filterCrates);if(!history.state&&!params.search){history.pushState(null,"",newURL)}else{history.replaceState(null,"",newURL)}}showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;return types.map(type=>{let pathIndex,generics;if(typeof type==="number"){pathIndex=type;generics=[]}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths)}return{name:pathIndex===0?null:lowercasePaths[pathIndex-1].name,ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:generics,}})}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){const pathIndex=functionSearchType[INPUTS_DATA];inputs=[{name:pathIndex===0?null:lowercasePaths[pathIndex-1].name,ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:[],}]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){const pathIndex=functionSearchType[OUTPUT_DATA];output=[{name:pathIndex===0?null:lowercasePaths[pathIndex-1].name,ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:[],}]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}return{inputs,output,}}function buildIndex(rawSearchIndex){searchIndex=[];const searchWords=[];let i,word;let currentIndex=0;let id=0;for(const crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}let crateSize=0;const crateCorpus=rawSearchIndex[crate];searchWords.push(crate);const crateRow={crate:crate,ty:1,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=crateCorpus.q;const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];let len=paths.length;for(i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:buildFunctionSearchType(itemFunctionSearchTypes[i],lowercasePaths),id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]=Object.create(null);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}for(const local_alias of aliases[alias_name]){ALIASES[crate][alias_name].push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const params=searchState.getQueryStringParams();const query=searchState.input.value.trim();if(!history.state&&!params.search){history.pushState(null,"",buildUrl(query,null))}else{history.replaceState(null,"",buildUrl(query,null))}}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/settings.css b/settings.css deleted file mode 100644 index ab01e577c..000000000 --- a/settings.css +++ /dev/null @@ -1 +0,0 @@ -.setting-line{margin:0.6em 0 0.6em 0.3em;position:relative;}.setting-line .choices{display:flex;flex-wrap:wrap;}.setting-line .radio-line input{margin-right:0.3em;height:1.2rem;width:1.2rem;color:inherit;border:1px solid currentColor;outline:none;-webkit-appearance:none;cursor:pointer;border-radius:50%;}.setting-line .radio-line input+span{padding-bottom:1px;}.radio-line .setting-name{width:100%;}.radio-line .choice{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:flex;align-items:center;cursor:pointer;}.radio-line .choice+.choice{margin-left:0.5em;}.toggle{position:relative;width:100%;margin-right:20px;display:flex;align-items:center;cursor:pointer;}.toggle input{opacity:0;position:absolute;}.slider{position:relative;width:45px;min-width:45px;display:block;height:28px;margin-right:20px;cursor:pointer;background-color:#ccc;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;transition:.3s;}input:checked+.slider:before{transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;}#settings .setting-line{margin:1.2em 0.6em;}.setting-line .radio-line input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-line .radio-line input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-line .radio-line input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-line .radio-line input:hover{border-color:var(--settings-input-color) !important;}input:checked+.slider{background-color:var(--settings-input-color);} \ No newline at end of file diff --git a/settings.html b/settings.html index beb5f9a01..fd2d8ceb5 100644 --- a/settings.html +++ b/settings.html @@ -1 +1,2 @@ -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/settings.js b/settings.js deleted file mode 100644 index 834d29269..000000000 --- a/settings.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function showLightAndDark(){addClass(document.getElementById("theme").parentElement,"hidden");removeClass(document.getElementById("preferred-light-theme").parentElement,"hidden");removeClass(document.getElementById("preferred-dark-theme").parentElement,"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme").parentElement,"hidden");addClass(document.getElementById("preferred-dark-theme").parentElement,"hidden");removeClass(document.getElementById("theme").parentElement,"hidden")}function updateLightAndDark(){if(getSettingValue("use-system-theme")!=="false"){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.getElementsByClassName("slider"),elem=>{const toggle=elem.previousElementSibling;const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(settingsElement.getElementsByClassName("select-wrapper"),elem=>{const select=elem.getElementsByTagName("select")[0];const settingId=select.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;const settingValue=getSettingValue(settingId);if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){output+="
";const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`
\ - ${setting_name}\ -
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";output+=``});output+="
"}else{const checked=setting["default"]===true?" checked":"";output+=``}output+="
"}return output}function buildSettingsPage(){const themes=getVar("themes").split(",");const settings=[{"name":"Use system theme","js_name":"use-system-theme","default":true,},{"name":"Theme","js_name":"theme","default":"light","options":themes,},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":themes,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":themes,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=function(event){event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=function(event){if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hidePopoverMenus();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/source-script.js b/source-script.js deleted file mode 100644 index d8b770a42..000000000 --- a/source-script.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=document.getElementById("rustdoc-vars").attributes["data-root-path"].value;const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;function closeSidebarIfMobile(){if(window.innerWidth"){window.rustdocMobileScrollLock();addClass(document.documentElement,"source-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{window.rustdocMobileScrollUnlock();removeClass(document.documentElement,"source-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="source-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(key=>{sourcesIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("span"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSourceHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(match)}});onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSourceHighlight)});highlightSourceLines();window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file diff --git a/src/actix_cors/all_or_some.rs.html b/src/actix_cors/all_or_some.rs.html index 37dea4171..b6018bb8d 100644 --- a/src/actix_cors/all_or_some.rs.html +++ b/src/actix_cors/all_or_some.rs.html @@ -1,5 +1,5 @@ -all_or_some.rs - source
1
+all_or_some.rs - source
1
 2
 3
 4
@@ -55,7 +55,7 @@
 54
 55
 
/// An enum signifying that some of type `T` is allowed, or `All` (anything is allowed).
-#[derive(Debug, Clone, PartialEq, Eq)]
+#[derive(Debug, Clone, PartialEq, Eq)]
 pub enum AllOrSome<T> {
     /// Everything is allowed. Usually equivalent to the `*` value.
     All,
@@ -78,7 +78,7 @@
     }
 
     /// Returns whether this is a `Some` variant.
-    #[allow(dead_code)]
+    #[allow(dead_code)]
     pub fn is_some(&self) -> bool {
         !self.is_all()
     }
@@ -100,7 +100,7 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 #[test]
 fn tests() {
     assert!(AllOrSome::<()>::All.is_all());
@@ -110,4 +110,4 @@
     assert!(AllOrSome::Some(()).is_some());
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_cors/builder.rs.html b/src/actix_cors/builder.rs.html index 599e80281..98a6ee34a 100644 --- a/src/actix_cors/builder.rs.html +++ b/src/actix_cors/builder.rs.html @@ -1,5 +1,5 @@ -builder.rs - source
1
+builder.rs - source
1
 2
 3
 4
@@ -758,7 +758,7 @@
 ///
 /// // `cors` can now be used in `App::wrap`.
 /// ```
-#[derive(Debug)]
+#[derive(Debug)]
 pub struct Cors {
     inner: Rc<Inner>,
     error: Option<Either<HttpError, CorsError>>,
@@ -787,7 +787,7 @@
             preflight: true,
             send_wildcard: false,
             supports_credentials: true,
-            #[cfg(feature = "draft-private-network-access")]
+            #[cfg(feature = "draft-private-network-access")]
             allow_private_network_access: false,
             vary_header: true,
             block_on_origin_mismatch: true,
@@ -1116,7 +1116,7 @@
     /// Defaults to `false`.
     ///
     /// [Private Network Access]: https://wicg.github.io/private-network-access
-    #[cfg(feature = "draft-private-network-access")]
+    #[cfg(feature = "draft-private-network-access")]
     #[cfg_attr(docsrs, doc(cfg(feature = "draft-private-network-access")))]
     pub fn allow_private_network_access(mut self) -> Cors {
         if let Some(cors) = cors(&mut self.inner, &self.error) {
@@ -1200,7 +1200,7 @@
             preflight: true,
             send_wildcard: false,
             supports_credentials: false,
-            #[cfg(feature = "draft-private-network-access")]
+            #[cfg(feature = "draft-private-network-access")]
             allow_private_network_access: false,
             vary_header: true,
             block_on_origin_mismatch: true,
@@ -1298,7 +1298,7 @@
         .unwrap()
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod test {
     use std::convert::{Infallible, TryInto};
 
@@ -1312,7 +1312,7 @@
 
     use super::*;
 
-    #[test]
+    #[test]
     fn illegal_allow_credentials() {
         // using the permissive defaults (all origins allowed) and adding send_wildcard
         // and supports_credentials should error on construction
@@ -1325,7 +1325,7 @@
             .is_err());
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn restrictive_defaults() {
         let cors = Cors::default()
             .new_transform(test::ok_service())
@@ -1340,12 +1340,12 @@
         assert_eq!(resp.status(), StatusCode::BAD_REQUEST);
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn allowed_header_try_from() {
         let _cors = Cors::default().allowed_header("Content-Type");
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn allowed_header_try_into() {
         struct ContentType;
 
@@ -1360,7 +1360,7 @@
         let _cors = Cors::default().allowed_header(ContentType);
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn middleware_generic_over_body_type() {
         let srv = fn_service(|req: ServiceRequest| async move {
             Ok(req.into_response(HttpResponse::with_body(StatusCode::OK, body::None::new())))
@@ -1370,4 +1370,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_cors/error.rs.html b/src/actix_cors/error.rs.html index 5d03fb76a..e4aafbe63 100644 --- a/src/actix_cors/error.rs.html +++ b/src/actix_cors/error.rs.html @@ -1,5 +1,5 @@ -error.rs - source
1
+error.rs - source
1
 2
 3
 4
@@ -52,39 +52,39 @@
 use derive_more::{Display, Error};
 
 /// Errors that can occur when processing CORS guarded requests.
-#[derive(Debug, Clone, Display, Error)]
+#[derive(Debug, Clone, Display, Error)]
 #[non_exhaustive]
 pub enum CorsError {
     /// Allowed origin argument must not be wildcard (`*`).
-    #[display(fmt = "`allowed_origin` argument must not be wildcard (`*`)")]
+    #[display(fmt = "`allowed_origin` argument must not be wildcard (`*`)")]
     WildcardOrigin,
 
     /// Request header `Origin` is required but was not provided.
-    #[display(fmt = "Request header `Origin` is required but was not provided")]
+    #[display(fmt = "Request header `Origin` is required but was not provided")]
     MissingOrigin,
 
     /// Request header `Access-Control-Request-Method` is required but is missing.
-    #[display(fmt = "Request header `Access-Control-Request-Method` is required but is missing")]
+    #[display(fmt = "Request header `Access-Control-Request-Method` is required but is missing")]
     MissingRequestMethod,
 
     /// Request header `Access-Control-Request-Method` has an invalid value.
-    #[display(fmt = "Request header `Access-Control-Request-Method` has an invalid value")]
+    #[display(fmt = "Request header `Access-Control-Request-Method` has an invalid value")]
     BadRequestMethod,
 
     /// Request header `Access-Control-Request-Headers` has an invalid value.
-    #[display(fmt = "Request header `Access-Control-Request-Headers` has an invalid value")]
+    #[display(fmt = "Request header `Access-Control-Request-Headers` has an invalid value")]
     BadRequestHeaders,
 
     /// Origin is not allowed to make this request.
-    #[display(fmt = "Origin is not allowed to make this request")]
+    #[display(fmt = "Origin is not allowed to make this request")]
     OriginNotAllowed,
 
     /// Request method is not allowed.
-    #[display(fmt = "Requested method is not allowed")]
+    #[display(fmt = "Requested method is not allowed")]
     MethodNotAllowed,
 
     /// One or more request headers are not allowed.
-    #[display(fmt = "One or more request headers are not allowed")]
+    #[display(fmt = "One or more request headers are not allowed")]
     HeadersNotAllowed,
 }
 
@@ -98,4 +98,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_cors/inner.rs.html b/src/actix_cors/inner.rs.html index 6ce506d3c..e6a90e4e1 100644 --- a/src/actix_cors/inner.rs.html +++ b/src/actix_cors/inner.rs.html @@ -1,5 +1,5 @@ -inner.rs - source
1
+inner.rs - source
1
 2
 3
 4
@@ -426,9 +426,9 @@
 
 use crate::{AllOrSome, CorsError};
 
-#[derive(Clone)]
+#[derive(Clone)]
 pub(crate) struct OriginFn {
-    #[allow(clippy::type_complexity)]
+    #[allow(clippy::type_complexity)]
     pub(crate) boxed_fn: Rc<dyn Fn(&HeaderValue, &RequestHead) -> bool>,
 }
 
@@ -453,7 +453,7 @@
         .and_then(|meth| Method::try_from(meth).ok())
 }
 
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub(crate) struct Inner {
     pub(crate) allowed_origins: AllOrSome<HashSet<HeaderValue>>,
     pub(crate) allowed_origins_fns: SmallVec<[OriginFn; 4]>,
@@ -472,7 +472,7 @@
     pub(crate) preflight: bool,
     pub(crate) send_wildcard: bool,
     pub(crate) supports_credentials: bool,
-    #[cfg(feature = "draft-private-network-access")]
+    #[cfg(feature = "draft-private-network-access")]
     pub(crate) allow_private_network_access: bool,
     pub(crate) vary_header: bool,
     pub(crate) block_on_origin_mismatch: bool,
@@ -485,7 +485,7 @@
     /// header should be added to the response or not.
     pub(crate) fn validate_origin(&self, req: &RequestHead) -> Result<bool, CorsError> {
         // return early if all origins are allowed or get ref to allowed origins set
-        #[allow(clippy::mutable_key_type)]
+        #[allow(clippy::mutable_key_type)]
         let allowed_origins = match &self.allowed_origins {
             AllOrSome::All if self.allowed_origins_fns.is_empty() => return Ok(true),
             AllOrSome::Some(allowed_origins) => allowed_origins,
@@ -569,7 +569,7 @@
 
     pub(crate) fn validate_allowed_headers(&self, req: &RequestHead) -> Result<(), CorsError> {
         // return early if all headers are allowed or get ref to allowed origins set
-        #[allow(clippy::mutable_key_type)]
+        #[allow(clippy::mutable_key_type)]
         let allowed_headers = match &self.allowed_headers {
             AllOrSome::All => return Ok(()),
             AllOrSome::Some(allowed_headers) => allowed_headers,
@@ -587,7 +587,7 @@
             Some(Ok(headers)) => {
                 // the set is ephemeral we take care not to mutate the
                 // inserted keys so this lint exception is acceptable
-                #[allow(clippy::mutable_key_type)]
+                #[allow(clippy::mutable_key_type)]
                 let mut request_headers = HashSet::with_capacity(8);
 
                 // try to convert each header name in the comma-separated list
@@ -630,19 +630,19 @@
             val.extend(hdr.as_bytes());
             val.extend(b", Origin, Access-Control-Request-Method, Access-Control-Request-Headers");
 
-            #[cfg(feature = "draft-private-network-access")]
+            #[cfg(feature = "draft-private-network-access")]
             val.extend(b", Access-Control-Allow-Private-Network");
 
             val.try_into().unwrap()
         }
 
-        #[cfg(feature = "draft-private-network-access")]
+        #[cfg(feature = "draft-private-network-access")]
         None => HeaderValue::from_static(
             "Origin, Access-Control-Request-Method, Access-Control-Request-Headers, \
             Access-Control-Allow-Private-Network",
         ),
 
-        #[cfg(not(feature = "draft-private-network-access"))]
+        #[cfg(not(feature = "draft-private-network-access"))]
         None => HeaderValue::from_static(
             "Origin, Access-Control-Request-Method, Access-Control-Request-Headers",
         ),
@@ -651,7 +651,7 @@
     headers.insert(header::VARY, value);
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod test {
     use std::rc::Rc;
 
@@ -670,7 +670,7 @@
         val.to_str().unwrap()
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_validate_not_allowed_origin() {
         let cors = Cors::default()
             .allowed_origin("https://www.example.com")
@@ -688,7 +688,7 @@
         assert!(cors.inner.validate_allowed_headers(req.head()).is_err());
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_preflight() {
         let mut cors = Cors::default()
             .allow_any_origin()
@@ -780,7 +780,7 @@
         assert_eq!(resp.status(), StatusCode::OK);
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn allow_fn_origin_equals_head_origin() {
         let cors = Cors::default()
             .allowed_origin_fn(|origin, head| {
@@ -814,4 +814,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_cors/lib.rs.html b/src/actix_cors/lib.rs.html index 2a836a306..f2ba73db6 100644 --- a/src/actix_cors/lib.rs.html +++ b/src/actix_cors/lib.rs.html @@ -1,5 +1,5 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -117,7 +117,7 @@
 //!
 //! [Private Network Access]: https://wicg.github.io/private-network-access
 
-#![forbid(unsafe_code)]
+#![forbid(unsafe_code)]
 #![deny(rust_2018_idioms, nonstandard_style)]
 #![warn(future_incompatible, missing_docs, missing_debug_implementations)]
 #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
@@ -136,4 +136,4 @@
 use inner::{Inner, OriginFn};
 pub use middleware::CorsMiddleware;
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_cors/middleware.rs.html b/src/actix_cors/middleware.rs.html index 7373e4a0a..0f5f4c3c8 100644 --- a/src/actix_cors/middleware.rs.html +++ b/src/actix_cors/middleware.rs.html @@ -1,5 +1,5 @@ -middleware.rs - source
1
+middleware.rs - source
1
 2
 3
 4
@@ -325,7 +325,7 @@
 ///
 /// This struct contains the settings for CORS requests to be validated and for responses to
 /// be generated.
-#[doc(hidden)]
+#[doc(hidden)]
 #[derive(Debug, Clone)]
 pub struct CorsMiddleware<S> {
     pub(crate) service: S,
@@ -395,7 +395,7 @@
             res.insert_header((header::ACCESS_CONTROL_ALLOW_HEADERS, headers.clone()));
         }
 
-        #[cfg(feature = "draft-private-network-access")]
+        #[cfg(feature = "draft-private-network-access")]
         if inner.allow_private_network_access
             && req
                 .headers()
@@ -476,7 +476,7 @@
             );
         }
 
-        #[cfg(feature = "draft-private-network-access")]
+        #[cfg(feature = "draft-private-network-access")]
         if inner.allow_private_network_access
             && res
                 .request()
@@ -545,7 +545,7 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use actix_web::{
         dev::Transform,
@@ -557,12 +557,12 @@
     use super::*;
     use crate::Cors;
 
-    #[test]
+    #[test]
     fn compat_compat() {
         let _ = App::new().wrap(Compat::new(Cors::default()));
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_options_no_origin() {
         // Tests case where allowed_origins is All but there are validate functions to run incase.
         // In this case, origins are only allowed when the DNT header is sent.
@@ -602,4 +602,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_identity/config.rs.html b/src/actix_identity/config.rs.html index 43566ea40..360cfc02c 100644 --- a/src/actix_identity/config.rs.html +++ b/src/actix_identity/config.rs.html @@ -1,4 +1,4 @@ -config.rs - source
1
+config.rs - source
1
 2
 3
 4
@@ -105,7 +105,7 @@
 
 use crate::IdentityMiddleware;
 
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub(crate) struct Configuration {
     pub(crate) on_logout: LogoutBehaviour,
     pub(crate) login_deadline: Option<Duration>,
@@ -126,7 +126,7 @@
 /// invoked.
 ///
 /// [`Identity::logout`]: crate::Identity::logout
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 #[non_exhaustive]
 pub enum LogoutBehaviour {
     /// When [`Identity::logout`](crate::Identity::logout) is called, purge the current session.
@@ -147,7 +147,7 @@
 /// parameters.
 ///
 /// Use [`IdentityMiddleware::builder`] to get started!
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub struct IdentityMiddlewareBuilder {
     configuration: Configuration,
 }
@@ -201,4 +201,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_identity/identity.rs.html b/src/actix_identity/identity.rs.html index b49dfcad1..cdb8ad530 100644 --- a/src/actix_identity/identity.rs.html +++ b/src/actix_identity/identity.rs.html @@ -1,4 +1,4 @@ -identity.rs - source
1
+identity.rs - source
1
 2
 3
 4
@@ -337,7 +337,7 @@
 /// ```
 pub struct Identity(IdentityInner);
 
-#[derive(Clone)]
+#[derive(Clone)]
 pub(crate) struct IdentityInner {
     pub(crate) session: Session,
     pub(crate) logout_behaviour: LogoutBehaviour,
@@ -516,7 +516,7 @@
     type Error = Error;
     type Future = Ready<Result<Self, Self::Error>>;
 
-    #[inline]
+    #[inline]
     fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
         ready(Identity::extract(&req.extensions()).map_err(|err| {
             let res = actix_web::error::InternalError::from_response(
@@ -529,4 +529,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_identity/identity_ext.rs.html b/src/actix_identity/identity_ext.rs.html index acdce228d..f01d8268e 100644 --- a/src/actix_identity/identity_ext.rs.html +++ b/src/actix_identity/identity_ext.rs.html @@ -1,4 +1,4 @@ -identity_ext.rs - source
1
+identity_ext.rs - source
1
 2
 3
 4
@@ -53,4 +53,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_identity/lib.rs.html b/src/actix_identity/lib.rs.html index 5b2a8dee9..1d76dbee5 100644 --- a/src/actix_identity/lib.rs.html +++ b/src/actix_identity/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -184,7 +184,7 @@
 //! [`IdentityMiddlewareBuilder::visit_deadline`]: config::IdentityMiddlewareBuilder::visit_deadline
 //! [`IdentityMiddlewareBuilder::login_deadline`]: config::IdentityMiddlewareBuilder::login_deadline
 
-#![forbid(unsafe_code)]
+#![forbid(unsafe_code)]
 #![deny(rust_2018_idioms, nonstandard_style, missing_docs)]
 #![warn(future_incompatible)]
 
@@ -195,4 +195,4 @@
 
 pub use self::{identity::Identity, identity_ext::IdentityExt, middleware::IdentityMiddleware};
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_identity/middleware.rs.html b/src/actix_identity/middleware.rs.html index 2e061e7e0..3fbc439a1 100644 --- a/src/actix_identity/middleware.rs.html +++ b/src/actix_identity/middleware.rs.html @@ -1,4 +1,4 @@ -middleware.rs - source
1
+middleware.rs - source
1
 2
 3
 4
@@ -296,7 +296,7 @@
 /// # ;
 /// }
 /// ```
-#[derive(Default, Clone)]
+#[derive(Default, Clone)]
 pub struct IdentityMiddleware {
     configuration: Rc<Configuration>,
 }
@@ -334,7 +334,7 @@
     }
 }
 
-#[doc(hidden)]
+#[doc(hidden)]
 pub struct InnerIdentityMiddleware<S> {
     service: Rc<S>,
     configuration: Rc<Configuration>,
@@ -380,7 +380,7 @@
 
 // easier to scan with returns where they are
 // especially if the function body were to evolve in the future
-#[allow(clippy::needless_return)]
+#[allow(clippy::needless_return)]
 fn enforce_policies(req: &ServiceRequest, configuration: &Configuration) {
     let must_extract_identity =
         configuration.login_deadline.is_some() || configuration.visit_deadline.is_some();
@@ -511,4 +511,4 @@
     LogOut,
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_limitation/builder.rs.html b/src/actix_limitation/builder.rs.html index 2470ee91e..2a99ff99f 100644 --- a/src/actix_limitation/builder.rs.html +++ b/src/actix_limitation/builder.rs.html @@ -1,5 +1,5 @@ -builder.rs - source
1
+builder.rs - source
1
 2
 3
 4
@@ -172,7 +172,7 @@
 171
 
use std::{borrow::Cow, sync::Arc, time::Duration};
 
-#[cfg(feature = "session")]
+#[cfg(feature = "session")]
 use actix_session::SessionExt as _;
 use actix_web::dev::ServiceRequest;
 use redis::Client;
@@ -180,14 +180,14 @@
 use crate::{errors::Error, GetArcBoxKeyFn, Limiter};
 
 /// Rate limiter builder.
-#[derive(Debug)]
+#[derive(Debug)]
 pub struct Builder {
     pub(crate) redis_url: String,
     pub(crate) limit: usize,
     pub(crate) period: Duration,
     pub(crate) get_key_fn: Option<GetArcBoxKeyFn>,
     pub(crate) cookie_name: Cow<'static, str>,
-    #[cfg(feature = "session")]
+    #[cfg(feature = "session")]
     pub(crate) session_key: Cow<'static, str>,
 }
 
@@ -218,7 +218,7 @@
     /// Sets name of cookie to be sent.
     ///
     /// This method should not be used in combination of `key_by` as they conflict.
-    #[deprecated = "Prefer `key_by`."]
+    #[deprecated = "Prefer `key_by`."]
     pub fn cookie_name(&mut self, cookie_name: impl Into<Cow<'static, str>>) -> &mut Self {
         if self.get_key_fn.is_some() {
             panic!("This method should not be used in combination of get_key as they overwrite each other")
@@ -230,7 +230,7 @@
     /// Sets session key to be used in backend.
     ///
     /// This method should not be used in combination of `key_by` as they conflict.
-    #[deprecated = "Prefer `key_by`."]
+    #[deprecated = "Prefer `key_by`."]
     #[cfg(feature = "session")]
     pub fn session_key(&mut self, session_key: impl Into<Cow<'static, str>>) -> &mut Self {
         if self.get_key_fn.is_some() {
@@ -250,17 +250,17 @@
         } else {
             let cookie_name = self.cookie_name.clone();
 
-            #[cfg(feature = "session")]
+            #[cfg(feature = "session")]
             let session_key = self.session_key.clone();
 
             let closure: GetArcBoxKeyFn = Arc::new(Box::new(move |req: &ServiceRequest| {
-                #[cfg(feature = "session")]
+                #[cfg(feature = "session")]
                 let res = req
                     .get_session()
                     .get(&session_key)
                     .unwrap_or_else(|_| req.cookie(&cookie_name).map(|c| c.to_string()));
 
-                #[cfg(not(feature = "session"))]
+                #[cfg(not(feature = "session"))]
                 let res = req.cookie(&cookie_name).map(|c| c.to_string());
 
                 res
@@ -277,11 +277,11 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use super::*;
 
-    #[test]
+    #[test]
     fn test_create_builder() {
         let redis_url = "redis://127.0.0.1";
         let period = Duration::from_secs(10);
@@ -291,19 +291,19 @@
             period,
             get_key_fn: Some(Arc::new(|_| None)),
             cookie_name: Cow::Owned("session".to_string()),
-            #[cfg(feature = "session")]
+            #[cfg(feature = "session")]
             session_key: Cow::Owned("rate-api".to_string()),
         };
 
         assert_eq!(builder.redis_url, redis_url);
         assert_eq!(builder.limit, 100);
         assert_eq!(builder.period, period);
-        #[cfg(feature = "session")]
+        #[cfg(feature = "session")]
         assert_eq!(builder.session_key, "rate-api");
         assert_eq!(builder.cookie_name, "session");
     }
 
-    #[test]
+    #[test]
     fn test_create_limiter() {
         let redis_url = "redis://127.0.0.1";
         let period = Duration::from_secs(20);
@@ -313,7 +313,7 @@
             period: Duration::from_secs(10),
             get_key_fn: Some(Arc::new(|_| None)),
             cookie_name: Cow::Borrowed("sid"),
-            #[cfg(feature = "session")]
+            #[cfg(feature = "session")]
             session_key: Cow::Borrowed("key"),
         };
 
@@ -323,7 +323,7 @@
         assert_eq!(limiter.period, period);
     }
 
-    #[test]
+    #[test]
     #[should_panic = "Redis URL did not parse"]
     fn test_create_limiter_error() {
         let redis_url = "127.0.0.1";
@@ -334,7 +334,7 @@
             period: Duration::from_secs(10),
             get_key_fn: Some(Arc::new(|_| None)),
             cookie_name: Cow::Borrowed("sid"),
-            #[cfg(feature = "session")]
+            #[cfg(feature = "session")]
             session_key: Cow::Borrowed("key"),
         };
 
@@ -342,4 +342,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_limitation/errors.rs.html b/src/actix_limitation/errors.rs.html index bef8943b5..5c0437519 100644 --- a/src/actix_limitation/errors.rs.html +++ b/src/actix_limitation/errors.rs.html @@ -1,5 +1,5 @@ -errors.rs - source
1
+errors.rs - source
1
 2
 3
 4
@@ -46,28 +46,28 @@
 use crate::status::Status;
 
 /// Failure modes of the rate limiter.
-#[derive(Debug, Display, Error, From)]
+#[derive(Debug, Display, Error, From)]
 pub enum Error {
     /// Redis client failed to connect or run a query.
-    #[display(fmt = "Redis client failed to connect or run a query")]
+    #[display(fmt = "Redis client failed to connect or run a query")]
     Client(redis::RedisError),
 
     /// Limit is exceeded for a key.
-    #[display(fmt = "Limit is exceeded for a key")]
+    #[display(fmt = "Limit is exceeded for a key")]
     #[from(ignore)]
-    LimitExceeded(#[error(not(source))] Status),
+    LimitExceeded(#[error(not(source))] Status),
 
     /// Time conversion failed.
-    #[display(fmt = "Time conversion failed")]
+    #[display(fmt = "Time conversion failed")]
     Time(time::error::ComponentRange),
 
     /// Generic error.
-    #[display(fmt = "Generic error")]
+    #[display(fmt = "Generic error")]
     #[from(ignore)]
-    Other(#[error(not(source))] String),
+    Other(#[error(not(source))] String),
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use super::*;
 
@@ -84,4 +84,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_limitation/lib.rs.html b/src/actix_limitation/lib.rs.html index 258b2c336..6241ea206 100644 --- a/src/actix_limitation/lib.rs.html +++ b/src/actix_limitation/lib.rs.html @@ -1,5 +1,5 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -183,7 +183,7 @@
 //! ```toml
 //! [dependencies]
 //! actix-web = "4"
-#![doc = concat!("actix-limitation = \"", env!("CARGO_PKG_VERSION_MAJOR"), ".", env!("CARGO_PKG_VERSION_MINOR"),"\"")]
+#![doc = concat!("actix-limitation = \"", env!("CARGO_PKG_VERSION_MAJOR"), ".", env!("CARGO_PKG_VERSION_MINOR"),"\"")]
 //! ```
 //!
 //! ```no_run
@@ -224,7 +224,7 @@
 //! }
 //! ```
 
-#![forbid(unsafe_code)]
+#![forbid(unsafe_code)]
 #![deny(rust_2018_idioms, nonstandard_style)]
 #![warn(future_incompatible, missing_docs, missing_debug_implementations)]
 #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
@@ -252,7 +252,7 @@
 pub const DEFAULT_COOKIE_NAME: &str = "sid";
 
 /// Default session key.
-#[cfg(feature = "session")]
+#[cfg(feature = "session")]
 pub const DEFAULT_SESSION_KEY: &str = "rate-api-id";
 
 /// Helper trait to impl Debug on GetKeyFn type
@@ -274,7 +274,7 @@
 type GetArcBoxKeyFn = Arc<GetKeyFn>;
 
 /// Rate limiter.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub struct Limiter {
     client: Client,
     limit: usize,
@@ -287,7 +287,7 @@
     ///
     /// See [`redis-rs` docs](https://docs.rs/redis/0.21/redis/#connection-parameters) on connection
     /// parameters for how to set the Redis URL.
-    #[must_use]
+    #[must_use]
     pub fn builder(redis_url: impl Into<String>) -> Builder {
         Builder {
             redis_url: redis_url.into(),
@@ -295,7 +295,7 @@
             period: Duration::from_secs(DEFAULT_PERIOD_SECS),
             get_key_fn: None,
             cookie_name: Cow::Borrowed(DEFAULT_COOKIE_NAME),
-            #[cfg(feature = "session")]
+            #[cfg(feature = "session")]
             session_key: Cow::Borrowed(DEFAULT_SESSION_KEY),
         }
     }
@@ -342,11 +342,11 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use super::*;
 
-    #[test]
+    #[test]
     fn test_create_limiter() {
         let mut builder = Limiter::builder("redis://127.0.0.1:6379/1");
         let limiter = builder.build();
@@ -358,4 +358,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_limitation/middleware.rs.html b/src/actix_limitation/middleware.rs.html index cc38d054d..096bd3330 100644 --- a/src/actix_limitation/middleware.rs.html +++ b/src/actix_limitation/middleware.rs.html @@ -1,5 +1,5 @@ -middleware.rs - source
1
+middleware.rs - source
1
 2
 3
 4
@@ -127,7 +127,7 @@
 use crate::{Error as LimitationError, Limiter};
 
 /// Rate limit middleware.
-#[derive(Debug, Default)]
+#[derive(Debug, Default)]
 #[non_exhaustive]
 pub struct RateLimiter;
 
@@ -151,7 +151,7 @@
 }
 
 /// Rate limit middleware service.
-#[derive(Debug)]
+#[derive(Debug)]
 pub struct RateLimiterMiddleware<S> {
     service: Rc<S>,
 }
@@ -230,4 +230,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_limitation/status.rs.html b/src/actix_limitation/status.rs.html index 1d194a620..7e51fd78a 100644 --- a/src/actix_limitation/status.rs.html +++ b/src/actix_limitation/status.rs.html @@ -1,5 +1,5 @@ -status.rs - source
1
+status.rs - source
1
 2
 3
 4
@@ -124,7 +124,7 @@
 use crate::Error as LimitationError;
 
 /// A report for a given key containing the limit status.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub struct Status {
     pub(crate) limit: usize,
     pub(crate) remaining: usize,
@@ -133,7 +133,7 @@
 
 impl Status {
     /// Constructs status limit status from parts.
-    #[must_use]
+    #[must_use]
     pub(crate) fn new(count: usize, limit: usize, reset_epoch_utc: usize) -> Self {
         let remaining = if count >= limit { 0 } else { limit - count };
 
@@ -145,19 +145,19 @@
     }
 
     /// Returns the maximum number of requests allowed in the current period.
-    #[must_use]
+    #[must_use]
     pub fn limit(&self) -> usize {
         self.limit
     }
 
     /// Returns how many requests are left in the current period.
-    #[must_use]
+    #[must_use]
     pub fn remaining(&self) -> usize {
         self.remaining
     }
 
     /// Returns a UNIX timestamp in UTC approximately when the next period will begin.
-    #[must_use]
+    #[must_use]
     pub fn reset_epoch_utc(&self) -> usize {
         self.reset_epoch_utc
     }
@@ -178,11 +178,11 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use super::*;
 
-    #[test]
+    #[test]
     fn test_create_status() {
         let status = Status {
             limit: 100,
@@ -195,7 +195,7 @@
         assert_eq!(status.reset_epoch_utc(), 1000);
     }
 
-    #[test]
+    #[test]
     fn test_build_status() {
         let count = 200;
         let limit = 100;
@@ -205,7 +205,7 @@
         assert_eq!(status.reset_epoch_utc(), 2000);
     }
 
-    #[test]
+    #[test]
     fn test_build_status_limit() {
         let limit = 100;
         let status = Status::new(0, limit, 2000);
@@ -214,21 +214,21 @@
         assert_eq!(status.reset_epoch_utc(), 2000);
     }
 
-    #[test]
+    #[test]
     fn test_epoch_utc_plus_zero() {
         let duration = Duration::from_secs(0);
         let seconds = Status::epoch_utc_plus(duration).unwrap();
         assert!(seconds as u64 >= duration.as_secs());
     }
 
-    #[test]
+    #[test]
     fn test_epoch_utc_plus() {
         let duration = Duration::from_secs(10);
         let seconds = Status::epoch_utc_plus(duration).unwrap();
         assert!(seconds as u64 >= duration.as_secs() + 10);
     }
 
-    #[test]
+    #[test]
     #[should_panic = "Source duration value is out of range for the target type"]
     fn test_epoch_utc_plus_overflow() {
         let duration = Duration::from_secs(10000000000000000000);
@@ -236,4 +236,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_protobuf/lib.rs.html b/src/actix_protobuf/lib.rs.html index 47b2377d9..064915b67 100644 --- a/src/actix_protobuf/lib.rs.html +++ b/src/actix_protobuf/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -335,7 +335,7 @@
 335
 
//! Protobuf payload extractor for Actix Web.
 
-#![forbid(unsafe_code)]
+#![forbid(unsafe_code)]
 #![deny(rust_2018_idioms, nonstandard_style)]
 #![warn(future_incompatible)]
 
@@ -363,26 +363,26 @@
 };
 use prost::{DecodeError as ProtoBufDecodeError, EncodeError as ProtoBufEncodeError, Message};
 
-#[derive(Debug, Display)]
+#[derive(Debug, Display)]
 pub enum ProtoBufPayloadError {
     /// Payload size is bigger than 256k
-    #[display(fmt = "Payload size is bigger than 256k")]
+    #[display(fmt = "Payload size is bigger than 256k")]
     Overflow,
 
     /// Content type error
-    #[display(fmt = "Content type error")]
+    #[display(fmt = "Content type error")]
     ContentType,
 
     /// Serialize error
-    #[display(fmt = "ProtoBuf serialize error: {}", _0)]
+    #[display(fmt = "ProtoBuf serialize error: {}", _0)]
     Serialize(ProtoBufEncodeError),
 
     /// Deserialize error
-    #[display(fmt = "ProtoBuf deserialize error: {}", _0)]
+    #[display(fmt = "ProtoBuf deserialize error: {}", _0)]
     Deserialize(ProtoBufDecodeError),
 
     /// Payload error
-    #[display(fmt = "Error that occur during reading payload: {}", _0)]
+    #[display(fmt = "Error that occur during reading payload: {}", _0)]
     Payload(PayloadError),
 }
 
@@ -466,7 +466,7 @@
     type Error = Error;
     type Future = LocalBoxFuture<'static, Result<Self, Error>>;
 
-    #[inline]
+    #[inline]
     fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future {
         let limit = req
             .app_data::<ProtoBufConfig>()
@@ -606,7 +606,7 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use actix_web::{http::header, test::TestRequest};
 
@@ -626,15 +626,15 @@
         }
     }
 
-    #[derive(Clone, PartialEq, Eq, Message)]
+    #[derive(Clone, PartialEq, Eq, Message)]
     pub struct MyObject {
-        #[prost(int32, tag = "1")]
+        #[prost(int32, tag = "1")]
         pub number: i32,
-        #[prost(string, tag = "2")]
+        #[prost(string, tag = "2")]
         pub name: String,
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_protobuf() {
         let protobuf = ProtoBuf(MyObject {
             number: 9,
@@ -646,7 +646,7 @@
         assert_eq!(ct, "application/protobuf");
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_protobuf_message() {
         let (req, mut pl) = TestRequest::default().to_http_parts();
         let protobuf = ProtoBufMessage::<MyObject>::new(&req, &mut pl).await;
@@ -669,4 +669,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_redis/lib.rs.html b/src/actix_redis/lib.rs.html index 66d9b043b..3a240c826 100644 --- a/src/actix_redis/lib.rs.html +++ b/src/actix_redis/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -29,7 +29,7 @@
 29
 
//! Redis integration for `actix`.
 
-#![forbid(unsafe_code)]
+#![forbid(unsafe_code)]
 #![deny(rust_2018_idioms, nonstandard_style)]
 #![warn(future_incompatible)]
 
@@ -40,21 +40,21 @@
 pub use self::redis::{Command, RedisActor};
 
 /// General purpose `actix-redis` error.
-#[derive(Debug, Display, Error, From)]
+#[derive(Debug, Display, Error, From)]
 pub enum Error {
-    #[display(fmt = "Redis error: {}", _0)]
+    #[display(fmt = "Redis error: {}", _0)]
     Redis(redis_async::error::Error),
 
     /// Receiving message during reconnecting.
-    #[display(fmt = "Redis: Not connected")]
+    #[display(fmt = "Redis: Not connected")]
     NotConnected,
 
     /// Cancel all waiters when connection is dropped.
-    #[display(fmt = "Redis: Disconnected")]
+    #[display(fmt = "Redis: Disconnected")]
     Disconnected,
 }
 
-#[cfg(feature = "web")]
+#[cfg(feature = "web")]
 impl actix_web::ResponseError for Error {}
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_redis/redis.rs.html b/src/actix_redis/redis.rs.html index f606740f4..610d69de3 100644 --- a/src/actix_redis/redis.rs.html +++ b/src/actix_redis/redis.rs.html @@ -1,4 +1,4 @@ -redis.rs - source
1
+redis.rs - source
1
 2
 3
 4
@@ -162,7 +162,7 @@
 use crate::Error;
 
 /// Command for sending data to Redis.
-#[derive(Debug)]
+#[derive(Debug)]
 pub struct Command(pub RespValue);
 
 impl Message for Command {
@@ -285,4 +285,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/config.rs.html b/src/actix_session/config.rs.html index 4c269cbf6..b6308489d 100644 --- a/src/actix_session/config.rs.html +++ b/src/actix_session/config.rs.html @@ -1,5 +1,5 @@ -config.rs - source
1
+config.rs - source
1
 2
 3
 4
@@ -405,7 +405,7 @@
 /// Determines what type of session cookie should be used and how its lifecycle should be managed.
 ///
 /// Used by [`SessionMiddlewareBuilder::session_lifecycle`].
-#[derive(Debug, Clone, From)]
+#[derive(Debug, Clone, From)]
 #[non_exhaustive]
 pub enum SessionLifecycle {
     /// The session cookie will expire when the current browser session ends.
@@ -435,7 +435,7 @@
 ///
 /// Due to its `Into<SessionLifecycle>` implementation, a `BrowserSession` can be passed directly
 /// to [`SessionMiddlewareBuilder::session_lifecycle()`].
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub struct BrowserSession {
     state_ttl: Duration,
     state_ttl_extension_policy: TtlExtensionPolicy,
@@ -513,7 +513,7 @@
 /// ```
 ///
 /// [persistent]: https://www.whitehatsec.com/glossary/content/persistent-session-cookie
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub struct PersistentSession {
     session_ttl: Duration,
     ttl_extension_policy: TtlExtensionPolicy,
@@ -563,7 +563,7 @@
 ///
 /// 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.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 #[non_exhaustive]
 pub enum TtlExtensionPolicy {
     /// The TTL is refreshed every time the server receives a request associated with a session.
@@ -583,7 +583,7 @@
 /// Determines how to secure the content of the session cookie.
 ///
 /// Used by [`SessionMiddlewareBuilder::cookie_content_security`].
-#[derive(Debug, Clone, Copy)]
+#[derive(Debug, Clone, Copy)]
 pub enum CookieContentSecurity {
     /// The cookie content is encrypted when using `CookieContentSecurity::Private`.
     ///
@@ -607,7 +607,7 @@
 }
 
 /// A fluent, customized [`SessionMiddleware`] builder.
-#[must_use]
+#[must_use]
 pub struct SessionMiddlewareBuilder<Store: SessionStore> {
     storage_backend: Store,
     configuration: Configuration,
@@ -741,25 +741,25 @@
     }
 
     /// Finalise the builder and return a [`SessionMiddleware`] instance.
-    #[must_use]
+    #[must_use]
     pub fn build(self) -> SessionMiddleware<Store> {
         SessionMiddleware::from_parts(self.storage_backend, self.configuration)
     }
 }
 
-#[derive(Clone)]
+#[derive(Clone)]
 pub(crate) struct Configuration {
     pub(crate) cookie: CookieConfiguration,
     pub(crate) session: SessionConfiguration,
     pub(crate) ttl_extension_policy: TtlExtensionPolicy,
 }
 
-#[derive(Clone)]
+#[derive(Clone)]
 pub(crate) struct SessionConfiguration {
     pub(crate) state_ttl: Duration,
 }
 
-#[derive(Clone)]
+#[derive(Clone)]
 pub(crate) struct CookieConfiguration {
     pub(crate) secure: bool,
     pub(crate) http_only: bool,
@@ -792,4 +792,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/lib.rs.html b/src/actix_session/lib.rs.html index 31edfda06..ca367ce5e 100644 --- a/src/actix_session/lib.rs.html +++ b/src/actix_session/lib.rs.html @@ -1,5 +1,5 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -870,7 +870,7 @@
 //! [`RedisSessionStore`]: storage::RedisSessionStore
 //! [`RedisActorSessionStore`]: storage::RedisActorSessionStore
 
-#![forbid(unsafe_code)]
+#![forbid(unsafe_code)]
 #![deny(rust_2018_idioms, nonstandard_style)]
 #![warn(future_incompatible, missing_docs)]
 #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
@@ -889,7 +889,7 @@
     session_ext::SessionExt,
 };
 
-#[cfg(test)]
+#[cfg(test)]
 pub mod test_helpers {
     use actix_web::cookie::Key;
 
@@ -1389,7 +1389,7 @@
             );
         }
 
-        #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
+        #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
         pub struct IndexResponse {
             user_id: Option<String>,
             counter: i32,
@@ -1423,7 +1423,7 @@
             Ok(HttpResponse::Ok().json(&IndexResponse { user_id, counter }))
         }
 
-        #[derive(Deserialize)]
+        #[derive(Deserialize)]
         struct Identity {
             user_id: String,
         }
@@ -1472,4 +1472,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/middleware.rs.html b/src/actix_session/middleware.rs.html index 0044b234a..bb0f7a99b 100644 --- a/src/actix_session/middleware.rs.html +++ b/src/actix_session/middleware.rs.html @@ -1,5 +1,5 @@ -middleware.rs - source
1
+middleware.rs - source
1
 2
 3
 4
@@ -463,6 +463,7 @@
 462
 463
 464
+465
 
use std::{collections::HashMap, convert::TryInto, fmt, future::Future, pin::Pin, rc::Rc};
 
 use actix_utils::future::{ready, Ready};
@@ -578,7 +579,7 @@
 ///         .await
 /// }
 /// ```
-#[derive(Clone)]
+#[derive(Clone)]
 pub struct SessionMiddleware<Store: SessionStore> {
     storage_backend: Rc<Store>,
     configuration: Rc<Configuration>,
@@ -652,7 +653,7 @@
     .into()
 }
 
-#[doc(hidden)]
+#[doc(hidden)]
 #[non_exhaustive]
 pub struct InnerSessionMiddleware<S, Store: SessionStore + 'static> {
     service: Rc<S>,
@@ -668,7 +669,7 @@
 {
     type Response = ServiceResponse<B>;
     type Error = actix_web::Error;
-    #[allow(clippy::type_complexity)]
+    #[allow(clippy::type_complexity)]
     type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>>>>;
 
     forward_ready!(service);
@@ -909,6 +910,7 @@
 ) -> Result<(), anyhow::Error> {
     let removal_cookie = Cookie::build(config.name.clone(), "")
         .path(config.path.clone())
+        .secure(config.secure)
         .http_only(config.http_only)
         .same_site(config.same_site);
 
@@ -928,4 +930,4 @@
     Ok(())
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/session.rs.html b/src/actix_session/session.rs.html index ff02dbb96..f4f96c604 100644 --- a/src/actix_session/session.rs.html +++ b/src/actix_session/session.rs.html @@ -1,5 +1,5 @@ -session.rs - source
1
+session.rs - source
1
 2
 3
 4
@@ -367,11 +367,11 @@
 /// [`SessionExt`].
 ///
 /// [`SessionExt`]: crate::SessionExt
-#[derive(Clone)]
+#[derive(Clone)]
 pub struct Session(Rc<RefCell<SessionInner>>);
 
 /// Status of a [`Session`].
-#[derive(Debug, Clone, PartialEq, Eq)]
+#[derive(Debug, Clone, PartialEq, Eq)]
 pub enum SessionStatus {
     /// Session state has been updated - the changes will have to be persisted to the backend.
     Changed,
@@ -398,7 +398,7 @@
     }
 }
 
-#[derive(Default)]
+#[derive(Default)]
 struct SessionInner {
     state: HashMap<String, String>,
     status: SessionStatus,
@@ -608,14 +608,14 @@
     type Error = Error;
     type Future = Ready<Result<Session, Error>>;
 
-    #[inline]
+    #[inline]
     fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
         ready(Ok(Session::get_session(&mut req.extensions_mut())))
     }
 }
 
 /// Error returned by [`Session::get`].
-#[derive(Debug, Display, From)]
+#[derive(Debug, Display, From)]
 #[display(fmt = "{}", _0)]
 pub struct SessionGetError(anyhow::Error);
 
@@ -632,7 +632,7 @@
 }
 
 /// Error returned by [`Session::insert`].
-#[derive(Debug, Display, From)]
+#[derive(Debug, Display, From)]
 #[display(fmt = "{}", _0)]
 pub struct SessionInsertError(anyhow::Error);
 
@@ -648,4 +648,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/session_ext.rs.html b/src/actix_session/session_ext.rs.html index d18191b56..d9460dc3f 100644 --- a/src/actix_session/session_ext.rs.html +++ b/src/actix_session/session_ext.rs.html @@ -1,5 +1,5 @@ -session_ext.rs - source
1
+session_ext.rs - source
1
 2
 3
 4
@@ -76,4 +76,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/storage/cookie.rs.html b/src/actix_session/storage/cookie.rs.html index b59989385..b2fcd143a 100644 --- a/src/actix_session/storage/cookie.rs.html +++ b/src/actix_session/storage/cookie.rs.html @@ -1,5 +1,5 @@ -cookie.rs - source
1
+cookie.rs - source
1
 2
 3
 4
@@ -169,12 +169,12 @@
 /// storage backend.
 ///
 /// [`CookieContentSecurity::Private`]: crate::config::CookieContentSecurity::Private
-#[cfg_attr(docsrs, doc(cfg(feature = "cookie-session")))]
+#[cfg_attr(docsrs, doc(cfg(feature = "cookie-session")))]
 #[derive(Default)]
 #[non_exhaustive]
 pub struct CookieSessionStore;
 
-#[async_trait::async_trait(?Send)]
+#[async_trait::async_trait(?Send)]
 impl SessionStore for CookieSessionStore {
     async fn load(&self, session_key: &SessionKey) -> Result<Option<SessionState>, LoadError> {
         serde_json::from_str(session_key.as_ref())
@@ -221,17 +221,17 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use super::*;
     use crate::{storage::utils::generate_session_key, test_helpers::acceptance_test_suite};
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_session_workflow() {
         acceptance_test_suite(CookieSessionStore::default, false).await;
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn loading_a_random_session_key_returns_deserialization_error() {
         let store = CookieSessionStore::default();
         let session_key = generate_session_key();
@@ -242,4 +242,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/storage/interface.rs.html b/src/actix_session/storage/interface.rs.html index c99db77d4..2f61c927e 100644 --- a/src/actix_session/storage/interface.rs.html +++ b/src/actix_session/storage/interface.rs.html @@ -1,5 +1,5 @@ -interface.rs - source
1
+interface.rs - source
1
 2
 3
 4
@@ -130,7 +130,7 @@
 /// [`async-trait`](https://docs.rs/async-trait) is used for this trait's definition. Therefore, it
 /// is required for implementations, too. In particular, we use the send-optional variant:
 /// `#[async_trait(?Send)]`.
-#[async_trait::async_trait(?Send)]
+#[async_trait::async_trait(?Send)]
 pub trait SessionStore {
     /// Loads the session state associated to a session key.
     async fn load(&self, session_key: &SessionKey) -> Result<Option<SessionState>, LoadError>;
@@ -168,14 +168,14 @@
 // while it's actually enough for it to be able to produce a reference to a dyn Error.
 
 /// Possible failures modes for [`SessionStore::load`].
-#[derive(Debug, Display)]
+#[derive(Debug, Display)]
 pub enum LoadError {
     /// Failed to deserialize session state.
-    #[display(fmt = "Failed to deserialize session state")]
+    #[display(fmt = "Failed to deserialize session state")]
     Deserialization(anyhow::Error),
 
     /// Something went wrong when retrieving the session state.
-    #[display(fmt = "Something went wrong when retrieving the session state")]
+    #[display(fmt = "Something went wrong when retrieving the session state")]
     Other(anyhow::Error),
 }
 
@@ -189,14 +189,14 @@
 }
 
 /// Possible failures modes for [`SessionStore::save`].
-#[derive(Debug, Display)]
+#[derive(Debug, Display)]
 pub enum SaveError {
     /// Failed to serialize session state.
-    #[display(fmt = "Failed to serialize session state")]
+    #[display(fmt = "Failed to serialize session state")]
     Serialization(anyhow::Error),
 
     /// Something went wrong when persisting the session state.
-    #[display(fmt = "Something went wrong when persisting the session state")]
+    #[display(fmt = "Something went wrong when persisting the session state")]
     Other(anyhow::Error),
 }
 
@@ -209,15 +209,15 @@
     }
 }
 
-#[derive(Debug, Display)]
+#[derive(Debug, Display)]
 /// Possible failures modes for [`SessionStore::update`].
 pub enum UpdateError {
     /// Failed to serialize session state.
-    #[display(fmt = "Failed to serialize session state")]
+    #[display(fmt = "Failed to serialize session state")]
     Serialization(anyhow::Error),
 
     /// Something went wrong when updating the session state.
-    #[display(fmt = "Something went wrong when updating the session state.")]
+    #[display(fmt = "Something went wrong when updating the session state.")]
     Other(anyhow::Error),
 }
 
@@ -230,4 +230,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/storage/mod.rs.html b/src/actix_session/storage/mod.rs.html index f53dfe5a7..197226869 100644 --- a/src/actix_session/storage/mod.rs.html +++ b/src/actix_session/storage/mod.rs.html @@ -1,5 +1,5 @@ -mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
@@ -37,23 +37,23 @@
     session_key::SessionKey,
 };
 
-#[cfg(feature = "cookie-session")]
+#[cfg(feature = "cookie-session")]
 mod cookie;
 
-#[cfg(feature = "redis-actor-session")]
+#[cfg(feature = "redis-actor-session")]
 mod redis_actor;
 
-#[cfg(feature = "redis-rs-session")]
+#[cfg(feature = "redis-rs-session")]
 mod redis_rs;
 
-#[cfg(any(feature = "redis-actor-session", feature = "redis-rs-session"))]
+#[cfg(any(feature = "redis-actor-session", feature = "redis-rs-session"))]
 mod utils;
 
-#[cfg(feature = "cookie-session")]
+#[cfg(feature = "cookie-session")]
 pub use cookie::CookieSessionStore;
-#[cfg(feature = "redis-actor-session")]
+#[cfg(feature = "redis-actor-session")]
 pub use redis_actor::{RedisActorSessionStore, RedisActorSessionStoreBuilder};
-#[cfg(feature = "redis-rs-session")]
+#[cfg(feature = "redis-rs-session")]
 pub use redis_rs::{RedisSessionStore, RedisSessionStoreBuilder};
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/storage/redis_actor.rs.html b/src/actix_session/storage/redis_actor.rs.html index 7e3b939da..713b8979e 100644 --- a/src/actix_session/storage/redis_actor.rs.html +++ b/src/actix_session/storage/redis_actor.rs.html @@ -1,5 +1,5 @@ -redis_actor.rs - source
1
+redis_actor.rs - source
1
 2
 3
 4
@@ -369,7 +369,7 @@
 /// Redis. Use [`RedisSessionStore`] if you need TLS support.
 ///
 /// [`RedisSessionStore`]: crate::storage::RedisSessionStore
-#[cfg_attr(docsrs, doc(cfg(feature = "redis-actor-session")))]
+#[cfg_attr(docsrs, doc(cfg(feature = "redis-actor-session")))]
 pub struct RedisActorSessionStore {
     configuration: CacheConfiguration,
     addr: Addr<RedisActor>,
@@ -409,7 +409,7 @@
 
 /// A fluent builder to construct a [`RedisActorSessionStore`] instance with custom configuration
 /// parameters.
-#[cfg_attr(docsrs, doc(cfg(feature = "redis-actor-session")))]
+#[cfg_attr(docsrs, doc(cfg(feature = "redis-actor-session")))]
 #[must_use]
 pub struct RedisActorSessionStoreBuilder {
     connection_string: String,
@@ -427,7 +427,7 @@
     }
 
     /// Finalise the builder and return a [`RedisActorSessionStore`] instance.
-    #[must_use]
+    #[must_use]
     pub fn build(self) -> RedisActorSessionStore {
         RedisActorSessionStore {
             configuration: self.configuration,
@@ -436,7 +436,7 @@
     }
 }
 
-#[async_trait::async_trait(?Send)]
+#[async_trait::async_trait(?Send)]
 impl SessionStore for RedisActorSessionStore {
     async fn load(&self, session_key: &SessionKey) -> Result<Option<SessionState>, LoadError> {
         let cache_key = (self.configuration.cache_keygen)(session_key.as_ref());
@@ -592,7 +592,7 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use std::collections::HashMap;
 
@@ -605,19 +605,19 @@
         RedisActorSessionStore::new("127.0.0.1:6379")
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_session_workflow() {
         acceptance_test_suite(redis_actor_store, true).await;
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn loading_a_missing_session_returns_none() {
         let store = redis_actor_store();
         let session_key = generate_session_key();
         assert!(store.load(&session_key).await.unwrap().is_none());
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn updating_of_an_expired_state_is_handled_gracefully() {
         let store = redis_actor_store();
         let session_key = generate_session_key();
@@ -630,4 +630,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/storage/redis_rs.rs.html b/src/actix_session/storage/redis_rs.rs.html index a766c3877..555141a17 100644 --- a/src/actix_session/storage/redis_rs.rs.html +++ b/src/actix_session/storage/redis_rs.rs.html @@ -1,5 +1,5 @@ -redis_rs.rs - source
1
+redis_rs.rs - source
1
 2
 3
 4
@@ -408,14 +408,14 @@
 /// `RedisSessionStore` leverages [`redis-rs`] as Redis client.
 ///
 /// [`redis-rs`]: https://github.com/mitsuhiko/redis-rs
-#[cfg_attr(docsrs, doc(cfg(feature = "redis-rs-session")))]
+#[cfg_attr(docsrs, doc(cfg(feature = "redis-rs-session")))]
 #[derive(Clone)]
 pub struct RedisSessionStore {
     configuration: CacheConfiguration,
     client: ConnectionManager,
 }
 
-#[derive(Clone)]
+#[derive(Clone)]
 struct CacheConfiguration {
     cache_keygen: Arc<dyn Fn(&str) -> String + Send + Sync>,
 }
@@ -453,7 +453,7 @@
 /// parameters.
 ///
 /// [`RedisSessionStore`]: crate::storage::RedisSessionStore
-#[cfg_attr(docsrs, doc(cfg(feature = "redis-rs-session")))]
+#[cfg_attr(docsrs, doc(cfg(feature = "redis-rs-session")))]
 #[must_use]
 pub struct RedisSessionStoreBuilder {
     connection_string: String,
@@ -482,7 +482,7 @@
     }
 }
 
-#[async_trait::async_trait(?Send)]
+#[async_trait::async_trait(?Send)]
 impl SessionStore for RedisSessionStore {
     async fn load(&self, session_key: &SessionKey) -> Result<Option<SessionState>, LoadError> {
         let cache_key = (self.configuration.cache_keygen)(session_key.as_ref());
@@ -636,7 +636,7 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use std::collections::HashMap;
 
@@ -652,20 +652,20 @@
             .unwrap()
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_session_workflow() {
         let redis_store = redis_store().await;
         acceptance_test_suite(move || redis_store.clone(), true).await;
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn loading_a_missing_session_returns_none() {
         let store = redis_store().await;
         let session_key = generate_session_key();
         assert!(store.load(&session_key).await.unwrap().is_none());
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn loading_an_invalid_session_state_returns_deserialization_error() {
         let store = redis_store().await;
         let session_key = generate_session_key();
@@ -681,7 +681,7 @@
         ));
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn updating_of_an_expired_state_is_handled_gracefully() {
         let store = redis_store().await;
         let session_key = generate_session_key();
@@ -694,4 +694,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/storage/session_key.rs.html b/src/actix_session/storage/session_key.rs.html index fd5a85b3c..f9ff17d65 100644 --- a/src/actix_session/storage/session_key.rs.html +++ b/src/actix_session/storage/session_key.rs.html @@ -1,5 +1,5 @@ -session_key.rs - source
1
+session_key.rs - source
1
 2
 3
 4
@@ -76,7 +76,7 @@
 /// let session_key: Result<SessionKey, _> = key.try_into();
 /// assert!(session_key.is_err());
 /// ```
-#[derive(Debug, PartialEq, Eq)]
+#[derive(Debug, PartialEq, Eq)]
 pub struct SessionKey(String);
 
 impl TryFrom<String> for SessionKey {
@@ -106,7 +106,7 @@
     }
 }
 
-#[derive(Debug, Display, From)]
+#[derive(Debug, Display, From)]
 #[display(fmt = "The provided string is not a valid session key")]
 pub struct InvalidSessionKeyError(anyhow::Error);
 
@@ -116,4 +116,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_session/storage/utils.rs.html b/src/actix_session/storage/utils.rs.html index fc668c00a..0a502ee56 100644 --- a/src/actix_session/storage/utils.rs.html +++ b/src/actix_session/storage/utils.rs.html @@ -1,5 +1,5 @@ -utils.rs - source
1
+utils.rs - source
1
 2
 3
 4
@@ -38,4 +38,4 @@
     String::from_utf8(value).unwrap().try_into().unwrap()
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/error.rs.html b/src/actix_settings/error.rs.html index f70f4bb44..fef395727 100644 --- a/src/actix_settings/error.rs.html +++ b/src/actix_settings/error.rs.html @@ -1,5 +1,5 @@ -error.rs - source
1
+error.rs - source
1
 2
 3
 4
@@ -142,7 +142,7 @@
 use toml::de::Error as TomlError;
 
 /// Errors that can be returned from methods in this crate.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub enum Error {
     /// Environment variable does not exists or is invalid.
     EnvVarError(VarError),
@@ -151,7 +151,7 @@
     FileExists(PathBuf),
 
     /// Invalid value.
-    #[allow(missing_docs)]
+    #[allow(missing_docs)]
     InvalidValue {
         expected: &'static str,
         got: String,
@@ -276,4 +276,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/lib.rs.html b/src/actix_settings/lib.rs.html index 88226f0cc..f0d5ad0c7 100644 --- a/src/actix_settings/lib.rs.html +++ b/src/actix_settings/lib.rs.html @@ -1,5 +1,5 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -872,7 +872,7 @@
 //! }
 //! ```
 
-#![forbid(unsafe_code)]
+#![forbid(unsafe_code)]
 #![deny(rust_2018_idioms, nonstandard_style)]
 #![warn(future_incompatible, missing_docs, missing_debug_implementations)]
 #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
@@ -896,7 +896,7 @@
 };
 use serde::{de, Deserialize};
 
-#[macro_use]
+#[macro_use]
 mod error;
 mod parse;
 mod settings;
@@ -914,7 +914,7 @@
 type AsResult<T> = std::result::Result<T, Error>;
 
 /// Wrapper for server and application-specific settings.
-#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
 #[serde(bound = "A: Deserialize<'de>")]
 pub struct BasicSettings<A> {
     /// Actix Web server settings.
@@ -928,7 +928,7 @@
 pub type Settings = BasicSettings<NoSettings>;
 
 /// Marker type representing no defined application-specific settings.
-#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
 #[non_exhaustive]
 pub struct NoSettings {/* NOTE: turning this into a unit struct will cause deserialization failures. */}
 
@@ -1057,7 +1057,7 @@
     /// Apply a [`BasicSettings`] value to `self`.
     ///
     /// [`BasicSettings`]: ./struct.BasicSettings.html
-    #[must_use]
+    #[must_use]
     fn apply_settings<A>(self, settings: &BasicSettings<A>) -> Self
     where
         A: de::DeserializeOwned;
@@ -1144,19 +1144,19 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use actix_web::App;
 
     use super::*;
 
-    #[test]
+    #[test]
     fn apply_settings() {
         let settings = Settings::parse_toml("Server.toml").unwrap();
         let _ = HttpServer::new(App::new).apply_settings(&settings);
     }
 
-    #[test]
+    #[test]
     fn override_field_hosts() {
         let mut settings = Settings::from_default_template().unwrap();
 
@@ -1192,7 +1192,7 @@
         );
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_hosts() {
         let mut settings = Settings::from_default_template().unwrap();
 
@@ -1230,7 +1230,7 @@
         );
     }
 
-    #[test]
+    #[test]
     fn override_field_mode() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.mode, Mode::Development);
@@ -1238,7 +1238,7 @@
         assert_eq!(settings.actix.mode, Mode::Production);
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_mode() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.mode, Mode::Development);
@@ -1247,7 +1247,7 @@
         assert_eq!(settings.actix.mode, Mode::Production);
     }
 
-    #[test]
+    #[test]
     fn override_field_enable_compression() {
         let mut settings = Settings::from_default_template().unwrap();
         assert!(settings.actix.enable_compression);
@@ -1255,7 +1255,7 @@
         assert!(!settings.actix.enable_compression);
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_enable_compression() {
         let mut settings = Settings::from_default_template().unwrap();
         assert!(settings.actix.enable_compression);
@@ -1268,7 +1268,7 @@
         assert!(!settings.actix.enable_compression);
     }
 
-    #[test]
+    #[test]
     fn override_field_enable_log() {
         let mut settings = Settings::from_default_template().unwrap();
         assert!(settings.actix.enable_log);
@@ -1276,7 +1276,7 @@
         assert!(!settings.actix.enable_log);
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_enable_log() {
         let mut settings = Settings::from_default_template().unwrap();
         assert!(settings.actix.enable_log);
@@ -1289,7 +1289,7 @@
         assert!(!settings.actix.enable_log);
     }
 
-    #[test]
+    #[test]
     fn override_field_num_workers() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.num_workers, NumWorkers::Default);
@@ -1297,7 +1297,7 @@
         assert_eq!(settings.actix.num_workers, NumWorkers::Manual(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_num_workers() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.num_workers, NumWorkers::Default);
@@ -1310,7 +1310,7 @@
         assert_eq!(settings.actix.num_workers, NumWorkers::Manual(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_backlog() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.backlog, Backlog::Default);
@@ -1318,7 +1318,7 @@
         assert_eq!(settings.actix.backlog, Backlog::Manual(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_backlog() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.backlog, Backlog::Default);
@@ -1328,7 +1328,7 @@
         assert_eq!(settings.actix.backlog, Backlog::Manual(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_max_connections() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.max_connections, MaxConnections::Default);
@@ -1336,7 +1336,7 @@
         assert_eq!(settings.actix.max_connections, MaxConnections::Manual(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_max_connections() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.max_connections, MaxConnections::Default);
@@ -1349,7 +1349,7 @@
         assert_eq!(settings.actix.max_connections, MaxConnections::Manual(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_max_connection_rate() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(
@@ -1363,7 +1363,7 @@
         );
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_max_connection_rate() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(
@@ -1382,7 +1382,7 @@
         );
     }
 
-    #[test]
+    #[test]
     fn override_field_keep_alive() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.keep_alive, KeepAlive::Default);
@@ -1390,7 +1390,7 @@
         assert_eq!(settings.actix.keep_alive, KeepAlive::Seconds(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_keep_alive() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.keep_alive, KeepAlive::Default);
@@ -1403,7 +1403,7 @@
         assert_eq!(settings.actix.keep_alive, KeepAlive::Seconds(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_client_timeout() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.client_timeout, Timeout::Default);
@@ -1411,7 +1411,7 @@
         assert_eq!(settings.actix.client_timeout, Timeout::Seconds(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_client_timeout() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.client_timeout, Timeout::Default);
@@ -1424,7 +1424,7 @@
         assert_eq!(settings.actix.client_timeout, Timeout::Seconds(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_client_shutdown() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.client_shutdown, Timeout::Default);
@@ -1432,7 +1432,7 @@
         assert_eq!(settings.actix.client_shutdown, Timeout::Seconds(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_client_shutdown() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.client_shutdown, Timeout::Default);
@@ -1445,7 +1445,7 @@
         assert_eq!(settings.actix.client_shutdown, Timeout::Seconds(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_shutdown_timeout() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.shutdown_timeout, Timeout::Default);
@@ -1453,7 +1453,7 @@
         assert_eq!(settings.actix.shutdown_timeout, Timeout::Seconds(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_shutdown_timeout() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(settings.actix.shutdown_timeout, Timeout::Default);
@@ -1466,7 +1466,7 @@
         assert_eq!(settings.actix.shutdown_timeout, Timeout::Seconds(42));
     }
 
-    #[test]
+    #[test]
     fn override_field_tls_enabled() {
         let mut settings = Settings::from_default_template().unwrap();
         assert!(!settings.actix.tls.enabled);
@@ -1474,7 +1474,7 @@
         assert!(settings.actix.tls.enabled);
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_tls_enabled() {
         let mut settings = Settings::from_default_template().unwrap();
         assert!(!settings.actix.tls.enabled);
@@ -1487,7 +1487,7 @@
         assert!(settings.actix.tls.enabled);
     }
 
-    #[test]
+    #[test]
     fn override_field_tls_certificate() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(
@@ -1505,7 +1505,7 @@
         );
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_tls_certificate() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(
@@ -1527,7 +1527,7 @@
         );
     }
 
-    #[test]
+    #[test]
     fn override_field_tls_private_key() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(
@@ -1545,7 +1545,7 @@
         );
     }
 
-    #[test]
+    #[test]
     fn override_field_with_env_var_tls_private_key() {
         let mut settings = Settings::from_default_template().unwrap();
         assert_eq!(
@@ -1567,15 +1567,15 @@
         );
     }
 
-    #[test]
+    #[test]
     fn override_extended_field_with_custom_type() {
-        #[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
+        #[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
         struct NestedSetting {
             foo: String,
             bar: bool,
         }
 
-        #[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
+        #[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
         #[serde(rename_all = "kebab-case")]
         struct AppSettings {
             example_name: String,
@@ -1622,4 +1622,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/parse.rs.html b/src/actix_settings/parse.rs.html index 106b5fc21..073c5a2fb 100644 --- a/src/actix_settings/parse.rs.html +++ b/src/actix_settings/parse.rs.html @@ -1,5 +1,5 @@ -parse.rs - source
1
+parse.rs - source
1
 2
 3
 4
@@ -80,4 +80,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/settings/address.rs.html b/src/actix_settings/settings/address.rs.html index 4d48bd851..7f1a1ec43 100644 --- a/src/actix_settings/settings/address.rs.html +++ b/src/actix_settings/settings/address.rs.html @@ -1,5 +1,5 @@ -address.rs - source
1
+address.rs - source
1
 2
 3
 4
@@ -132,7 +132,7 @@
 });
 
 /// A host/port pair for the server to bind to.
-#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
 pub struct Address {
     /// Host part of address.
     pub host: String,
@@ -186,4 +186,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/settings/backlog.rs.html b/src/actix_settings/settings/backlog.rs.html index 0f47ebb31..ce31fc8d4 100644 --- a/src/actix_settings/settings/backlog.rs.html +++ b/src/actix_settings/settings/backlog.rs.html @@ -1,5 +1,5 @@ -backlog.rs - source
1
+backlog.rs - source
1
 2
 3
 4
@@ -83,7 +83,7 @@
 ///
 /// Generally set in the 64–2048 range. The default value is 2048. Takes a string value: Either
 /// "default", or an integer N > 0 e.g. "6".
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum Backlog {
     /// The default number of connections. See struct docs.
     Default,
@@ -140,4 +140,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/settings/keep_alive.rs.html b/src/actix_settings/settings/keep_alive.rs.html index a5f0d8dec..b210bfb0b 100644 --- a/src/actix_settings/settings/keep_alive.rs.html +++ b/src/actix_settings/settings/keep_alive.rs.html @@ -1,5 +1,5 @@ -keep_alive.rs - source
1
+keep_alive.rs - source
1
 2
 3
 4
@@ -106,7 +106,7 @@
 ///
 /// By default keep alive is set to 5 seconds. Takes a string value: Either "default", "disabled",
 /// "os", or a string of the format "N seconds" where N is an integer > 0 e.g. "6 seconds".
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum KeepAlive {
     /// The default keep-alive as defined by Actix Web.
     Default,
@@ -190,4 +190,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/settings/max_connection_rate.rs.html b/src/actix_settings/settings/max_connection_rate.rs.html index 6b7e8cf8b..9c6a4ee82 100644 --- a/src/actix_settings/settings/max_connection_rate.rs.html +++ b/src/actix_settings/settings/max_connection_rate.rs.html @@ -1,5 +1,5 @@ -max_connection_rate.rs - source
1
+max_connection_rate.rs - source
1
 2
 3
 4
@@ -77,7 +77,7 @@
 /// All listeners will stop accepting connections when this limit is reached. It can be used to
 /// limit the global TLS CPU usage. By default max connections is set to a 256. Takes a string
 /// value: Either "default", or an integer N > 0 e.g. "6".
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum MaxConnectionRate {
     /// The default connection limit. See struct docs.
     Default,
@@ -134,4 +134,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/settings/max_connections.rs.html b/src/actix_settings/settings/max_connections.rs.html index 6dd57aaef..63d8c4dda 100644 --- a/src/actix_settings/settings/max_connections.rs.html +++ b/src/actix_settings/settings/max_connections.rs.html @@ -1,5 +1,5 @@ -max_connections.rs - source
1
+max_connections.rs - source
1
 2
 3
 4
@@ -77,7 +77,7 @@
 /// All socket listeners will stop accepting connections when this limit is reached for each worker.
 /// By default max connections is set to a 25k. Takes a string value: Either "default", or an
 /// integer N > 0 e.g. "6".
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum MaxConnections {
     /// The default number of connections. See struct docs.
     Default,
@@ -134,4 +134,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/settings/mod.rs.html b/src/actix_settings/settings/mod.rs.html index 0aa4953e8..b577810ed 100644 --- a/src/actix_settings/settings/mod.rs.html +++ b/src/actix_settings/settings/mod.rs.html @@ -1,5 +1,5 @@ -mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
@@ -79,7 +79,7 @@
 };
 
 /// Settings types for Actix Web.
-#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
 #[serde(rename_all = "kebab-case")]
 pub struct ActixSettings {
     /// List of addresses for the server to bind to.
@@ -122,4 +122,4 @@
     pub tls: Tls,
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/settings/mode.rs.html b/src/actix_settings/settings/mode.rs.html index f1119efe9..b5383d632 100644 --- a/src/actix_settings/settings/mode.rs.html +++ b/src/actix_settings/settings/mode.rs.html @@ -1,5 +1,5 @@ -mode.rs - source
1
+mode.rs - source
1
 2
 3
 4
@@ -31,7 +31,7 @@
 use crate::{AsResult, Parse};
 
 /// Marker of intended deployment environment.
-#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
 #[serde(rename_all = "lowercase")]
 pub enum Mode {
     /// Marks development environment.
@@ -54,4 +54,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/settings/num_workers.rs.html b/src/actix_settings/settings/num_workers.rs.html index aceb53725..9ea5f5e47 100644 --- a/src/actix_settings/settings/num_workers.rs.html +++ b/src/actix_settings/settings/num_workers.rs.html @@ -1,5 +1,5 @@ -num_workers.rs - source
1
+num_workers.rs - source
1
 2
 3
 4
@@ -75,7 +75,7 @@
 ///
 /// By default the number of available logical cpu cores is used. Takes a string value: Either
 /// "default", or an integer N > 0 e.g. "6".
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum NumWorkers {
     /// The default number of workers. See struct docs.
     Default,
@@ -132,4 +132,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/settings/timeout.rs.html b/src/actix_settings/settings/timeout.rs.html index 80d83ca2a..0a2c38d6e 100644 --- a/src/actix_settings/settings/timeout.rs.html +++ b/src/actix_settings/settings/timeout.rs.html @@ -1,5 +1,5 @@ -timeout.rs - source
1
+timeout.rs - source
1
 2
 3
 4
@@ -106,7 +106,7 @@
 use crate::{AsResult, Error, Parse};
 
 /// A timeout duration in milliseconds or seconds.
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum Timeout {
     /// The default timeout. Depends on context.
     Default,
@@ -196,4 +196,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_settings/settings/tls.rs.html b/src/actix_settings/settings/tls.rs.html index 54cb093fe..b23d47871 100644 --- a/src/actix_settings/settings/tls.rs.html +++ b/src/actix_settings/settings/tls.rs.html @@ -1,5 +1,5 @@ -tls.rs - source
1
+tls.rs - source
1
 2
 3
 4
@@ -22,7 +22,7 @@
 use serde::Deserialize;
 
 /// TLS (HTTPS) configuration.
-#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
 #[serde(rename_all = "kebab-case")]
 #[doc(alias = "ssl", alias = "https")]
 pub struct Tls {
@@ -36,4 +36,4 @@
     pub private_key: PathBuf,
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/extractors/basic.rs.html b/src/actix_web_httpauth/extractors/basic.rs.html index b87561ba2..4416054ac 100644 --- a/src/actix_web_httpauth/extractors/basic.rs.html +++ b/src/actix_web_httpauth/extractors/basic.rs.html @@ -1,4 +1,4 @@ -basic.rs - source
1
+basic.rs - source
1
 2
 3
 4
@@ -126,7 +126,7 @@
 /// [`BasicAuth`] extractor configuration used for [`WWW-Authenticate`] header later.
 ///
 /// [`WWW-Authenticate`]: crate::headers::www_authenticate::WwwAuthenticate
-#[derive(Debug, Clone, Default)]
+#[derive(Debug, Clone, Default)]
 pub struct Config(Challenge);
 
 impl Config {
@@ -186,7 +186,7 @@
 /// ```
 ///
 /// [app data]: https://docs.rs/actix-web/4/actix_web/struct.App.html#method.app_data
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub struct BasicAuth(Basic);
 
 impl BasicAuth {
@@ -223,4 +223,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/extractors/bearer.rs.html b/src/actix_web_httpauth/extractors/bearer.rs.html index eb1498e48..1dcb0b320 100644 --- a/src/actix_web_httpauth/extractors/bearer.rs.html +++ b/src/actix_web_httpauth/extractors/bearer.rs.html @@ -1,4 +1,4 @@ -bearer.rs - source
1
+bearer.rs - source
1
 2
 3
 4
@@ -154,7 +154,7 @@
 use crate::headers::{authorization, www_authenticate::bearer};
 
 /// [`BearerAuth`] extractor configuration.
-#[derive(Debug, Clone, Default)]
+#[derive(Debug, Clone, Default)]
 pub struct Config(bearer::Bearer);
 
 impl Config {
@@ -224,7 +224,7 @@
 ///     )
 ///     .service(web::resource("/index.html").route(web::get().to(index)));
 /// ```
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub struct BearerAuth(authorization::Bearer);
 
 impl BearerAuth {
@@ -287,4 +287,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/extractors/config.rs.html b/src/actix_web_httpauth/extractors/config.rs.html index 40a23955b..88ce21b1d 100644 --- a/src/actix_web_httpauth/extractors/config.rs.html +++ b/src/actix_web_httpauth/extractors/config.rs.html @@ -1,4 +1,4 @@ -config.rs - source
1
+config.rs - source
1
 2
 3
 4
@@ -41,4 +41,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/extractors/errors.rs.html b/src/actix_web_httpauth/extractors/errors.rs.html index 63a96afcf..3cfe02075 100644 --- a/src/actix_web_httpauth/extractors/errors.rs.html +++ b/src/actix_web_httpauth/extractors/errors.rs.html @@ -1,4 +1,4 @@ -errors.rs - source
1
+errors.rs - source
1
 2
 3
 4
@@ -87,7 +87,7 @@
 ///
 /// Different extractors may extend `AuthenticationError` implementation in order to provide access
 /// inner challenge fields.
-#[derive(Debug)]
+#[derive(Debug)]
 pub struct AuthenticationError<C: Challenge> {
     challenge: C,
     status_code: StatusCode,
@@ -138,14 +138,14 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use actix_web::Error;
 
     use super::*;
     use crate::headers::www_authenticate::basic::Basic;
 
-    #[test]
+    #[test]
     fn test_status_code_is_preserved_across_error_conversions() {
         let ae = AuthenticationError::new(Basic::default());
         let expected = ae.status_code;
@@ -157,4 +157,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/extractors/mod.rs.html b/src/actix_web_httpauth/extractors/mod.rs.html index b4c3299c7..cd4b99ffa 100644 --- a/src/actix_web_httpauth/extractors/mod.rs.html +++ b/src/actix_web_httpauth/extractors/mod.rs.html @@ -1,4 +1,4 @@ -mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
@@ -15,4 +15,4 @@
 
 pub use self::{config::AuthExtractorConfig, errors::AuthenticationError};
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/authorization/errors.rs.html b/src/actix_web_httpauth/headers/authorization/errors.rs.html index 85aa58752..23b9f945b 100644 --- a/src/actix_web_httpauth/headers/authorization/errors.rs.html +++ b/src/actix_web_httpauth/headers/authorization/errors.rs.html @@ -1,4 +1,4 @@ -errors.rs - source
1
+errors.rs - source
1
 2
 3
 4
@@ -78,7 +78,7 @@
 ///
 /// Should not be used directly unless you are implementing your own
 /// [authentication scheme](super::Scheme).
-#[derive(Debug)]
+#[derive(Debug)]
 pub enum ParseError {
     /// Header value is malformed.
     Invalid,
@@ -143,4 +143,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/authorization/header.rs.html b/src/actix_web_httpauth/headers/authorization/header.rs.html index 7d825b9ad..f30293b77 100644 --- a/src/actix_web_httpauth/headers/authorization/header.rs.html +++ b/src/actix_web_httpauth/headers/authorization/header.rs.html @@ -1,4 +1,4 @@ -header.rs - source
1
+header.rs - source
1
 2
 3
 4
@@ -111,7 +111,7 @@
 ///     Ok(format!("Hello, {}!", auth.as_ref().user_id()))
 /// }
 /// ```
-#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
 pub struct Authorization<S: Scheme>(S);
 
 impl<S: Scheme> Authorization<S> {
@@ -146,7 +146,7 @@
 }
 
 impl<S: Scheme> Header for Authorization<S> {
-    #[inline]
+    #[inline]
     fn name() -> HeaderName {
         AUTHORIZATION
     }
@@ -167,4 +167,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/authorization/mod.rs.html b/src/actix_web_httpauth/headers/authorization/mod.rs.html index 1e1a4cefe..0baa11ec9 100644 --- a/src/actix_web_httpauth/headers/authorization/mod.rs.html +++ b/src/actix_web_httpauth/headers/authorization/mod.rs.html @@ -1,4 +1,4 @@ -mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
@@ -21,4 +21,4 @@
     scheme::{basic::Basic, bearer::Bearer, Scheme},
 };
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/authorization/scheme/basic.rs.html b/src/actix_web_httpauth/headers/authorization/scheme/basic.rs.html index 1cc4e1bfe..80423a40c 100644 --- a/src/actix_web_httpauth/headers/authorization/scheme/basic.rs.html +++ b/src/actix_web_httpauth/headers/authorization/scheme/basic.rs.html @@ -1,4 +1,4 @@ -basic.rs - source
1
+basic.rs - source
1
 2
 3
 4
@@ -203,7 +203,7 @@
 use crate::headers::authorization::{errors::ParseError, Scheme};
 
 /// Credentials for `Basic` authentication scheme, defined in [RFC 7617](https://tools.ietf.org/html/rfc7617)
-#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
+#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
 pub struct Basic {
     user_id: Cow<'static, str>,
     password: Option<Cow<'static, str>>,
@@ -315,11 +315,11 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use super::*;
 
-    #[test]
+    #[test]
     fn test_parse_header() {
         let value = HeaderValue::from_static("Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==");
         let scheme = Basic::parse(&value);
@@ -330,7 +330,7 @@
         assert_eq!(scheme.password, Some("open sesame".into()));
     }
 
-    #[test]
+    #[test]
     fn test_empty_password() {
         let value = HeaderValue::from_static("Basic QWxhZGRpbjo=");
         let scheme = Basic::parse(&value);
@@ -341,7 +341,7 @@
         assert_eq!(scheme.password, None);
     }
 
-    #[test]
+    #[test]
     fn test_empty_header() {
         let value = HeaderValue::from_static("");
         let scheme = Basic::parse(&value);
@@ -349,7 +349,7 @@
         assert!(scheme.is_err());
     }
 
-    #[test]
+    #[test]
     fn test_wrong_scheme() {
         let value = HeaderValue::from_static("THOUSHALLNOTPASS please?");
         let scheme = Basic::parse(&value);
@@ -357,7 +357,7 @@
         assert!(scheme.is_err());
     }
 
-    #[test]
+    #[test]
     fn test_missing_credentials() {
         let value = HeaderValue::from_static("Basic ");
         let scheme = Basic::parse(&value);
@@ -365,7 +365,7 @@
         assert!(scheme.is_err());
     }
 
-    #[test]
+    #[test]
     fn test_missing_credentials_colon() {
         let value = HeaderValue::from_static("Basic QWxsYWRpbg==");
         let scheme = Basic::parse(&value);
@@ -373,7 +373,7 @@
         assert!(scheme.is_err());
     }
 
-    #[test]
+    #[test]
     fn test_into_header_value() {
         let basic = Basic {
             user_id: "Aladdin".into(),
@@ -389,4 +389,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/authorization/scheme/bearer.rs.html b/src/actix_web_httpauth/headers/authorization/scheme/bearer.rs.html index 6741c21d8..983af95fd 100644 --- a/src/actix_web_httpauth/headers/authorization/scheme/bearer.rs.html +++ b/src/actix_web_httpauth/headers/authorization/scheme/bearer.rs.html @@ -1,4 +1,4 @@ -bearer.rs - source
1
+bearer.rs - source
1
 2
 3
 4
@@ -150,7 +150,7 @@
 /// Should be used in combination with [`Authorization`](super::Authorization) header.
 ///
 /// [RFC 6750]: https://tools.ietf.org/html/rfc6750
-#[derive(Clone, Eq, Ord, PartialEq, PartialOrd)]
+#[derive(Clone, Eq, Ord, PartialEq, PartialOrd)]
 pub struct Bearer {
     token: Cow<'static, str>,
 }
@@ -224,11 +224,11 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use super::*;
 
-    #[test]
+    #[test]
     fn test_parse_header() {
         let value = HeaderValue::from_static("Bearer mF_9.B5f-4.1JqM");
         let scheme = Bearer::parse(&value);
@@ -238,7 +238,7 @@
         assert_eq!(scheme.token, "mF_9.B5f-4.1JqM");
     }
 
-    #[test]
+    #[test]
     fn test_empty_header() {
         let value = HeaderValue::from_static("");
         let scheme = Bearer::parse(&value);
@@ -246,7 +246,7 @@
         assert!(scheme.is_err());
     }
 
-    #[test]
+    #[test]
     fn test_wrong_scheme() {
         let value = HeaderValue::from_static("OAuthToken foo");
         let scheme = Bearer::parse(&value);
@@ -254,7 +254,7 @@
         assert!(scheme.is_err());
     }
 
-    #[test]
+    #[test]
     fn test_missing_token() {
         let value = HeaderValue::from_static("Bearer ");
         let scheme = Bearer::parse(&value);
@@ -262,7 +262,7 @@
         assert!(scheme.is_err());
     }
 
-    #[test]
+    #[test]
     fn test_into_header_value() {
         let bearer = Bearer::new("mF_9.B5f-4.1JqM");
 
@@ -275,4 +275,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/authorization/scheme/mod.rs.html b/src/actix_web_httpauth/headers/authorization/scheme/mod.rs.html index 553d2c446..ff2f6a6ad 100644 --- a/src/actix_web_httpauth/headers/authorization/scheme/mod.rs.html +++ b/src/actix_web_httpauth/headers/authorization/scheme/mod.rs.html @@ -1,4 +1,4 @@ -mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
@@ -27,4 +27,4 @@
     fn parse(header: &HeaderValue) -> Result<Self, ParseError>;
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/mod.rs.html b/src/actix_web_httpauth/headers/mod.rs.html index 25503facb..3387324f0 100644 --- a/src/actix_web_httpauth/headers/mod.rs.html +++ b/src/actix_web_httpauth/headers/mod.rs.html @@ -1,4 +1,4 @@ -mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
@@ -7,4 +7,4 @@
 pub mod authorization;
 pub mod www_authenticate;
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/www_authenticate/challenge/basic.rs.html b/src/actix_web_httpauth/headers/www_authenticate/challenge/basic.rs.html index de062a85f..f78eb26c4 100644 --- a/src/actix_web_httpauth/headers/www_authenticate/challenge/basic.rs.html +++ b/src/actix_web_httpauth/headers/www_authenticate/challenge/basic.rs.html @@ -1,4 +1,4 @@ -basic.rs - source
1
+basic.rs - source
1
 2
 3
 4
@@ -165,7 +165,7 @@
 /// ```
 ///
 /// [`WWW-Authenticate`]: ../struct.WwwAuthenticate.html
-#[derive(Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Default, Clone)]
+#[derive(Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Default, Clone)]
 pub struct Basic {
     // "realm" parameter is optional now: https://tools.ietf.org/html/rfc7235#appendix-A
     pub(crate) realm: Option<Cow<'static, str>>,
@@ -207,7 +207,7 @@
     }
 }
 
-#[doc(hidden)]
+#[doc(hidden)]
 impl Challenge for Basic {
     fn to_bytes(&self) -> Bytes {
         // 5 is for `"Basic"`, 9 is for `"realm=\"\""`
@@ -244,11 +244,11 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use super::*;
 
-    #[test]
+    #[test]
     fn test_plain_into_header_value() {
         let challenge = Basic { realm: None };
 
@@ -258,7 +258,7 @@
         assert_eq!(value, "Basic");
     }
 
-    #[test]
+    #[test]
     fn test_with_realm_into_header_value() {
         let challenge = Basic {
             realm: Some("Restricted area".into()),
@@ -271,4 +271,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/builder.rs.html b/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/builder.rs.html index 71c894413..15f1c7443 100644 --- a/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/builder.rs.html +++ b/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/builder.rs.html @@ -1,4 +1,4 @@ -builder.rs - source
1
+builder.rs - source
1
 2
 3
 4
@@ -77,7 +77,7 @@
 ///
 /// It is up to implementor to fill all required fields, neither this `Builder` nor [`Bearer`]
 /// provide any validation.
-#[derive(Debug, Default)]
+#[derive(Debug, Default)]
 pub struct BearerBuilder(Bearer);
 
 impl BearerBuilder {
@@ -141,4 +141,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/challenge.rs.html b/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/challenge.rs.html index 5a6a656e2..21f195134 100644 --- a/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/challenge.rs.html +++ b/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/challenge.rs.html @@ -1,4 +1,4 @@ -challenge.rs - source
1
+challenge.rs - source
1
 2
 3
 4
@@ -176,7 +176,7 @@
 ///
 /// [`WWW-Authenticate`]: crate::headers::www_authenticate::WwwAuthenticate
 /// [RFC 6750]: https://tools.ietf.org/html/rfc6750#section-3
-#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
 pub struct Bearer {
     pub(crate) scope: Option<Cow<'static, str>>,
     pub(crate) realm: Option<Cow<'static, str>>,
@@ -201,7 +201,7 @@
     }
 }
 
-#[doc(hidden)]
+#[doc(hidden)]
 impl Challenge for Bearer {
     fn to_bytes(&self) -> Bytes {
         let desc_uri_required = self
@@ -281,4 +281,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/errors.rs.html b/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/errors.rs.html index ad50f1384..e8ba0e314 100644 --- a/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/errors.rs.html +++ b/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/errors.rs.html @@ -1,4 +1,4 @@ -errors.rs - source
1
+errors.rs - source
1
 2
 3
 4
@@ -55,7 +55,7 @@
 /// Bearer authorization error types, described in [RFC 6750].
 ///
 /// [RFC 6750]: https://tools.ietf.org/html/rfc6750#section-3.1
-#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
 pub enum Error {
     /// The request is missing a required parameter, includes an unsupported parameter or parameter
     /// value, repeats the same parameter, uses more than one method for including an access token,
@@ -73,7 +73,7 @@
     /// Returns [HTTP status code] suitable for current error type.
     ///
     /// [HTTP status code]: `actix_web::http::StatusCode`
-    #[allow(clippy::trivially_copy_pass_by_ref)]
+    #[allow(clippy::trivially_copy_pass_by_ref)]
     pub fn status_code(&self) -> StatusCode {
         match self {
             Error::InvalidRequest => StatusCode::BAD_REQUEST,
@@ -82,7 +82,7 @@
         }
     }
 
-    #[doc(hidden)]
+    #[doc(hidden)]
     #[allow(clippy::trivially_copy_pass_by_ref)]
     pub fn as_str(&self) -> &str {
         match self {
@@ -99,4 +99,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/mod.rs.html b/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/mod.rs.html index 39e437f39..da4c1ade7 100644 --- a/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/mod.rs.html +++ b/src/actix_web_httpauth/headers/www_authenticate/challenge/bearer/mod.rs.html @@ -1,4 +1,4 @@ -mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
@@ -31,11 +31,11 @@
 
 pub use self::{builder::BearerBuilder, challenge::Bearer, errors::Error};
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use super::*;
 
-    #[test]
+    #[test]
     fn to_bytes() {
         let b = Bearer::build()
             .error(Error::InvalidToken)
@@ -49,4 +49,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/www_authenticate/challenge/mod.rs.html b/src/actix_web_httpauth/headers/www_authenticate/challenge/mod.rs.html index 5f8472fe1..682d3c834 100644 --- a/src/actix_web_httpauth/headers/www_authenticate/challenge/mod.rs.html +++ b/src/actix_web_httpauth/headers/www_authenticate/challenge/mod.rs.html @@ -1,4 +1,4 @@ -mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
@@ -23,4 +23,4 @@
     fn to_bytes(&self) -> Bytes;
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/www_authenticate/header.rs.html b/src/actix_web_httpauth/headers/www_authenticate/header.rs.html index f6172ae60..d6354ed7f 100644 --- a/src/actix_web_httpauth/headers/www_authenticate/header.rs.html +++ b/src/actix_web_httpauth/headers/www_authenticate/header.rs.html @@ -1,4 +1,4 @@ -header.rs - source
1
+header.rs - source
1
 2
 3
 4
@@ -47,11 +47,11 @@
 /// [`Bearer`](super::bearer::Bearer) challenges for details.
 ///
 /// [RFC 7235]: https://tools.ietf.org/html/rfc7235#section-4.1
-#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
 pub struct WwwAuthenticate<C: Challenge>(pub C);
 
 impl<C: Challenge> Header for WwwAuthenticate<C> {
-    #[inline]
+    #[inline]
     fn name() -> HeaderName {
         WWW_AUTHENTICATE
     }
@@ -69,4 +69,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/headers/www_authenticate/mod.rs.html b/src/actix_web_httpauth/headers/www_authenticate/mod.rs.html index 308c79dc3..1323fc322 100644 --- a/src/actix_web_httpauth/headers/www_authenticate/mod.rs.html +++ b/src/actix_web_httpauth/headers/www_authenticate/mod.rs.html @@ -1,4 +1,4 @@ -mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
@@ -17,4 +17,4 @@
     header::WwwAuthenticate,
 };
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/lib.rs.html b/src/actix_web_httpauth/lib.rs.html index 3617b0564..deda2c869 100644 --- a/src/actix_web_httpauth/lib.rs.html +++ b/src/actix_web_httpauth/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -38,7 +38,7 @@
 //! [Extractors]: https://actix.rs/docs/extractors
 //! [Middleware]: self::middleware
 
-#![forbid(unsafe_code)]
+#![forbid(unsafe_code)]
 #![deny(rust_2018_idioms, nonstandard_style)]
 #![warn(future_incompatible, missing_docs)]
 
@@ -47,4 +47,4 @@
 pub mod middleware;
 mod utils;
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/middleware.rs.html b/src/actix_web_httpauth/middleware.rs.html index c88bb2a00..5563766cb 100644 --- a/src/actix_web_httpauth/middleware.rs.html +++ b/src/actix_web_httpauth/middleware.rs.html @@ -1,4 +1,4 @@ -middleware.rs - source
1
+middleware.rs - source
1
 2
 3
 4
@@ -443,7 +443,7 @@
 ///
 /// Otherwise, it will pass both the request and the parsed credentials into it. In case of
 /// successful validation `F` callback is required to return the `ServiceRequest` back.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone)]
 pub struct HttpAuthentication<T, F>
 where
     T: FromRequest,
@@ -558,7 +558,7 @@
     }
 }
 
-#[doc(hidden)]
+#[doc(hidden)]
 pub struct AuthenticationMiddleware<S, F, T>
 where
     T: FromRequest,
@@ -656,7 +656,7 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use actix_service::into_service;
     use actix_web::{
@@ -671,7 +671,7 @@
     use crate::extractors::{basic::BasicAuth, bearer::BearerAuth};
 
     /// This is a test for https://github.com/actix/actix-extras/issues/10
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_middleware_panic() {
         let middleware = AuthenticationMiddleware {
             service: Rc::new(into_service(|_: ServiceRequest| async move {
@@ -694,7 +694,7 @@
     }
 
     /// This is a test for https://github.com/actix/actix-extras/issues/10
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_middleware_panic_several_orders() {
         let middleware = AuthenticationMiddleware {
             service: Rc::new(into_service(|_: ServiceRequest| async move {
@@ -730,7 +730,7 @@
         assert!(f3.is_err());
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_middleware_opt_extractor() {
         let middleware = AuthenticationMiddleware {
             service: Rc::new(into_service(|req: ServiceRequest| async move {
@@ -754,7 +754,7 @@
         assert!(f.is_ok());
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_middleware_res_extractor() {
         let middleware = AuthenticationMiddleware {
             service: Rc::new(into_service(|req: ServiceRequest| async move {
@@ -780,7 +780,7 @@
         assert!(f.is_ok());
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_middleware_works_with_app() {
         async fn validator(
             req: ServiceRequest,
@@ -805,7 +805,7 @@
         assert_eq!(resp.status(), StatusCode::UNAUTHORIZED);
     }
 
-    #[actix_web::test]
+    #[actix_web::test]
     async fn test_middleware_works_with_scope() {
         async fn validator(
             req: ServiceRequest,
@@ -833,4 +833,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/actix_web_httpauth/utils.rs.html b/src/actix_web_httpauth/utils.rs.html index dcdee7aec..013e9b1c6 100644 --- a/src/actix_web_httpauth/utils.rs.html +++ b/src/actix_web_httpauth/utils.rs.html @@ -1,4 +1,4 @@ -utils.rs - source
1
+utils.rs - source
1
 2
 3
 4
@@ -164,7 +164,7 @@
     }
 }
 
-#[cfg(test)]
+#[cfg(test)]
 mod tests {
     use std::str;
 
@@ -172,7 +172,7 @@
 
     use super::put_quoted;
 
-    #[test]
+    #[test]
     fn test_quote_str() {
         let input = "a \"quoted\" string";
         let mut output = BytesMut::new();
@@ -182,7 +182,7 @@
         assert_eq!(result, "a \\\"quoted\\\" string");
     }
 
-    #[test]
+    #[test]
     fn test_without_quotes() {
         let input = "non-quoted string";
         let mut output = BytesMut::new();
@@ -192,7 +192,7 @@
         assert_eq!(result, "non-quoted string");
     }
 
-    #[test]
+    #[test]
     fn test_starts_with_quote() {
         let input = "\"first-quoted string";
         let mut output = BytesMut::new();
@@ -202,7 +202,7 @@
         assert_eq!(result, "\\\"first-quoted string");
     }
 
-    #[test]
+    #[test]
     fn test_ends_with_quote() {
         let input = "last-quoted string\"";
         let mut output = BytesMut::new();
@@ -212,7 +212,7 @@
         assert_eq!(result, "last-quoted string\\\"");
     }
 
-    #[test]
+    #[test]
     fn test_double_quote() {
         let input = "quote\"\"string";
         let mut output = BytesMut::new();
@@ -223,4 +223,4 @@
     }
 }
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/COPYRIGHT.txt b/static.files/COPYRIGHT-002d5dd09d9a4f50.txt similarity index 100% rename from COPYRIGHT.txt rename to static.files/COPYRIGHT-002d5dd09d9a4f50.txt diff --git a/FiraSans-LICENSE.txt b/static.files/FiraSans-LICENSE-1761dca11ffc8f19.txt similarity index 100% rename from FiraSans-LICENSE.txt rename to static.files/FiraSans-LICENSE-1761dca11ffc8f19.txt diff --git a/FiraSans-Medium.woff2 b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 similarity index 100% rename from FiraSans-Medium.woff2 rename to static.files/FiraSans-Medium-8f9a781e4970d388.woff2 diff --git a/FiraSans-Regular.woff2 b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 similarity index 100% rename from FiraSans-Regular.woff2 rename to static.files/FiraSans-Regular-018c141bf0843ffd.woff2 diff --git a/LICENSE-APACHE.txt b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt similarity index 100% rename from LICENSE-APACHE.txt rename to static.files/LICENSE-APACHE-b91fa81cba47b86a.txt diff --git a/LICENSE-MIT.txt b/static.files/LICENSE-MIT-65090b722b3f6c56.txt similarity index 100% rename from LICENSE-MIT.txt rename to static.files/LICENSE-MIT-65090b722b3f6c56.txt diff --git a/NanumBarunGothic.ttf.woff2 b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 similarity index 100% rename from NanumBarunGothic.ttf.woff2 rename to static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 diff --git a/NanumBarunGothic-LICENSE.txt b/static.files/NanumBarunGothic-LICENSE-2fe9ce67ec95245d.txt similarity index 100% rename from NanumBarunGothic-LICENSE.txt rename to static.files/NanumBarunGothic-LICENSE-2fe9ce67ec95245d.txt diff --git a/SourceCodePro-It.ttf.woff2 b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 similarity index 100% rename from SourceCodePro-It.ttf.woff2 rename to static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 diff --git a/SourceCodePro-LICENSE.txt b/static.files/SourceCodePro-LICENSE-f554967dca0cf1dd.txt similarity index 100% rename from SourceCodePro-LICENSE.txt rename to static.files/SourceCodePro-LICENSE-f554967dca0cf1dd.txt diff --git a/SourceCodePro-Regular.ttf.woff2 b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 similarity index 100% rename from SourceCodePro-Regular.ttf.woff2 rename to static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 diff --git a/SourceCodePro-Semibold.ttf.woff2 b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 similarity index 100% rename from SourceCodePro-Semibold.ttf.woff2 rename to static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 diff --git a/SourceSerif4-Bold.ttf.woff2 b/static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2 similarity index 100% rename from SourceSerif4-Bold.ttf.woff2 rename to static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2 diff --git a/SourceSerif4-It.ttf.woff2 b/static.files/SourceSerif4-It-d034fe4ef9d0fa00.ttf.woff2 similarity index 100% rename from SourceSerif4-It.ttf.woff2 rename to static.files/SourceSerif4-It-d034fe4ef9d0fa00.ttf.woff2 diff --git a/SourceSerif4-LICENSE.md b/static.files/SourceSerif4-LICENSE-964d32dc04f20ca3.md similarity index 100% rename from SourceSerif4-LICENSE.md rename to static.files/SourceSerif4-LICENSE-964d32dc04f20ca3.md diff --git a/SourceSerif4-Regular.ttf.woff2 b/static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2 similarity index 100% rename from SourceSerif4-Regular.ttf.woff2 rename to static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2 diff --git a/static.files/ayu-70b683d68cb31790.css b/static.files/ayu-70b683d68cb31790.css new file mode 100644 index 000000000..bf8a60aff --- /dev/null +++ b/static.files/ayu-70b683d68cb31790.css @@ -0,0 +1,293 @@ +/* +Based off of the Ayu theme +Original by Dempfi (https://github.com/dempfi/ayu) +*/ + +:root { + --main-background-color: #0f1419; + --main-color: #c5c5c5; + --settings-input-color: #ffb454; + --sidebar-background-color: #14191f; + --sidebar-background-color-hover: rgba(70, 70, 70, 0.33); + --code-block-background-color: #191f26; + --scrollbar-track-background-color: transparent; + --scrollbar-thumb-background-color: #5c6773; + --scrollbar-color: #5c6773 #24292f; + --headings-border-bottom-color: #5c6773; + --border-color: #5c6773; + --button-background-color: #141920; + --right-side-color: grey; + --code-attribute-color: #999; + --toggles-color: #999; + --search-input-focused-border-color: #5c6773; /* Same as `--border-color`. */ + --copy-path-button-color: #fff; + --copy-path-img-filter: invert(70%); + --copy-path-img-hover-filter: invert(100%); + --codeblock-error-hover-color: rgb(255, 0, 0); + --codeblock-error-color: rgba(255, 0, 0, .5); + --codeblock-ignore-hover-color: rgb(255, 142, 0); + --codeblock-ignore-color: rgba(255, 142, 0, .6); + --type-link-color: #ffa0a5; + --trait-link-color: #39afd7; + --assoc-item-link-color: #39afd7; + --function-link-color: #fdd687; + --macro-link-color: #a37acc; + --keyword-link-color: #39afd7; + --mod-link-color: #39afd7; + --link-color: #39afd7; + --sidebar-link-color: #53b1db; + --sidebar-current-link-background-color: transparent; + --search-result-link-focus-background-color: #3c3c3c; + --search-result-border-color: #aaa3; + --stab-background-color: #314559; + --stab-code-color: #e6e1cf; + --search-color: #fff; + --code-highlight-kw-color: #ff7733; + --code-highlight-kw-2-color: #ff7733; + --code-highlight-lifetime-color: #ff7733; + --code-highlight-prelude-color: #69f2df; + --code-highlight-prelude-val-color: #ff7733; + --code-highlight-number-color: #b8cc52; + --code-highlight-string-color: #b8cc52; + --code-highlight-literal-color: #ff7733; + --code-highlight-attribute-color: #e6e1cf; + --code-highlight-self-color: #36a3d9; + --code-highlight-macro-color: #a37acc; + --code-highlight-question-mark-color: #ff9011; + --code-highlight-comment-color: #788797; + --code-highlight-doc-comment-color: #a1ac88; + --example-line-numbers-border-color: none; + --src-line-numbers-span-color: #5c6773; + --src-line-number-highlighted-background-color: rgba(255, 236, 164, 0.06); + --test-arrow-color: #788797; + --test-arrow-background-color: rgba(57, 175, 215, 0.09); + --test-arrow-hover-color: #c5c5c5; + --test-arrow-hover-background-color: rgba(57, 175, 215, 0.368); + --rust-logo-filter: drop-shadow(1px 0 0px #fff) + drop-shadow(0 1px 0 #fff) + drop-shadow(-1px 0 0 #fff) + drop-shadow(0 -1px 0 #fff); +} + +.slider { + background-color: #ccc; +} +.slider:before { + background-color: white; +} +input:focus + .slider { + box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3); +} + +h1, h2, h3, h4 { + color: white; +} +h1 a { + color: #fff; +} +h4 { + border: none; +} + +.docblock code { + color: #ffb454; +} +.code-header { + color: #e6e1cf; +} +.docblock pre > code, pre > code { + color: #e6e1cf; +} +.item-info code { + color: #e6e1cf; +} +.docblock a > code { + color: #39AFD7 !important; +} +pre, .rustdoc.source .example-wrap { + color: #e6e1cf; +} + +.sidebar .current, +.sidebar a:hover { + color: #ffb44c; +} + +.sidebar-elems .location { + color: #ff7733; +} + +.src-line-numbers .line-highlighted { + color: #708090; + padding-right: 4px; + border-right: 1px solid #ffb44c; +} + +.search-results a:hover { + color: #fff !important; + background-color: #3c3c3c; +} + +.search-results a:focus { + color: #fff !important; + background-color: #3c3c3c; +} +.search-results a { + color: #0096cf; +} +.search-results a div.desc { + color: #c5c5c5; +} + +.content .item-info::before { color: #ccc; } + +.sidebar h2 a, +.sidebar h3 a { + color: white; +} +body.source .example-wrap pre.rust a { + background: #333; +} + +details.rustdoc-toggle > summary::before { + filter: invert(100%); +} + +#crate-search-div::after { + /* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */ + filter: invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%); +} +#crate-search:hover, #crate-search:focus { + border-color: #e0e0e0 !important; +} +#crate-search-div:hover::after, #crate-search-div:focus-within::after { + filter: invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%); +} + +.module-item .stab, +.import-item .stab { + color: #000; +} + +.result-name .primitive > i, .result-name .keyword > i { + color: #788797; +} + +:target { + background: rgba(255, 236, 164, 0.06); + border-right: 3px solid rgba(255, 180, 76, 0.85); +} + +.search-failed a { + color: #39AFD7; +} + +.tooltip::after { + background-color: #314559; + color: #c5c5c5; +} + +.tooltip::before { + border-color: transparent #314559 transparent transparent; +} + +.notable-traits-tooltiptext { + background-color: #314559; +} + +#titles > button.selected { + background-color: #141920 !important; + border-bottom: 1px solid #ffb44c !important; + border-top: none; +} + +#titles > button:not(.selected) { + background-color: transparent !important; + border: none; +} + +#titles > button:hover { + border-bottom: 1px solid rgba(242, 151, 24, 0.3); +} + +#titles > button > div.count { + color: #888; +} + +/* rules that this theme does not need to set, here to satisfy the rule checker */ +/* note that a lot of these are partially set in some way (meaning they are set +individually rather than as a group) */ +/* FIXME: these rules should be at the bottom of the file but currently must be +above the `@media (max-width: 700px)` rules due to a bug in the css checker */ +/* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */ +pre.rust .lifetime {} +pre.rust .kw {} +#titles > button:hover, #titles > button.selected {} +pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val, pre.rust .attribute {} +pre.rust .kw-2, pre.rust .prelude-ty {} + +kbd { + color: #c5c5c5; + background-color: #314559; + box-shadow: inset 0 -1px 0 #5c6773; +} + +#settings-menu > a, #help-button > a { + color: #fff; +} + +#settings-menu > a img { + filter: invert(100); +} + +#settings-menu > a:hover, #settings-menu > a:focus, +#help-button > a:hover, #help-button > a:focus { + border-color: #e0e0e0; +} + +.search-results .result-name span.alias { + color: #c5c5c5; +} +.search-results .result-name span.grey { + color: #999; +} + +#source-sidebar > .title { + color: #fff; +} +#source-sidebar div.files > a:hover, details.dir-entry summary:hover, +#source-sidebar div.files > a:focus, details.dir-entry summary:focus { + background-color: #14191f; + color: #ffb44c; +} +#source-sidebar div.files > a.selected { + background-color: #14191f; + color: #ffb44c; +} + +.scraped-example-list .scrape-help { + border-color: #aaa; + color: #eee; +} +.scraped-example-list .scrape-help:hover { + border-color: white; + color: white; +} +.scraped-example .example-wrap .rust span.highlight { + background: rgb(91, 59, 1); +} +.scraped-example .example-wrap .rust span.highlight.focus { + background: rgb(124, 75, 15); +} +.scraped-example:not(.expanded) .code-wrapper:before { + background: linear-gradient(to bottom, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0)); +} +.scraped-example:not(.expanded) .code-wrapper:after { + background: linear-gradient(to top, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0)); +} +.toggle-line-inner { + background: #999; +} +.toggle-line:hover .toggle-line-inner { + background: #c5c5c5; +} diff --git a/clipboard.svg b/static.files/clipboard-7571035ce49a181d.svg similarity index 100% rename from clipboard.svg rename to static.files/clipboard-7571035ce49a181d.svg diff --git a/static.files/dark-a78f946771c40031.css b/static.files/dark-a78f946771c40031.css new file mode 100644 index 000000000..ac6e52784 --- /dev/null +++ b/static.files/dark-a78f946771c40031.css @@ -0,0 +1,190 @@ +:root { + --main-background-color: #353535; + --main-color: #ddd; + --settings-input-color: #2196f3; + --sidebar-background-color: #505050; + --sidebar-background-color-hover: #676767; + --code-block-background-color: #2A2A2A; + --scrollbar-track-background-color: #717171; + --scrollbar-thumb-background-color: rgba(32, 34, 37, .6); + --scrollbar-color: rgba(32,34,37,.6) #5a5a5a; + --headings-border-bottom-color: #d2d2d2; + --border-color: #e0e0e0; + --button-background-color: #f0f0f0; + --right-side-color: grey; + --code-attribute-color: #999; + --toggles-color: #999; + --search-input-focused-border-color: #008dfd; + --copy-path-button-color: #999; + --copy-path-img-filter: invert(50%); + --copy-path-img-hover-filter: invert(65%); + --codeblock-error-hover-color: rgb(255, 0, 0); + --codeblock-error-color: rgba(255, 0, 0, .5); + --codeblock-ignore-hover-color: rgb(255, 142, 0); + --codeblock-ignore-color: rgba(255, 142, 0, .6); + --type-link-color: #2dbfb8; + --trait-link-color: #b78cf2; + --assoc-item-link-color: #d2991d; + --function-link-color: #2bab63; + --macro-link-color: #09bd00; + --keyword-link-color: #d2991d; + --mod-link-color: #d2991d; + --link-color: #d2991d; + --sidebar-link-color: #fdbf35; + --sidebar-current-link-background-color: #444; + --search-result-link-focus-background-color: #616161; + --search-result-border-color: #aaa3; + --stab-background-color: #314559; + --stab-code-color: #e6e1cf; + --search-color: #111; + --code-highlight-kw-color: #ab8ac1; + --code-highlight-kw-2-color: #769acb; + --code-highlight-lifetime-color: #d97f26; + --code-highlight-prelude-color: #769acb; + --code-highlight-prelude-val-color: #ee6868; + --code-highlight-number-color: #83a300; + --code-highlight-string-color: #83a300; + --code-highlight-literal-color: #ee6868; + --code-highlight-attribute-color: #ee6868; + --code-highlight-self-color: #ee6868; + --code-highlight-macro-color: #3e999f; + --code-highlight-question-mark-color: #ff9011; + --code-highlight-comment-color: #8d8d8b; + --code-highlight-doc-comment-color: #8ca375; + --example-line-numbers-border-color: #4a4949; + --src-line-numbers-span-color: #3b91e2; + --src-line-number-highlighted-background-color: #0a042f; + --test-arrow-color: #dedede; + --test-arrow-background-color: rgba(78, 139, 202, 0.2); + --test-arrow-hover-color: #dedede; + --test-arrow-hover-background-color: #4e8bca; + --rust-logo-filter: drop-shadow(1px 0 0px #fff) + drop-shadow(0 1px 0 #fff) + drop-shadow(-1px 0 0 #fff) + drop-shadow(0 -1px 0 #fff); +} + +.slider { + background-color: #ccc; +} +.slider:before { + background-color: white; +} +input:focus + .slider { + box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3); +} + +.content .item-info::before { color: #ccc; } + +body.source .example-wrap pre.rust a { + background: #333; +} + +details.rustdoc-toggle > summary::before { + filter: invert(100%); +} + +#crate-search-div::after { + /* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */ + filter: invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%); +} +#crate-search:hover, #crate-search:focus { + border-color: #2196f3 !important; +} +#crate-search-div:hover::after, #crate-search-div:focus-within::after { + filter: invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%); +} + +:target { + background-color: #494a3d; + border-right: 3px solid #bb7410; +} + +.search-failed a { + color: #0089ff; +} + +.tooltip::after { + background-color: #000; + color: #fff; + border-color: #000; +} + +.tooltip::before { + border-color: transparent black transparent transparent; +} + +.notable-traits-tooltiptext { + background-color: #111; +} + +#titles > button:not(.selected) { + background-color: #252525; + border-top-color: #252525; +} + +#titles > button:hover, #titles > button.selected { + border-top-color: #0089ff; + background-color: #353535; +} + +#titles > button > div.count { + color: #888; +} + +kbd { + color: #000; + background-color: #fafbfc; + box-shadow: inset 0 -1px 0 #c6cbd1; +} + +#settings-menu > a, #help-button > a { + color: #000; +} + +#settings-menu > a:hover, #settings-menu > a:focus, +#help-button > a:hover, #help-button > a:focus { + border-color: #ffb900; +} + +.search-results .result-name span.alias { + color: #fff; +} +.search-results .result-name span.grey { + color: #ccc; +} + +#source-sidebar div.files > a:hover, details.dir-entry summary:hover, +#source-sidebar div.files > a:focus, details.dir-entry summary:focus { + background-color: #444; +} +#source-sidebar div.files > a.selected { + background-color: #333; +} + +.scraped-example-list .scrape-help { + border-color: #aaa; + color: #eee; +} +.scraped-example-list .scrape-help:hover { + border-color: white; + color: white; +} +.scraped-example .example-wrap .rust span.highlight { + background: rgb(91, 59, 1); +} +.scraped-example .example-wrap .rust span.highlight.focus { + background: rgb(124, 75, 15); +} +.scraped-example:not(.expanded) .code-wrapper:before { + background: linear-gradient(to bottom, rgba(53, 53, 53, 1), rgba(53, 53, 53, 0)); +} +.scraped-example:not(.expanded) .code-wrapper:after { + background: linear-gradient(to top, rgba(53, 53, 53, 1), rgba(53, 53, 53, 0)); +} +.toggle-line-inner { + background: #999; +} +.toggle-line:hover .toggle-line-inner { + background: #c5c5c5; +} diff --git a/down-arrow.svg b/static.files/down-arrow-927217e04c7463ac.svg similarity index 100% rename from down-arrow.svg rename to static.files/down-arrow-927217e04c7463ac.svg diff --git a/favicon-16x16.png b/static.files/favicon-16x16-8b506e7a72182f1c.png similarity index 100% rename from favicon-16x16.png rename to static.files/favicon-16x16-8b506e7a72182f1c.png diff --git a/favicon.svg b/static.files/favicon-2c020d218678b618.svg similarity index 100% rename from favicon.svg rename to static.files/favicon-2c020d218678b618.svg diff --git a/favicon-32x32.png b/static.files/favicon-32x32-422f7d1d52889060.png similarity index 100% rename from favicon-32x32.png rename to static.files/favicon-32x32-422f7d1d52889060.png diff --git a/static.files/light-c11f492748536797.css b/static.files/light-c11f492748536797.css new file mode 100644 index 000000000..608fc5aba --- /dev/null +++ b/static.files/light-c11f492748536797.css @@ -0,0 +1,181 @@ +:root { + --main-background-color: white; + --main-color: black; + --settings-input-color: #2196f3; + --sidebar-background-color: #F5F5F5; + --sidebar-background-color-hover: #E0E0E0; + --code-block-background-color: #F5F5F5; + --scrollbar-track-background-color: #dcdcdc; + --scrollbar-thumb-background-color: rgba(36, 37, 39, 0.6); + --scrollbar-color: rgba(36, 37, 39, 0.6) #d9d9d9; + --headings-border-bottom-color: #ddd; + --border-color: #e0e0e0; + --button-background-color: #fff; + --right-side-color: grey; + --code-attribute-color: #999; + --toggles-color: #999; + --search-input-focused-border-color: #66afe9; + --copy-path-button-color: #999; + --copy-path-img-filter: invert(50%); + --copy-path-img-hover-filter: invert(35%); + --codeblock-error-hover-color: rgb(255, 0, 0); + --codeblock-error-color: rgba(255, 0, 0, .5); + --codeblock-ignore-hover-color: rgb(255, 142, 0); + --codeblock-ignore-color: rgba(255, 142, 0, .6); + --type-link-color: #ad378a; + --trait-link-color: #6e4fc9; + --assoc-item-link-color: #3873ad; + --function-link-color: #ad7c37; + --macro-link-color: #068000; + --keyword-link-color: #3873ad; + --mod-link-color: #3873ad; + --link-color: #3873ad; + --sidebar-link-color: #356da4; + --sidebar-current-link-background-color: #fff; + --search-result-link-focus-background-color: #ccc; + --search-result-border-color: #aaa3; + --stab-background-color: #fff5d6; + --stab-code-color: #000; + --search-color: #000; + --code-highlight-kw-color: #8959a8; + --code-highlight-kw-2-color: #4271ae; + --code-highlight-lifetime-color: #b76514; + --code-highlight-prelude-color: #4271ae; + --code-highlight-prelude-val-color: #c82829; + --code-highlight-number-color: #718c00; + --code-highlight-string-color: #718c00; + --code-highlight-literal-color: #c82829; + --code-highlight-attribute-color: #c82829; + --code-highlight-self-color: #c82829; + --code-highlight-macro-color: #3e999f; + --code-highlight-question-mark-color: #ff9011; + --code-highlight-comment-color: #8e908c; + --code-highlight-doc-comment-color: #4d4d4c; + --example-line-numbers-border-color: #c7c7c7; + --src-line-numbers-span-color: #c67e2d; + --src-line-number-highlighted-background-color: #fdffd3; + --test-arrow-color: #f5f5f5; + --test-arrow-background-color: rgba(78, 139, 202, 0.2); + --test-arrow-hover-color: #f5f5f5; + --test-arrow-hover-background-color: #4e8bca; + --rust-logo-filter: initial; +} + +.slider { + background-color: #ccc; +} +.slider:before { + background-color: white; +} +input:focus + .slider { + box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3); +} + +.content .item-info::before { color: #ccc; } + +body.source .example-wrap pre.rust a { + background: #eee; +} + +#crate-search-div::after { + /* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */ + filter: invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%); +} +#crate-search:hover, #crate-search:focus { + border-color: #717171 !important; +} +#crate-search-div:hover::after, #crate-search-div:focus-within::after { + filter: invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%); +} + +:target { + background: #FDFFD3; + border-right: 3px solid #AD7C37; +} + +.search-failed a { + color: #3873AD; +} + +.tooltip::after { + background-color: #000; + color: #fff; +} + +.tooltip::before { + border-color: transparent black transparent transparent; +} + +.notable-traits-tooltiptext { + background-color: #eee; +} + +#titles > button:not(.selected) { + background-color: #e6e6e6; + border-top-color: #e6e6e6; +} + +#titles > button:hover, #titles > button.selected { + background-color: #ffffff; + border-top-color: #0089ff; +} + +#titles > button > div.count { + color: #888; +} + +kbd { + color: #000; + background-color: #fafbfc; + box-shadow: inset 0 -1px 0 #c6cbd1; +} + +#settings-menu > a, #help-button > a { + color: #000; +} + +#settings-menu > a:hover, #settings-menu > a:focus, +#help-button > a:hover, #help-button > a:focus { + border-color: #717171; +} + +.search-results .result-name span.alias { + color: #000; +} +.search-results .result-name span.grey { + color: #999; +} + +#source-sidebar div.files > a:hover, details.dir-entry summary:hover, +#source-sidebar div.files > a:focus, details.dir-entry summary:focus { + background-color: #E0E0E0; +} +#source-sidebar div.files > a.selected { + background-color: #fff; +} +.scraped-example-list .scrape-help { + border-color: #555; + color: #333; +} +.scraped-example-list .scrape-help:hover { + border-color: black; + color: black; +} +.scraped-example .example-wrap .rust span.highlight { + background: #fcffd6; +} +.scraped-example .example-wrap .rust span.highlight.focus { + background: #f6fdb0; +} +.scraped-example:not(.expanded) .code-wrapper:before { + background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); +} +.scraped-example:not(.expanded) .code-wrapper:after { + background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); +} +.toggle-line-inner { + background: #ccc; +} +.toggle-line:hover .toggle-line-inner { + background: #999; +} diff --git a/static.files/main-0dede64717b247ca.js b/static.files/main-0dede64717b247ca.js new file mode 100644 index 000000000..1c84393cb --- /dev/null +++ b/static.files/main-0dede64717b247ca.js @@ -0,0 +1,1067 @@ +// Local js definitions: +/* global addClass, getSettingValue, hasClass, searchState */ +/* global onEach, onEachLazy, removeClass */ + +"use strict"; + +// Get a value from the rustdoc-vars div, which is used to convey data from +// Rust to the JS. If there is no such element, return null. +function getVar(name) { + const el = document.getElementById("rustdoc-vars"); + if (el) { + return el.attributes["data-" + name].value; + } else { + return null; + } +} + +// Given a basename (e.g. "storage") and an extension (e.g. ".js"), return a URL +// for a resource under the root-path, with the resource-suffix. +function resourcePath(basename, extension) { + return getVar("root-path") + basename + getVar("resource-suffix") + extension; +} + +function hideMain() { + addClass(document.getElementById(MAIN_ID), "hidden"); +} + +function showMain() { + removeClass(document.getElementById(MAIN_ID), "hidden"); +} + +function elemIsInParent(elem, parent) { + while (elem && elem !== document.body) { + if (elem === parent) { + return true; + } + elem = elem.parentElement; + } + return false; +} + +function blurHandler(event, parentElem, hideCallback) { + if (!elemIsInParent(document.activeElement, parentElem) && + !elemIsInParent(event.relatedTarget, parentElem) + ) { + hideCallback(); + } +} + +(function() { + window.rootPath = getVar("root-path"); + window.currentCrate = getVar("current-crate"); +}()); + +function setMobileTopbar() { + // FIXME: It would be nicer to generate this text content directly in HTML, + // but with the current code it's hard to get the right information in the right place. + const mobileLocationTitle = document.querySelector(".mobile-topbar h2"); + const locationTitle = document.querySelector(".sidebar h2.location"); + if (mobileLocationTitle && locationTitle) { + mobileLocationTitle.innerHTML = locationTitle.innerHTML; + } +} + +// Gets the human-readable string for the virtual-key code of the +// given KeyboardEvent, ev. +// +// This function is meant as a polyfill for KeyboardEvent#key, +// since it is not supported in IE 11 or Chrome for Android. We also test for +// KeyboardEvent#keyCode because the handleShortcut handler is +// also registered for the keydown event, because Blink doesn't fire +// keypress on hitting the Escape key. +// +// So I guess you could say things are getting pretty interoperable. +function getVirtualKey(ev) { + if ("key" in ev && typeof ev.key !== "undefined") { + return ev.key; + } + + const c = ev.charCode || ev.keyCode; + if (c === 27) { + return "Escape"; + } + return String.fromCharCode(c); +} + +const MAIN_ID = "main-content"; +const SETTINGS_BUTTON_ID = "settings-menu"; +const ALTERNATIVE_DISPLAY_ID = "alternative-display"; +const NOT_DISPLAYED_ID = "not-displayed"; +const HELP_BUTTON_ID = "help-button"; + +function getSettingsButton() { + return document.getElementById(SETTINGS_BUTTON_ID); +} + +function getHelpButton() { + return document.getElementById(HELP_BUTTON_ID); +} + +// Returns the current URL without any query parameter or hash. +function getNakedUrl() { + return window.location.href.split("?")[0].split("#")[0]; +} + +/** + * This function inserts `newNode` after `referenceNode`. It doesn't work if `referenceNode` + * doesn't have a parent node. + * + * @param {HTMLElement} newNode + * @param {HTMLElement} referenceNode + */ +function insertAfter(newNode, referenceNode) { + referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); +} + +/** + * This function creates a new `
` with the given `id` and `classes` if it doesn't already + * exist. + * + * More information about this in `switchDisplayedElement` documentation. + * + * @param {string} id + * @param {string} classes + */ +function getOrCreateSection(id, classes) { + let el = document.getElementById(id); + + if (!el) { + el = document.createElement("section"); + el.id = id; + el.className = classes; + insertAfter(el, document.getElementById(MAIN_ID)); + } + return el; +} + +/** + * Returns the `
` element which contains the displayed element. + * + * @return {HTMLElement} + */ +function getAlternativeDisplayElem() { + return getOrCreateSection(ALTERNATIVE_DISPLAY_ID, "content hidden"); +} + +/** + * Returns the `
` element which contains the not-displayed elements. + * + * @return {HTMLElement} + */ +function getNotDisplayedElem() { + return getOrCreateSection(NOT_DISPLAYED_ID, "hidden"); +} + +/** + * To nicely switch between displayed "extra" elements (such as search results or settings menu) + * and to alternate between the displayed and not displayed elements, we hold them in two different + * `
` elements. They work in pair: one holds the hidden elements while the other + * contains the displayed element (there can be only one at the same time!). So basically, we switch + * elements between the two `
` elements. + * + * @param {HTMLElement} elemToDisplay + */ +function switchDisplayedElement(elemToDisplay) { + const el = getAlternativeDisplayElem(); + + if (el.children.length > 0) { + getNotDisplayedElem().appendChild(el.firstElementChild); + } + if (elemToDisplay === null) { + addClass(el, "hidden"); + showMain(); + return; + } + el.appendChild(elemToDisplay); + hideMain(); + removeClass(el, "hidden"); +} + +function browserSupportsHistoryApi() { + return window.history && typeof window.history.pushState === "function"; +} + +// eslint-disable-next-line no-unused-vars +function loadCss(cssUrl) { + const link = document.createElement("link"); + link.href = cssUrl; + link.type = "text/css"; + link.rel = "stylesheet"; + document.getElementsByTagName("head")[0].appendChild(link); +} + +(function() { + const isHelpPage = window.location.pathname.endsWith("/help.html"); + + function loadScript(url) { + const script = document.createElement("script"); + script.src = url; + document.head.append(script); + } + + getSettingsButton().onclick = event => { + if (event.ctrlKey || event.altKey || event.metaKey) { + return; + } + addClass(getSettingsButton(), "rotate"); + event.preventDefault(); + // Sending request for the CSS and the JS files at the same time so it will + // hopefully be loaded when the JS will generate the settings content. + loadCss(getVar("static-root-path") + getVar("settings-css")); + loadScript(getVar("static-root-path") + getVar("settings-js")); + }; + + window.searchState = { + loadingText: "Loading search results...", + input: document.getElementsByClassName("search-input")[0], + outputElement: () => { + let el = document.getElementById("search"); + if (!el) { + el = document.createElement("section"); + el.id = "search"; + getNotDisplayedElem().appendChild(el); + } + return el; + }, + title: document.title, + titleBeforeSearch: document.title, + timeout: null, + // On the search screen, so you remain on the last tab you opened. + // + // 0 for "In Names" + // 1 for "In Parameters" + // 2 for "In Return Types" + currentTab: 0, + // tab and back preserves the element that was focused. + focusedByTab: [null, null, null], + clearInputTimeout: () => { + if (searchState.timeout !== null) { + clearTimeout(searchState.timeout); + searchState.timeout = null; + } + }, + isDisplayed: () => searchState.outputElement().parentElement.id === ALTERNATIVE_DISPLAY_ID, + // Sets the focus on the search bar at the top of the page + focus: () => { + searchState.input.focus(); + }, + // Removes the focus from the search bar. + defocus: () => { + searchState.input.blur(); + }, + showResults: search => { + if (search === null || typeof search === "undefined") { + search = searchState.outputElement(); + } + switchDisplayedElement(search); + searchState.mouseMovedAfterSearch = false; + document.title = searchState.title; + }, + hideResults: () => { + switchDisplayedElement(null); + document.title = searchState.titleBeforeSearch; + // We also remove the query parameter from the URL. + if (browserSupportsHistoryApi()) { + history.replaceState(null, window.currentCrate + " - Rust", + getNakedUrl() + window.location.hash); + } + }, + getQueryStringParams: () => { + const params = {}; + window.location.search.substring(1).split("&"). + map(s => { + const pair = s.split("="); + params[decodeURIComponent(pair[0])] = + typeof pair[1] === "undefined" ? null : decodeURIComponent(pair[1]); + }); + return params; + }, + setup: () => { + const search_input = searchState.input; + if (!searchState.input) { + return; + } + let searchLoaded = false; + function loadSearch() { + if (!searchLoaded) { + searchLoaded = true; + loadScript(getVar("static-root-path") + getVar("search-js")); + loadScript(resourcePath("search-index", ".js")); + } + } + + search_input.addEventListener("focus", () => { + search_input.origPlaceholder = search_input.placeholder; + search_input.placeholder = "Type your search here."; + loadSearch(); + }); + + if (search_input.value !== "") { + loadSearch(); + } + + const params = searchState.getQueryStringParams(); + if (params.search !== undefined) { + const search = searchState.outputElement(); + search.innerHTML = "

" + + searchState.loadingText + "

"; + searchState.showResults(search); + loadSearch(); + } + }, + }; + + function getPageId() { + if (window.location.hash) { + const tmp = window.location.hash.replace(/^#/, ""); + if (tmp.length > 0) { + return tmp; + } + } + return null; + } + + const toggleAllDocsId = "toggle-all-docs"; + let savedHash = ""; + + function handleHashes(ev) { + if (ev !== null && searchState.isDisplayed() && ev.newURL) { + // This block occurs when clicking on an element in the navbar while + // in a search. + switchDisplayedElement(null); + const hash = ev.newURL.slice(ev.newURL.indexOf("#") + 1); + if (browserSupportsHistoryApi()) { + // `window.location.search`` contains all the query parameters, not just `search`. + history.replaceState(null, "", + getNakedUrl() + window.location.search + "#" + hash); + } + const elem = document.getElementById(hash); + if (elem) { + elem.scrollIntoView(); + } + } + // This part is used in case an element is not visible. + if (savedHash !== window.location.hash) { + savedHash = window.location.hash; + if (savedHash.length === 0) { + return; + } + expandSection(savedHash.slice(1)); // we remove the '#' + } + } + + function onHashChange(ev) { + // If we're in mobile mode, we should hide the sidebar in any case. + hideSidebar(); + handleHashes(ev); + } + + function openParentDetails(elem) { + while (elem) { + if (elem.tagName === "DETAILS") { + elem.open = true; + } + elem = elem.parentNode; + } + } + + function expandSection(id) { + openParentDetails(document.getElementById(id)); + } + + function handleEscape(ev) { + searchState.clearInputTimeout(); + switchDisplayedElement(null); + if (browserSupportsHistoryApi()) { + history.replaceState(null, window.currentCrate + " - Rust", + getNakedUrl() + window.location.hash); + } + ev.preventDefault(); + searchState.defocus(); + window.hidePopoverMenus(); + } + + function handleShortcut(ev) { + // Don't interfere with browser shortcuts + const disableShortcuts = getSettingValue("disable-shortcuts") === "true"; + if (ev.ctrlKey || ev.altKey || ev.metaKey || disableShortcuts) { + return; + } + + if (document.activeElement.tagName === "INPUT" && + document.activeElement.type !== "checkbox") { + switch (getVirtualKey(ev)) { + case "Escape": + handleEscape(ev); + break; + } + } else { + switch (getVirtualKey(ev)) { + case "Escape": + handleEscape(ev); + break; + + case "s": + case "S": + ev.preventDefault(); + searchState.focus(); + break; + + case "+": + ev.preventDefault(); + expandAllDocs(); + break; + case "-": + ev.preventDefault(); + collapseAllDocs(); + break; + + case "?": + showHelp(); + break; + + default: + break; + } + } + } + + document.addEventListener("keypress", handleShortcut); + document.addEventListener("keydown", handleShortcut); + + function addSidebarItems() { + if (!window.SIDEBAR_ITEMS) { + return; + } + const sidebar = document.getElementsByClassName("sidebar-elems")[0]; + + /** + * Append to the sidebar a "block" of links - a heading along with a list (`
    `) of items. + * + * @param {string} shortty - A short type name, like "primitive", "mod", or "macro" + * @param {string} id - The HTML id of the corresponding section on the module page. + * @param {string} longty - A long, capitalized, plural name, like "Primitive Types", + * "Modules", or "Macros". + */ + function block(shortty, id, longty) { + const filtered = window.SIDEBAR_ITEMS[shortty]; + if (!filtered) { + return; + } + + const h3 = document.createElement("h3"); + h3.innerHTML = `${longty}`; + const ul = document.createElement("ul"); + ul.className = "block " + shortty; + + for (const item of filtered) { + const name = item[0]; + const desc = item[1]; // can be null + + let path; + if (shortty === "mod") { + path = name + "/index.html"; + } else { + path = shortty + "." + name + ".html"; + } + const current_page = document.location.href.split("/").pop(); + const link = document.createElement("a"); + link.href = path; + link.title = desc; + if (path === current_page) { + link.className = "current"; + } + link.textContent = name; + const li = document.createElement("li"); + li.appendChild(link); + ul.appendChild(li); + } + sidebar.appendChild(h3); + sidebar.appendChild(ul); + } + + if (sidebar) { + block("primitive", "primitives", "Primitive Types"); + block("mod", "modules", "Modules"); + block("macro", "macros", "Macros"); + block("struct", "structs", "Structs"); + block("enum", "enums", "Enums"); + block("union", "unions", "Unions"); + block("constant", "constants", "Constants"); + block("static", "static", "Statics"); + block("trait", "traits", "Traits"); + block("fn", "functions", "Functions"); + block("type", "types", "Type Definitions"); + block("foreigntype", "foreign-types", "Foreign Types"); + block("keyword", "keywords", "Keywords"); + block("traitalias", "trait-aliases", "Trait Aliases"); + } + } + + window.register_implementors = imp => { + const implementors = document.getElementById("implementors-list"); + const synthetic_implementors = document.getElementById("synthetic-implementors-list"); + const inlined_types = new Set(); + + const TEXT_IDX = 0; + const SYNTHETIC_IDX = 1; + const TYPES_IDX = 2; + + if (synthetic_implementors) { + // This `inlined_types` variable is used to avoid having the same implementation + // showing up twice. For example "String" in the "Sync" doc page. + // + // By the way, this is only used by and useful for traits implemented automatically + // (like "Send" and "Sync"). + onEachLazy(synthetic_implementors.getElementsByClassName("impl"), el => { + const aliases = el.getAttribute("data-aliases"); + if (!aliases) { + return; + } + aliases.split(",").forEach(alias => { + inlined_types.add(alias); + }); + }); + } + + let currentNbImpls = implementors.getElementsByClassName("impl").length; + const traitName = document.querySelector("h1.fqn > .trait").textContent; + const baseIdName = "impl-" + traitName + "-"; + const libs = Object.getOwnPropertyNames(imp); + // We don't want to include impls from this JS file, when the HTML already has them. + // The current crate should always be ignored. Other crates that should also be + // ignored are included in the attribute `data-ignore-extern-crates`. + const script = document + .querySelector("script[data-ignore-extern-crates]"); + const ignoreExternCrates = script ? script.getAttribute("data-ignore-extern-crates") : ""; + for (const lib of libs) { + if (lib === window.currentCrate || ignoreExternCrates.indexOf(lib) !== -1) { + continue; + } + const structs = imp[lib]; + + struct_loop: + for (const struct of structs) { + const list = struct[SYNTHETIC_IDX] ? synthetic_implementors : implementors; + + // The types list is only used for synthetic impls. + // If this changes, `main.js` and `write_shared.rs` both need changed. + if (struct[SYNTHETIC_IDX]) { + for (const struct_type of struct[TYPES_IDX]) { + if (inlined_types.has(struct_type)) { + continue struct_loop; + } + inlined_types.add(struct_type); + } + } + + const code = document.createElement("h3"); + code.innerHTML = struct[TEXT_IDX]; + addClass(code, "code-header"); + + onEachLazy(code.getElementsByTagName("a"), elem => { + const href = elem.getAttribute("href"); + + if (href && href.indexOf("http") !== 0) { + elem.setAttribute("href", window.rootPath + href); + } + }); + + const currentId = baseIdName + currentNbImpls; + const anchor = document.createElement("a"); + anchor.href = "#" + currentId; + addClass(anchor, "anchor"); + + const display = document.createElement("div"); + display.id = currentId; + addClass(display, "impl"); + display.appendChild(anchor); + display.appendChild(code); + list.appendChild(display); + currentNbImpls += 1; + } + } + }; + if (window.pending_implementors) { + window.register_implementors(window.pending_implementors); + } + + function addSidebarCrates() { + if (!window.ALL_CRATES) { + return; + } + const sidebarElems = document.getElementsByClassName("sidebar-elems")[0]; + if (!sidebarElems) { + return; + } + // Draw a convenient sidebar of known crates if we have a listing + const h3 = document.createElement("h3"); + h3.innerHTML = "Crates"; + const ul = document.createElement("ul"); + ul.className = "block crate"; + + for (const crate of window.ALL_CRATES) { + const link = document.createElement("a"); + link.href = window.rootPath + crate + "/index.html"; + if (window.rootPath !== "./" && crate === window.currentCrate) { + link.className = "current"; + } + link.textContent = crate; + + const li = document.createElement("li"); + li.appendChild(link); + ul.appendChild(li); + } + sidebarElems.appendChild(h3); + sidebarElems.appendChild(ul); + } + + function expandAllDocs() { + const innerToggle = document.getElementById(toggleAllDocsId); + removeClass(innerToggle, "will-expand"); + onEachLazy(document.getElementsByClassName("rustdoc-toggle"), e => { + if (!hasClass(e, "type-contents-toggle")) { + e.open = true; + } + }); + innerToggle.title = "collapse all docs"; + innerToggle.children[0].innerText = "\u2212"; // "\u2212" is "−" minus sign + } + + function collapseAllDocs() { + const innerToggle = document.getElementById(toggleAllDocsId); + addClass(innerToggle, "will-expand"); + onEachLazy(document.getElementsByClassName("rustdoc-toggle"), e => { + if (e.parentNode.id !== "implementations-list" || + (!hasClass(e, "implementors-toggle") && + !hasClass(e, "type-contents-toggle")) + ) { + e.open = false; + } + }); + innerToggle.title = "expand all docs"; + innerToggle.children[0].innerText = "+"; + } + + function toggleAllDocs() { + const innerToggle = document.getElementById(toggleAllDocsId); + if (!innerToggle) { + return; + } + if (hasClass(innerToggle, "will-expand")) { + expandAllDocs(); + } else { + collapseAllDocs(); + } + } + + (function() { + const toggles = document.getElementById(toggleAllDocsId); + if (toggles) { + toggles.onclick = toggleAllDocs; + } + + const hideMethodDocs = getSettingValue("auto-hide-method-docs") === "true"; + const hideImplementations = getSettingValue("auto-hide-trait-implementations") === "true"; + const hideLargeItemContents = getSettingValue("auto-hide-large-items") !== "false"; + + function setImplementorsTogglesOpen(id, open) { + const list = document.getElementById(id); + if (list !== null) { + onEachLazy(list.getElementsByClassName("implementors-toggle"), e => { + e.open = open; + }); + } + } + + if (hideImplementations) { + setImplementorsTogglesOpen("trait-implementations-list", false); + setImplementorsTogglesOpen("blanket-implementations-list", false); + } + + onEachLazy(document.getElementsByClassName("rustdoc-toggle"), e => { + if (!hideLargeItemContents && hasClass(e, "type-contents-toggle")) { + e.open = true; + } + if (hideMethodDocs && hasClass(e, "method-toggle")) { + e.open = false; + } + + }); + + const pageId = getPageId(); + if (pageId !== null) { + expandSection(pageId); + } + }()); + + window.rustdoc_add_line_numbers_to_examples = () => { + onEachLazy(document.getElementsByClassName("rust-example-rendered"), x => { + const parent = x.parentNode; + const line_numbers = parent.querySelectorAll(".example-line-numbers"); + if (line_numbers.length > 0) { + return; + } + const count = x.textContent.split("\n").length; + const elems = []; + for (let i = 0; i < count; ++i) { + elems.push(i + 1); + } + const node = document.createElement("pre"); + addClass(node, "example-line-numbers"); + node.innerHTML = elems.join("\n"); + parent.insertBefore(node, x); + }); + }; + + window.rustdoc_remove_line_numbers_from_examples = () => { + onEachLazy(document.getElementsByClassName("rust-example-rendered"), x => { + const parent = x.parentNode; + const line_numbers = parent.querySelectorAll(".example-line-numbers"); + for (const node of line_numbers) { + parent.removeChild(node); + } + }); + }; + + (function() { + // To avoid checking on "rustdoc-line-numbers" value on every loop... + if (getSettingValue("line-numbers") === "true") { + window.rustdoc_add_line_numbers_to_examples(); + } + }()); + + let oldSidebarScrollPosition = null; + + // Scroll locking used both here and in source-script.js + + window.rustdocMobileScrollLock = function() { + const mobile_topbar = document.querySelector(".mobile-topbar"); + if (window.innerWidth <= window.RUSTDOC_MOBILE_BREAKPOINT) { + // This is to keep the scroll position on mobile. + oldSidebarScrollPosition = window.scrollY; + document.body.style.width = `${document.body.offsetWidth}px`; + document.body.style.position = "fixed"; + document.body.style.top = `-${oldSidebarScrollPosition}px`; + if (mobile_topbar) { + mobile_topbar.style.top = `${oldSidebarScrollPosition}px`; + mobile_topbar.style.position = "relative"; + } + } else { + oldSidebarScrollPosition = null; + } + }; + + window.rustdocMobileScrollUnlock = function() { + const mobile_topbar = document.querySelector(".mobile-topbar"); + if (oldSidebarScrollPosition !== null) { + // This is to keep the scroll position on mobile. + document.body.style.width = ""; + document.body.style.position = ""; + document.body.style.top = ""; + if (mobile_topbar) { + mobile_topbar.style.top = ""; + mobile_topbar.style.position = ""; + } + // The scroll position is lost when resetting the style, hence why we store it in + // `oldSidebarScrollPosition`. + window.scrollTo(0, oldSidebarScrollPosition); + oldSidebarScrollPosition = null; + } + }; + + function showSidebar() { + window.rustdocMobileScrollLock(); + const sidebar = document.getElementsByClassName("sidebar")[0]; + addClass(sidebar, "shown"); + } + + function hideSidebar() { + window.rustdocMobileScrollUnlock(); + const sidebar = document.getElementsByClassName("sidebar")[0]; + removeClass(sidebar, "shown"); + } + + window.addEventListener("resize", () => { + if (window.innerWidth > window.RUSTDOC_MOBILE_BREAKPOINT && + oldSidebarScrollPosition !== null) { + // If the user opens the sidebar in "mobile" mode, and then grows the browser window, + // we need to switch away from mobile mode and make the main content area scrollable. + hideSidebar(); + } + }); + + function handleClick(id, f) { + const elem = document.getElementById(id); + if (elem) { + elem.addEventListener("click", f); + } + } + handleClick(MAIN_ID, () => { + hideSidebar(); + }); + + onEachLazy(document.getElementsByTagName("a"), el => { + // For clicks on internal links ( tags with a hash property), we expand the section we're + // jumping to *before* jumping there. We can't do this in onHashChange, because it changes + // the height of the document so we wind up scrolled to the wrong place. + if (el.hash) { + el.addEventListener("click", () => { + expandSection(el.hash.slice(1)); + hideSidebar(); + }); + } + }); + + onEachLazy(document.querySelectorAll(".rustdoc-toggle > summary:not(.hideme)"), el => { + el.addEventListener("click", e => { + if (e.target.tagName !== "SUMMARY" && e.target.tagName !== "A") { + e.preventDefault(); + } + }); + }); + + onEachLazy(document.getElementsByClassName("notable-traits"), e => { + e.onclick = function() { + this.getElementsByClassName("notable-traits-tooltiptext")[0] + .classList.toggle("force-tooltip"); + }; + }); + + const sidebar_menu_toggle = document.getElementsByClassName("sidebar-menu-toggle")[0]; + if (sidebar_menu_toggle) { + sidebar_menu_toggle.addEventListener("click", () => { + const sidebar = document.getElementsByClassName("sidebar")[0]; + if (!hasClass(sidebar, "shown")) { + showSidebar(); + } else { + hideSidebar(); + } + }); + } + + function helpBlurHandler(event) { + blurHandler(event, getHelpButton(), window.hidePopoverMenus); + } + + function buildHelpMenu() { + const book_info = document.createElement("span"); + book_info.className = "top"; + book_info.innerHTML = "You can find more information in \ + the rustdoc book."; + + const shortcuts = [ + ["?", "Show this help dialog"], + ["S", "Focus the search field"], + ["↑", "Move up in search results"], + ["↓", "Move down in search results"], + ["← / →", "Switch result tab (when results focused)"], + ["⏎", "Go to active search result"], + ["+", "Expand all sections"], + ["-", "Collapse all sections"], + ].map(x => "
    " + + x[0].split(" ") + .map((y, index) => ((index & 1) === 0 ? "" + y + "" : " " + y + " ")) + .join("") + "
    " + x[1] + "
    ").join(""); + const div_shortcuts = document.createElement("div"); + addClass(div_shortcuts, "shortcuts"); + div_shortcuts.innerHTML = "

    Keyboard Shortcuts

    " + shortcuts + "
    "; + + const infos = [ + "Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.", + "Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.", + "Search functions by type signature (e.g., vec -> usize or \ + -> vec)", + "Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)", + "You can look for items with an exact name by putting double quotes around \ + your request: \"string\"", + "Look for items inside another one by searching for a path: vec::Vec", + ].map(x => "

    " + x + "

    ").join(""); + const div_infos = document.createElement("div"); + addClass(div_infos, "infos"); + div_infos.innerHTML = "

    Search Tricks

    " + infos; + + const rustdoc_version = document.createElement("span"); + rustdoc_version.className = "bottom"; + const rustdoc_version_code = document.createElement("code"); + rustdoc_version_code.innerText = "rustdoc " + getVar("rustdoc-version"); + rustdoc_version.appendChild(rustdoc_version_code); + + const container = document.createElement("div"); + if (!isHelpPage) { + container.className = "popover"; + } + container.id = "help"; + container.style.display = "none"; + + const side_by_side = document.createElement("div"); + side_by_side.className = "side-by-side"; + side_by_side.appendChild(div_shortcuts); + side_by_side.appendChild(div_infos); + + container.appendChild(book_info); + container.appendChild(side_by_side); + container.appendChild(rustdoc_version); + + if (isHelpPage) { + const help_section = document.createElement("section"); + help_section.appendChild(container); + document.getElementById("main-content").appendChild(help_section); + container.style.display = "block"; + } else { + const help_button = getHelpButton(); + help_button.appendChild(container); + + container.onblur = helpBlurHandler; + container.onclick = event => { + event.preventDefault(); + }; + help_button.onblur = helpBlurHandler; + help_button.children[0].onblur = helpBlurHandler; + } + + return container; + } + + /** + * Hide all the popover menus. + */ + window.hidePopoverMenus = function() { + onEachLazy(document.querySelectorAll(".search-form .popover"), elem => { + elem.style.display = "none"; + }); + }; + + /** + * Returns the help menu element (not the button). + * + * @param {boolean} buildNeeded - If this argument is `false`, the help menu element won't be + * built if it doesn't exist. + * + * @return {HTMLElement} + */ + function getHelpMenu(buildNeeded) { + let menu = getHelpButton().querySelector(".popover"); + if (!menu && buildNeeded) { + menu = buildHelpMenu(); + } + return menu; + } + + /** + * Show the help popup menu. + */ + function showHelp() { + const menu = getHelpMenu(true); + if (menu.style.display === "none") { + window.hidePopoverMenus(); + menu.style.display = ""; + } + } + + if (isHelpPage) { + showHelp(); + document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click", event => { + // Already on the help page, make help button a no-op. + const target = event.target; + if (target.tagName !== "A" || + target.parentElement.id !== HELP_BUTTON_ID || + event.ctrlKey || + event.altKey || + event.metaKey) { + return; + } + event.preventDefault(); + }); + } else { + document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click", event => { + // By default, have help button open docs in a popover. + // If user clicks with a moderator, though, use default browser behavior, + // probably opening in a new window or tab. + const target = event.target; + if (target.tagName !== "A" || + target.parentElement.id !== HELP_BUTTON_ID || + event.ctrlKey || + event.altKey || + event.metaKey) { + return; + } + event.preventDefault(); + const menu = getHelpMenu(true); + const shouldShowHelp = menu.style.display === "none"; + if (shouldShowHelp) { + showHelp(); + } else { + window.hidePopoverMenus(); + } + }); + } + + setMobileTopbar(); + addSidebarItems(); + addSidebarCrates(); + onHashChange(null); + window.addEventListener("hashchange", onHashChange); + searchState.setup(); +}()); + +(function() { + let reset_button_timeout = null; + + window.copy_path = but => { + const parent = but.parentElement; + const path = []; + + onEach(parent.childNodes, child => { + if (child.tagName === "A") { + path.push(child.textContent); + } + }); + + const el = document.createElement("textarea"); + el.value = path.join("::"); + el.setAttribute("readonly", ""); + // To not make it appear on the screen. + el.style.position = "absolute"; + el.style.left = "-9999px"; + + document.body.appendChild(el); + el.select(); + document.execCommand("copy"); + document.body.removeChild(el); + + // There is always one children, but multiple childNodes. + but.children[0].style.display = "none"; + + let tmp; + if (but.childNodes.length < 2) { + tmp = document.createTextNode("✓"); + but.appendChild(tmp); + } else { + onEachLazy(but.childNodes, e => { + if (e.nodeType === Node.TEXT_NODE) { + tmp = e; + return true; + } + }); + tmp.textContent = "✓"; + } + + if (reset_button_timeout !== null) { + window.clearTimeout(reset_button_timeout); + } + + function reset_button() { + tmp.textContent = ""; + reset_button_timeout = null; + but.children[0].style.display = ""; + } + + reset_button_timeout = window.setTimeout(reset_button, 1000); + }; +}()); diff --git a/static.files/normalize-76eba96aa4d2e634.css b/static.files/normalize-76eba96aa4d2e634.css new file mode 100644 index 000000000..fdb8a8c65 --- /dev/null +++ b/static.files/normalize-76eba96aa4d2e634.css @@ -0,0 +1,2 @@ +/* ignore-tidy-linelength */ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} diff --git a/static.files/noscript-201a7e04dc4c6fce.css b/static.files/noscript-201a7e04dc4c6fce.css new file mode 100644 index 000000000..301f03a16 --- /dev/null +++ b/static.files/noscript-201a7e04dc4c6fce.css @@ -0,0 +1,24 @@ +/* +This whole CSS file is used only in case rustdoc is rendered with javascript disabled. Since a lot +of content is hidden by default (depending on the settings too), we have to overwrite some of the +rules. +*/ + +#main-content .attributes { + /* Since there is no toggle (the "[-]") when JS is disabled, no need for this margin either. */ + margin-left: 0 !important; +} + +#copy-path { + /* It requires JS to work so no need to display it in this case. */ + display: none; +} + +nav.sub { + /* The search bar and related controls don't work without JS */ + display: none; +} + +.source .sidebar { + display: none; +} diff --git a/rust-logo.svg b/static.files/rust-logo-151179464ae7ed46.svg similarity index 100% rename from rust-logo.svg rename to static.files/rust-logo-151179464ae7ed46.svg diff --git a/static.files/rustdoc-ef244fc9943488f7.css b/static.files/rustdoc-ef244fc9943488f7.css new file mode 100644 index 000000000..a38c0e42a --- /dev/null +++ b/static.files/rustdoc-ef244fc9943488f7.css @@ -0,0 +1,2108 @@ +/* See FiraSans-LICENSE.txt for the Fira Sans license. */ +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 400; + src: local('Fira Sans'), + url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2"); + font-display: swap; +} +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 500; + src: local('Fira Sans Medium'), + url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2"); + font-display: swap; +} + +/* See SourceSerif4-LICENSE.md for the Source Serif 4 license. */ +@font-face { + font-family: 'Source Serif 4'; + font-style: normal; + font-weight: 400; + src: local('Source Serif 4'), + url("SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2") format("woff2"); + font-display: swap; +} +@font-face { + font-family: 'Source Serif 4'; + font-style: italic; + font-weight: 400; + src: local('Source Serif 4 Italic'), + url("SourceSerif4-It-d034fe4ef9d0fa00.ttf.woff2") format("woff2"); + font-display: swap; +} +@font-face { + font-family: 'Source Serif 4'; + font-style: normal; + font-weight: 700; + src: local('Source Serif 4 Bold'), + url("SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2") format("woff2"); + font-display: swap; +} + +/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */ +@font-face { + font-family: 'Source Code Pro'; + font-style: normal; + font-weight: 400; + /* Avoid using locally installed font because bad versions are in circulation: + * see https://github.com/rust-lang/rust/issues/24355 */ + src: url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2"); + font-display: swap; +} +@font-face { + font-family: 'Source Code Pro'; + font-style: italic; + font-weight: 400; + src: url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2"); + font-display: swap; +} +@font-face { + font-family: 'Source Code Pro'; + font-style: normal; + font-weight: 600; + src: url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2"); + font-display: swap; +} + +/* Avoid using legacy CJK serif fonts in Windows like Batang. */ +@font-face { + font-family: 'NanumBarunGothic'; + src: url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2"); + font-display: swap; + unicode-range: U+AC00-D7AF, U+1100-11FF, U+3130-318F, U+A960-A97F, U+D7B0-D7FF; +} + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* This part handles the "default" theme being used depending on the system one. */ +html { + content: ""; +} +@media (prefers-color-scheme: light) { + html { + content: "light"; + } +} +@media (prefers-color-scheme: dark) { + html { + content: "dark"; + } +} + +/* General structure and fonts */ + +body { + /* Line spacing at least 1.5 per Web Content Accessibility Guidelines + https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html */ + font: 1rem/1.5 "Source Serif 4", NanumBarunGothic, serif; + margin: 0; + position: relative; + /* We use overflow-wrap: break-word for Safari, which doesn't recognize + `anywhere`: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap */ + overflow-wrap: break-word; + /* Then override it with `anywhere`, which is required to make non-Safari browsers break + more aggressively when we want them to. */ + overflow-wrap: anywhere; + + -webkit-font-feature-settings: "kern", "liga"; + -moz-font-feature-settings: "kern", "liga"; + font-feature-settings: "kern", "liga"; + + background-color: var(--main-background-color); + color: var(--main-color); +} + +h1 { + font-size: 1.5rem; /* 24px */ +} +h2 { + font-size: 1.375rem; /* 22px */ +} +h3 { + font-size: 1.25rem; /* 20px */ +} +h1, h2, h3, h4, h5, h6 { + font-weight: 500; +} +h1, h2, h3, h4 { + margin: 25px 0 15px 0; + padding-bottom: 6px; +} +.docblock h3, .docblock h4, h5, h6 { + margin: 15px 0 5px 0; +} +.docblock > h2:first-child, +.docblock > h3:first-child, +.docblock > h4:first-child, +.docblock > h5:first-child, +.docblock > h6:first-child { + margin-top: 0; +} +h1.fqn { + margin: 0; + padding: 0; + flex-grow: 1; + /* We use overflow-wrap: break-word for Safari, which doesn't recognize + `anywhere`: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap */ + overflow-wrap: break-word; + /* Then override it with `anywhere`, which is required to make non-Safari browsers break + more aggressively when we want them to. */ + overflow-wrap: anywhere; +} +.main-heading { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + padding-bottom: 6px; + margin-bottom: 15px; +} +/* The only headings that get underlines are: + Markdown-generated headings within the top-doc + Rustdoc-generated h2 section headings (e.g. "Implementations", "Required Methods", etc) + Underlines elsewhere in the documentation break up visual flow and tend to invert + section hierarchies. */ +.content h2, +.top-doc .docblock > h3, +.top-doc .docblock > h4 { + border-bottom: 1px solid var(--headings-border-bottom-color); +} +h3.code-header { + font-size: 1.125rem; /* 18px */ +} +h4.code-header { + font-size: 1rem; +} +.code-header { + font-weight: 600; + margin: 0; + padding: 0; +} + +#crate-search, +h1, h2, h3, h4, h5, h6, +.sidebar, +.mobile-topbar, +.search-input, +.search-results .result-name, +.item-left > a, +.out-of-band, +span.since, +a.srclink, +#help-button > a, +details.rustdoc-toggle.top-doc > summary, +details.rustdoc-toggle.non-exhaustive > summary, +.scraped-example-title, +.more-examples-toggle summary, .more-examples-toggle .hide-more, +.example-links a, +/* This selector is for the items listed in the "all items" page. */ +ul.all-items { + font-family: "Fira Sans", Arial, NanumBarunGothic, sans-serif; +} + +#toggle-all-docs, +a.anchor, +.small-section-header a, +#source-sidebar a, +pre.rust a, +.sidebar h2 a, +.sidebar h3 a, +.mobile-topbar h2 a, +h1 a, +.search-results a, +.module-item .stab, +.import-item .stab, +.result-name .primitive > i, .result-name .keyword > i, +.method .where, +.fn .where, +.where.fmt-newline { + color: var(--main-color); +} + +.content span.enum, .content a.enum, +.content span.struct, .content a.struct, +.content span.union, .content a.union, +.content span.primitive, .content a.primitive, +.content span.type, .content a.type, +.content span.foreigntype, .content a.foreigntype { + color: var(--type-link-color); +} + +.content span.trait, .content a.trait, +.content span.traitalias, .content a.traitalias { + color: var(--trait-link-color); +} + +.content span.associatedtype, .content a.associatedtype, +.content span.constant, .content a.constant, +.content span.static, .content a.static { + color: var(--assoc-item-link-color); +} + +.content span.fn, .content a.fn, +.content .fnname, +.content span.method, .content a.method, +.content span.tymethod, .content a.tymethod { + color: var(--function-link-color); +} + +.content span.attr, .content a.attr, +.content span.derive, .content a.derive, +.content span.macro, .content a.macro { + color: var(--macro-link-color); +} + +.content span.mod, .content a.mod { + color: var(--mod-link-color); +} + +.content span.keyword, .content a.keyword { + color: var(--keyword-link-color); +} + +a { + color: var(--link-color); +} + +ol, ul { + padding-left: 24px; +} +ul ul, ol ul, ul ol, ol ol { + margin-bottom: .625em; +} + +p { + /* Paragraph spacing at least 1.5 times line spacing per Web Content Accessibility Guidelines. + Line-height is 1.5rem, so line spacing is .5rem; .75em is 1.5 times that. + https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html */ + margin: 0 0 .75em 0; +} +/* For the last child of a div, the margin will be taken care of + by the margin-top of the next item. */ +p:last-child { + margin: 0; +} + +/* Fix some style changes due to normalize.css 8 */ + +button { + /* Buttons on Safari have different default padding than other platforms. Make them the same. */ + padding: 1px 6px; +} + +button#toggle-all-docs { + padding: 0; + background: none; + border: none; + cursor: pointer; + /* iOS button gradient: https://stackoverflow.com/q/5438567 */ + -webkit-appearance: none; + opacity: 1; +} + +/* end tweaks for normalize.css 8 */ + +.rustdoc { + display: flex; + flex-direction: row; + flex-wrap: nowrap; +} + +main { + position: relative; + flex-grow: 1; + padding: 10px 15px 40px 45px; + min-width: 0; +} + +.source main { + padding: 15px; +} + +.width-limiter { + max-width: 960px; + margin-right: auto; +} + +.source .width-limiter { + max-width: unset; +} + +details:not(.rustdoc-toggle) summary { + margin-bottom: .6em; +} + +code, pre, a.test-arrow, .code-header { + font-family: "Source Code Pro", monospace; +} +.docblock code, .docblock-short code { + border-radius: 3px; + padding: 0 0.125em; +} +.docblock pre code, .docblock-short pre code { + padding: 0; +} +pre { + padding: 14px; +} +.item-decl pre { + overflow-x: auto; +} + +.source .content pre { + padding: 20px; +} + +img { + max-width: 100%; +} + +.source .content { + overflow: visible; +} + +.sub-logo-container, .logo-container { + /* zero text boxes so that computed line height = image height exactly */ + line-height: 0; +} + +.sub-logo-container > img { + height: 60px; + width: 60px; + object-fit: contain; +} + +.rust-logo { + filter: var(--rust-logo-filter); +} + +.sidebar, .mobile-topbar, .sidebar-menu-toggle { + background-color: var(--sidebar-background-color); +} + +.sidebar { + font-size: 0.875rem; + width: 200px; + min-width: 200px; + overflow-y: scroll; + position: sticky; + height: 100vh; + top: 0; + left: 0; +} + +.rustdoc.source .sidebar { + width: 50px; + min-width: 0px; + max-width: 300px; + flex-grow: 0; + flex-shrink: 0; + flex-basis: auto; + border-right: 1px solid; + overflow-x: hidden; + /* The sidebar is by default hidden */ + overflow-y: hidden; +} + +.source .sidebar, #sidebar-toggle, #source-sidebar { + background-color: var(--sidebar-background-color); +} + +#sidebar-toggle > button:hover, #sidebar-toggle > button:focus { + background-color: var(--sidebar-background-color-hover); +} + +.source .sidebar > *:not(#sidebar-toggle) { + visibility: hidden; +} + +.source-sidebar-expanded .source .sidebar { + overflow-y: auto; + width: 300px; +} + +.source-sidebar-expanded .source .sidebar > *:not(#sidebar-toggle) { + visibility: visible; +} + +#all-types { + margin-top: 1em; +} + +/* Improve the scrollbar display on firefox */ +* { + scrollbar-width: initial; + scrollbar-color: var(--scrollbar-color); +} +.sidebar { + scrollbar-width: thin; + scrollbar-color: var(--scrollbar-color); +} + +/* Improve the scrollbar display on webkit-based browsers */ +::-webkit-scrollbar { + width: 12px; +} +.sidebar::-webkit-scrollbar { + width: 8px; +} +::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0; + background-color: var(--scrollbar-track-background-color); +} +.sidebar::-webkit-scrollbar-track { + background-color: var(--scrollbar-track-background-color); +} +::-webkit-scrollbar-thumb, .sidebar::-webkit-scrollbar-thumb { + background-color: var(--scrollbar-thumb-background-color); +} + +/* Everything else */ + +.hidden { + display: none !important; +} + +.sidebar .logo-container { + margin-top: 10px; + margin-bottom: 10px; + text-align: center; +} + +.version { + overflow-wrap: break-word; +} + +.logo-container > img { + height: 100px; + width: 100px; +} + +ul.block, .block li { + padding: 0; + margin: 0; + list-style: none; +} + +.block a, +.sidebar h2 a, +.sidebar h3 a { + display: block; + padding: 0.25rem; + margin-left: -0.25rem; + + text-overflow: ellipsis; + overflow: hidden; +} + +.sidebar h2 { + overflow-wrap: anywhere; + padding: 0; + margin: 0.7rem 0; +} + +.sidebar h3 { + font-size: 1.125rem; /* 18px */ + padding: 0; + margin: 0; +} + +.sidebar-elems, +.sidebar > h2 { + padding-left: 24px; +} + +.sidebar a, .sidebar .current { + color: var(--sidebar-link-color); +} +.sidebar .current, +.sidebar a:hover { + background-color: var(--sidebar-current-link-background-color); +} + +.sidebar-elems .block { + margin-bottom: 2em; +} + +.sidebar-elems .block li a { + white-space: nowrap; +} + +.mobile-topbar { + display: none; +} + +.source .content pre.rust { + overflow: auto; + padding-left: 0; +} + +.rustdoc .example-wrap { + display: flex; + position: relative; + margin-bottom: 10px; +} +/* For the last child of a div, the margin will be taken care of + by the margin-top of the next item. */ +.rustdoc .example-wrap:last-child { + margin-bottom: 0px; +} + +.rustdoc .example-wrap > pre { + margin: 0; + flex-grow: 1; + overflow-x: auto; +} + +.rustdoc .example-wrap > pre.example-line-numbers, +.rustdoc .example-wrap > pre.src-line-numbers { + flex-grow: 0; + overflow: initial; + text-align: right; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.example-line-numbers { + border: 1px solid; + padding: 13px 8px; + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; + border-color: var(--example-line-numbers-border-color); +} + +.src-line-numbers span { + cursor: pointer; + color: var(--src-line-numbers-span-color); +} +.src-line-numbers .line-highlighted { + background-color: var(--src-line-number-highlighted-background-color); +} +.src-line-numbers :target { + background-color: transparent; +} + +.search-loading { + text-align: center; +} + +.docblock-short { + overflow-wrap: break-word; + overflow-wrap: anywhere; + overflow: hidden; + text-overflow: ellipsis; +} +/* Wrap non-pre code blocks (`text`) but not (```text```). */ +.docblock > :not(pre) > code, +.docblock-short > code { + white-space: pre-wrap; +} + +.top-doc .docblock h2 { font-size: 1.375rem; } +.top-doc .docblock h3 { font-size: 1.25rem; } +.top-doc .docblock h4, +.top-doc .docblock h5 { + font-size: 1.125rem; +} +.top-doc .docblock h6 { + font-size: 1rem; +} + +.docblock h5 { font-size: 1rem; } +.docblock h6 { font-size: 0.875rem; } + +.docblock { + margin-left: 24px; + position: relative; +} + +.docblock > :not(.more-examples-toggle):not(.example-wrap) { + max-width: 100%; + overflow-x: auto; +} + +.out-of-band { + flex-grow: 0; + font-size: 1.125rem; +} + +.docblock code, .docblock-short code, +pre, .rustdoc.source .example-wrap { + background-color: var(--code-block-background-color); +} + +#main-content { + position: relative; +} + +.docblock table { + margin: .5em 0; + width: calc(100% - 2px); + overflow-x: auto; + display: block; + border-collapse: collapse; +} + +.docblock table td { + padding: .5em; + border: 1px dashed var(--border-color); + vertical-align: top; +} + +.docblock table th { + padding: .5em; + text-align: left; + border: 1px solid var(--border-color); +} + +/* Shift "where ..." part of method or fn definition down a line */ +.method .where, +.fn .where, +.where.fmt-newline { + display: block; + font-size: 0.875rem; +} + +.item-info { + display: block; + margin-left: 24px; +} + +.item-info code { + font-size: 0.875rem; +} + +#main-content > .item-info { + margin-left: 0; +} + +nav.sub { + flex-grow: 1; + flex-flow: row nowrap; + margin: 4px 0 25px 0; + display: flex; + align-items: center; +} +.search-form { + position: relative; + display: flex; + height: 34px; + flex-grow: 1; +} +.source nav.sub { + margin: 0 0 15px 0; +} +.source .search-form { + margin-left: 32px; +} + +a { + text-decoration: none; +} + +.small-section-header { + display: flex; + justify-content: space-between; + position: relative; +} + +.small-section-header:hover > .anchor { + display: initial; +} + +.impl:hover > .anchor, .trait-impl:hover > .anchor { + display: inline-block; + position: absolute; +} +.anchor { + display: none; + position: absolute; + left: -0.5em; + background: none !important; +} +.anchor.field { + left: -5px; +} +.small-section-header > .anchor { + left: -15px; + padding-right: 8px; +} +h2.small-section-header > .anchor { + padding-right: 6px; +} +.anchor::before { + content: '§'; +} + +.main-heading a:hover, +.example-wrap > pre.rust a:hover, +.all-items a:hover, +.docblock a:not(.test-arrow):not(.scrape-help):hover, +.docblock-short a:not(.test-arrow):not(.scrape-help):hover, +.item-info a { + text-decoration: underline; +} + +.crate.block a.current { font-weight: 500; } + +/* In most contexts we use `overflow-wrap: anywhere` to ensure that we can wrap + as much as needed on mobile (see + src/test/rustdoc-gui/type-declaration-overflow.goml for an example of why + this matters). The `anywhere` value means: + + "Soft wrap opportunities introduced by the word break are considered when + calculating min-content intrinsic sizes." + + https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap#values + + For table layouts, that becomes a problem: the browser tries to make each + column as narrow as possible, and `overflow-wrap: anywhere` means it can do + so by breaking words - even if some other column could be shrunk without + breaking words! This shows up, for instance, in the `Structs` / `Modules` / + `Functions` (etcetera) sections of a module page, and when a docblock + contains a table. + + So, for table layouts, override the default with break-word, which does + _not_ affect min-content intrinsic sizes. +*/ +table, +.item-table { + overflow-wrap: break-word; +} + +.item-table { + display: table; +} +.item-row { + display: table-row; +} +.item-left, .item-right { + display: table-cell; +} +.item-left { + padding-right: 1.25rem; +} + +.search-results-title { + margin-top: 0; + white-space: nowrap; + /* flex layout allows shrinking the -element "#crate-search") to be shrunk */ + min-width: 5em; +} +#crate-search { + min-width: 115px; + /* keep these two in sync with "@-moz-document url-prefix()" below */ + padding: 0 23px 0 4px; + /* prevents the s */ +@-moz-document url-prefix() { + #crate-search { + padding-left: 0px; /* == 4px - 4px */ + padding-right: 19px; /* == 23px - 4px */ + } +} +/* pseudo-element for holding the dropdown-arrow image; needs to be a separate thing +so that we can apply CSS-filters to change the arrow color in themes */ +#crate-search-div::after { + /* lets clicks through! */ + pointer-events: none; + /* completely covers the underlying div */ + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + content: ""; + background-repeat: no-repeat; + background-size: 20px; + background-position: calc(100% - 2px) 56%; + /* image is black color, themes should apply a "filter" property to change the color */ + background-image: url("down-arrow-2d685a4bae708e15.svg"); +} +#crate-search > option { + font-size: 1rem; +} +.search-input { + /* Override Normalize.css: it has a rule that sets + -webkit-appearance: textfield for search inputs. That + causes rounded corners and no border on iOS Safari. */ + -webkit-appearance: none; + outline: none; + border: 1px solid var(--border-color); + border-radius: 2px; + padding: 8px; + font-size: 1rem; + flex-grow: 1; + background-color: var(--button-background-color); + color: var(--search-color); +} +.search-input:focus { + border-color: var(--search-input-focused-border-color); +} + +.search-results { + display: none; +} + +.search-results.active { + display: block; +} + +.search-results > a { + display: flex; + /* A little margin ensures the browser's outlining of focused links has room to display. */ + margin-left: 2px; + margin-right: 2px; + border-bottom: 1px solid var(--search-result-border-color); + gap: 1em; +} + +.search-results > a > div { + flex: 1; +} + +.search-results > a > div.desc { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + display: block; +} + +.search-results a:hover, +.search-results a:focus { + background-color: var(--search-result-link-focus-background-color); +} + +.popover { + font-size: 1rem; + position: absolute; + right: 0; + z-index: 2; + display: block; + margin-top: 7px; + border-radius: 3px; + border: 1px solid var(--border-color); + font-size: 1rem; +} + +/* This rule is to draw the little arrow connecting the settings menu to the gear icon. */ +.popover::before { + content: ''; + position: absolute; + right: 11px; + border: solid var(--border-color); + border-width: 1px 1px 0 0; + display: inline-block; + padding: 4px; + transform: rotate(-45deg); + top: -5px; +} + +.popover, .popover::before { + background-color: var(--main-background-color); + color: var(--main-color); +} + +/* use larger max-width for help popover, but not for help.html */ +#help.popover { + max-width: 600px; +} + +#help.popover::before { + right: 48px; +} + +#help dt { + float: left; + clear: left; + display: block; + margin-right: 0.5rem; +} +#help span.top, #help span.bottom { + text-align: center; + display: block; + font-size: 1.125rem; +} +#help span.top { + margin: 10px 0; + border-bottom: 1px solid var(--border-color); + padding-bottom: 4px; + margin-bottom: 6px; +} +#help span.bottom { + clear: both; + border-top: 1px solid var(--border-color); +} +.side-by-side > div { + width: 50%; + float: left; + padding: 0 20px 20px 17px; +} + +.item-info .stab { + width: fit-content; + /* This min-height is needed to unify the height of the stab elements because some of them + have emojis. + */ + min-height: 36px; + display: flex; + align-items: center; + white-space: pre-wrap; +} +.stab { + padding: 3px; + margin-bottom: 5px; + font-size: 0.875rem; + font-weight: normal; + color: var(--main-color); + background-color: var(--stab-background-color); +} + +.stab.portability > code { + background: none; + color: var(--stab-code-color); +} + +.stab .emoji { + font-size: 1.25rem; + margin-right: 0.3rem; +} + +/* This is to prevent the `.stab` elements to overflow the .docblock elements. */ +.docblock .stab { + padding: 0 0.125em; + margin-bottom: 0; +} + +/* Black one-pixel outline around emoji shapes */ +.emoji { + text-shadow: + 1px 0 0 black, + -1px 0 0 black, + 0 1px 0 black, + 0 -1px 0 black; +} + +.module-item .stab, +.import-item .stab { + border-radius: 3px; + display: inline-block; + font-size: 0.875rem; + line-height: 1.2; + margin-bottom: 0; + margin-left: 0.3125em; + padding: 2px; + vertical-align: text-bottom; +} + +.module-item.unstable, +.import-item.unstable { + opacity: 0.65; +} + +.since { + font-weight: normal; + font-size: initial; +} + +.rightside { + padding-left: 12px; + padding-right: 2px; + float: right; +} + +.rightside:not(a), +.out-of-band { + color: var(--right-side-color); +} + +pre.rust { + tab-size: 4; + -moz-tab-size: 4; +} + +/* Code highlighting */ +pre.rust .kw { + color: var(--code-highlight-kw-color); +} +pre.rust .kw-2 { + color: var(--code-highlight-kw-2-color); +} +pre.rust .lifetime { + color: var(--code-highlight-lifetime-color); +} +pre.rust .prelude-ty { + color: var(--code-highlight-prelude-color); +} +pre.rust .prelude-val { + color: var(--code-highlight-prelude-val-color); +} +pre.rust .string { + color: var(--code-highlight-string-color); +} +pre.rust .number { + color: var(--code-highlight-number-color); +} +pre.rust .bool-val { + color: var(--code-highlight-literal-color); +} +pre.rust .self { + color: var(--code-highlight-self-color); +} +pre.rust .attr { + color: var(--code-highlight-attribute-color); +} +pre.rust .macro, +pre.rust .macro-nonterminal { + color: var(--code-highlight-macro-color); +} +pre.rust .question-mark { + font-weight: bold; + color: var(--code-highlight-question-mark-color); +} +pre.rust .comment { + color: var(--code-highlight-comment-color); +} +pre.rust .doccomment { + color: var(--code-highlight-doc-comment-color); +} + +.example-wrap.compile_fail, +.example-wrap.should_panic { + border-left: 2px solid var(--codeblock-error-color); +} + +.ignore.example-wrap { + border-left: 2px solid var(--codeblock-ignore-color); +} + +.example-wrap.compile_fail:hover, +.example-wrap.should_panic:hover { + border-left: 2px solid var(--codeblock-error-hover-color); +} + +.example-wrap.ignore:hover { + border-left: 2px solid var(--codeblock-ignore-hover-color); +} + +.example-wrap.compile_fail .tooltip, +.example-wrap.should_panic .tooltip { + color: var(--codeblock-error-color); +} + +.example-wrap.ignore .tooltip { + color: var(--codeblock-ignore-color); +} + +.example-wrap.compile_fail:hover .tooltip, +.example-wrap.should_panic:hover .tooltip { + color: var(--codeblock-error-hover-color); +} + +.example-wrap.ignore:hover .tooltip { + color: var(--codeblock-ignore-hover-color); +} + +.example-wrap .tooltip { + position: absolute; + display: block; + cursor: pointer; + left: -25px; + top: 5px; +} + +.example-wrap .tooltip::after { + display: none; + text-align: center; + padding: 5px 3px 3px 3px; + border-radius: 6px; + margin-left: 5px; + font-size: 1rem; + border: 1px solid var(--border-color); + position: absolute; + width: max-content; + top: -2px; + z-index: 1; +} + +.example-wrap .tooltip::before { + content: " "; + position: absolute; + top: 50%; + left: 16px; + margin-top: -5px; + border-width: 5px; + border-style: solid; + display: none; + z-index: 1; +} + +.example-wrap.ignore .tooltip::after { + content: "This example is not tested"; +} +.example-wrap.compile_fail .tooltip::after { + content: "This example deliberately fails to compile"; +} +.example-wrap.should_panic .tooltip::after { + content: "This example panics"; +} +.example-wrap.edition .tooltip::after { + content: "This code runs with edition " attr(data-edition); +} + +.example-wrap .tooltip:hover::before, .example-wrap .tooltip:hover::after { + display: inline; +} + +.example-wrap.compile_fail .tooltip, +.example-wrap.should_panic .tooltip, +.example-wrap.ignore .tooltip { + font-weight: bold; + font-size: 1.25rem; +} + +a.test-arrow { + display: inline-block; + visibility: hidden; + position: absolute; + padding: 5px 10px 5px 10px; + border-radius: 5px; + font-size: 1.375rem; + top: 5px; + right: 5px; + z-index: 1; + color: var(--test-arrow-color); + background-color: var(--test-arrow-background-color); +} +a.test-arrow:hover { + color: var(--test-arrow-hover-color); + background-color: var(--test-arrow-hover-background-color); +} +.example-wrap:hover .test-arrow { + visibility: visible; +} + +.code-attribute { + font-weight: 300; + color: var(--code-attribute-color); +} + +.item-spacer { + width: 100%; + height: 12px; +} + +.out-of-band > span.since { + font-size: 1.25rem; +} + +h3.variant { + font-weight: 600; + font-size: 1.125rem; + margin-bottom: 10px; +} + +.sub-variant h4 { + font-size: 1rem; + font-weight: 400; + margin-top: 0; + margin-bottom: 0; +} + +.sub-variant { + margin-left: 24px; + margin-bottom: 40px; +} + +.sub-variant > .sub-variant-field { + margin-left: 24px; +} + +:target > code, :target > .code-header { + opacity: 1; +} + +:target { + padding-right: 3px; +} + +.notable-traits-tooltip { + display: inline-block; + cursor: pointer; +} + +.notable-traits:hover .notable-traits-tooltiptext, +.notable-traits .notable-traits-tooltiptext.force-tooltip { + display: inline-block; +} + +.notable-traits .notable-traits-tooltiptext { + display: none; + padding: 5px 3px 3px 3px; + border-radius: 6px; + margin-left: 5px; + z-index: 10; + font-size: 1rem; + cursor: default; + position: absolute; + border: 1px solid; +} + +.notable-traits-tooltip::after { + /* The margin on the tooltip does not capture hover events, + this extends the area of hover enough so that mouse hover is not + lost when moving the mouse to the tooltip */ + content: "\00a0\00a0\00a0"; +} + +.notable-traits .docblock { + margin: 0; +} + +.notable-traits .notable { + margin: 0; + margin-bottom: 13px; + font-size: 1.1875rem; + font-weight: 600; + display: block; +} + +.notable-traits .docblock code.content { + margin: 0; + padding: 0; + font-size: 1.25rem; +} + +.search-failed { + text-align: center; + margin-top: 20px; + display: none; +} + +.search-failed.active { + display: block; +} + +.search-failed > ul { + text-align: left; + max-width: 570px; + margin-left: auto; + margin-right: auto; +} + +#titles { + display: flex; + flex-direction: row; + gap: 1px; + margin-bottom: 4px; +} + +#titles > button { + text-align: center; + font-size: 1.125rem; + cursor: pointer; + border: 0; + border-top: 2px solid; + flex: 1; + line-height: 1.5; + color: inherit; +} + +#titles > button > div.count { + display: inline-block; + font-size: 1rem; +} + +.notable-traits { + cursor: pointer; + z-index: 2; + margin-left: 5px; +} + +#sidebar-toggle { + position: sticky; + top: 0; + left: 0; + font-size: 1.25rem; + border-bottom: 1px solid; + display: flex; + height: 40px; + justify-content: center; + align-items: center; + z-index: 10; +} +#source-sidebar { + width: 100%; + overflow: auto; +} +#source-sidebar > .title { + font-size: 1.5rem; + text-align: center; + border-bottom: 1px solid var(--border-color); + margin-bottom: 6px; +} +#sidebar-toggle > button { + font-size: inherit; + font-weight: bold; + background: none; + color: inherit; + cursor: pointer; + text-align: center; + border: none; + outline: none; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + /* work around button layout strangeness: https://stackoverflow.com/q/7271561 */ + width: 100%; + /* iOS button gradient: https://stackoverflow.com/q/5438567 */ + -webkit-appearance: none; + opacity: 1; +} +#settings-menu, #help-button { + margin-left: 4px; + outline: none; +} + +#settings-menu > a, #help-button > a, #copy-path { + width: 33px; + cursor: pointer; + line-height: 1.5; +} + +#settings-menu > a, #help-button > a { + padding: 5px; + height: 100%; + display: block; + background-color: var(--button-background-color); + border: 1px solid var(--border-color); + border-radius: 2px; +} + +#copy-path { + color: var(--copy-path-button-color); + background: var(--main-background-color); + height: 34px; + margin-left: 10px; + padding: 0; + padding-left: 2px; + border: 0; +} +#copy-path > img { + filter: var(--copy-path-img-filter); +} +#copy-path:hover > img { + filter: var(--copy-path-img-hover-filter); +} + +@keyframes rotating { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} +#settings-menu.rotate > a img { + animation: rotating 2s linear infinite; +} + +#help-button > a { + text-align: center; + /* Rare exception to specifying font sizes in rem. Since this is acting + as an icon, it's okay to specify their sizes in pixels. */ + font-size: 20px; + padding-top: 2px; +} + +kbd { + display: inline-block; + padding: 3px 5px; + font: 15px monospace; + line-height: 10px; + vertical-align: middle; + border: solid 1px var(--border-color); + border-radius: 3px; + cursor: default; +} + +ul.all-items > li { + list-style: none; +} + +details.dir-entry { + padding-left: 4px; +} + +details.dir-entry > summary::after { + content: " ►"; + position: absolute; + left: -15px; + top: 0px; + font-size: 80%; + padding: 2px 0px; + /* set width to cover gap between arrow and text */ + width: 25px; +} + +details[open].dir-entry > summary::after { + content: " ▼"; +} + +details.dir-entry > summary::-webkit-details-marker, +details.dir-entry > summary::marker { + display: none; +} + +details.dir-entry > summary { + margin: 0 0 0 13px; + list-style: none; + cursor: pointer; + position: relative; +} + +details.dir-entry div.folders, details.dir-entry div.files { + padding-left: 23px; +} + +details.dir-entry a { + display: block; +} + +/* We use CSS containment on the details elements because most sizeable elements + of the page are contained in one of these. This also makes re-rendering + faster on document changes (like closing and opening toggles). + Unfortunately we can't yet specify contain: content or contain: strict + because the [-]/[+] toggles extend past the boundaries of the
    + https://developer.mozilla.org/en-US/docs/Web/CSS/contain */ +details.rustdoc-toggle { + contain: layout; + position: relative; +} + +/* The hideme class is used on summary tags that contain a span with + placeholder text shown only when the toggle is closed. For instance, + "Expand description" or "Show methods". */ +details.rustdoc-toggle > summary.hideme { + cursor: pointer; +} + +details.rustdoc-toggle > summary { + list-style: none; + /* focus outline is shown on `::before` instead of this */ + outline: none; +} +details.rustdoc-toggle > summary::-webkit-details-marker, +details.rustdoc-toggle > summary::marker { + display: none; +} + +details.rustdoc-toggle > summary.hideme > span { + margin-left: 9px; +} + +details.rustdoc-toggle > summary::before { + content: ""; + cursor: pointer; + width: 16px; + height: 16px; + background-repeat: no-repeat; + background-position: top left; + display: inline-block; + vertical-align: middle; + opacity: .5; +} + +details.rustdoc-toggle > summary.hideme > span, +.more-examples-toggle summary, .more-examples-toggle .hide-more { + color: var(--toggles-color); +} + +/* Screen readers see the text version at the end the line. + Visual readers see the icon at the start of the line, but small and transparent. */ +details.rustdoc-toggle > summary::after { + content: "Expand"; + overflow: hidden; + width: 0; + height: 0; + position: absolute; +} + +details.rustdoc-toggle > summary.hideme::after { + /* "hideme" toggles already have a description when they're contracted */ + content: ""; +} + +details.rustdoc-toggle > summary:focus::before, +details.rustdoc-toggle > summary:hover::before { + opacity: 1; +} + +details.rustdoc-toggle > summary:focus-visible::before { + /* The SVG is black, and gets turned white using a filter in the dark themes. + Do the same with the outline. + The dotted 1px style is copied from Firefox's focus ring style. + */ + outline: 1px dotted #000; + outline-offset: 1px; +} + +details.rustdoc-toggle.top-doc > summary, +details.rustdoc-toggle.top-doc > summary::before, +details.rustdoc-toggle.non-exhaustive > summary, +details.rustdoc-toggle.non-exhaustive > summary::before { + font-size: 1rem; +} + +details.non-exhaustive { + margin-bottom: 8px; +} + +details.rustdoc-toggle > summary.hideme::before { + position: relative; +} + +details.rustdoc-toggle > summary:not(.hideme)::before { + position: absolute; + left: -24px; + top: 4px; +} + +.impl-items > details.rustdoc-toggle > summary:not(.hideme)::before { + position: absolute; + left: -24px; +} + +/* When a "hideme" summary is open and the "Expand description" or "Show + methods" text is hidden, we want the [-] toggle that remains to not + affect the layout of the items to its right. To do that, we use + absolute positioning. Note that we also set position: relative + on the parent
    to make this work properly. */ +details.rustdoc-toggle[open] > summary.hideme { + position: absolute; +} + +details.rustdoc-toggle[open] > summary.hideme > span { + display: none; +} + +details.rustdoc-toggle[open] > summary::before, +details.rustdoc-toggle[open] > summary.hideme::before { + background-image: url("toggle-minus-31bbd6e4c77f5c96.svg"); +} + +details.rustdoc-toggle > summary::before { + background-image: url("toggle-plus-1092eb4930d581b0.svg"); +} + +details.rustdoc-toggle[open] > summary::before, +details.rustdoc-toggle[open] > summary.hideme::before { + width: 16px; + height: 16px; + background-repeat: no-repeat; + background-position: top left; + display: inline-block; + content: ""; +} + +details.rustdoc-toggle[open] > summary::after, +details.rustdoc-toggle[open] > summary.hideme::after { + content: "Collapse"; +} + +/* This is needed in docblocks to have the "▶" element to be on the same line. */ +.docblock summary > * { + display: inline-block; +} + +/* In case there is no documentation before a code block, we need to add some margin at the top +to prevent an overlay between the "collapse toggle" and the information tooltip. +However, it's not needed with smaller screen width because the doc/code block is always put +"one line" below. */ +.docblock > .example-wrap:first-child .tooltip { + margin-top: 16px; +} + +/* Media Queries */ + +/* +WARNING: RUSTDOC_MOBILE_BREAKPOINT MEDIA QUERY +If you update this line, then you also need to update the line with the same warning +in storage.js +*/ +@media (max-width: 700px) { + /* When linking to an item with an `id` (for instance, by clicking a link in the sidebar, + or visiting a URL with a fragment like `#method.new`, we don't want the item to be obscured + by the topbar. Anything with an `id` gets scroll-margin-top equal to .mobile-topbar's size. + */ + *[id] { + scroll-margin-top: 45px; + } + + .rustdoc { + /* Sidebar should overlay main content, rather than pushing main content to the right. + Turn off `display: flex` on the body element. */ + display: block; + } + + main { + padding-left: 15px; + padding-top: 0px; + } + + .main-heading { + flex-direction: column; + } + + .out-of-band { + text-align: left; + margin-left: initial; + padding: initial; + } + + .out-of-band .since::before { + content: "Since "; + } + + #copy-path { + display: none; + } + + /* Hide the logo and item name from the sidebar. Those are displayed + in the mobile-topbar instead. */ + .sidebar .sidebar-logo, + .sidebar .location { + display: none; + } + + .sidebar { + position: fixed; + top: 45px; + /* Hide the sidebar offscreen while not in use. Doing this instead of display: none means + the sidebar stays visible for screen readers, which is useful for navigation. */ + left: -1000px; + margin: 0; + padding: 0; + z-index: 11; + /* Reduce height slightly to account for mobile topbar. */ + height: calc(100vh - 45px); + } + + /* The source view uses a different design for the sidebar toggle, and doesn't have a topbar, + so don't bump down the main content or the sidebar. */ + .source main, + .rustdoc.source .sidebar { + top: 0; + padding: 0; + height: 100vh; + border: 0; + } + + .sidebar.shown, + .source-sidebar-expanded .source .sidebar, + .sidebar:focus-within { + left: 0; + } + + .rustdoc.source > .sidebar { + width: 0; + } + + .mobile-topbar h2 { + padding-bottom: 0; + margin: auto 0.5em auto auto; + overflow: hidden; + /* Rare exception to specifying font sizes in rem. Since the topbar + height is specified in pixels, this also has to be specified in + pixels to avoid overflowing the topbar when the user sets a bigger + font size. */ + font-size: 24px; + } + + .mobile-topbar h2 a { + display: block; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } + + .mobile-topbar .logo-container > img { + max-width: 35px; + max-height: 35px; + margin: 5px 0 5px 20px; + } + + .mobile-topbar { + display: flex; + flex-direction: row; + position: sticky; + z-index: 10; + font-size: 2rem; + height: 45px; + width: 100%; + left: 0; + top: 0; + } + + .sidebar-menu-toggle { + width: 45px; + /* Rare exception to specifying font sizes in rem. Since this is acting + as an icon, it's okay to specify its sizes in pixels. */ + font-size: 32px; + border: none; + color: var(--main-color); + } + + .sidebar-elems { + margin-top: 1em; + } + + .content { + margin-left: 0px; + } + + .anchor { + display: none !important; + } + + #titles > button > div.count { + display: block; + } + + #main-content > details.rustdoc-toggle > summary::before, + #main-content > div > details.rustdoc-toggle > summary::before { + left: -11px; + } + + #sidebar-toggle { + position: fixed; + left: 1px; + top: 100px; + width: 30px; + font-size: 1.5rem; + text-align: center; + padding: 0; + z-index: 10; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + cursor: pointer; + border: 1px solid; + border-left: 0; + } + + .source-sidebar-expanded #sidebar-toggle { + left: unset; + top: unset; + width: unset; + border-top-right-radius: unset; + border-bottom-right-radius: unset; + position: sticky; + border: 0; + border-bottom: 1px solid; + } + + .notable-traits .notable-traits-tooltiptext { + left: 0; + top: 100%; + } + + /* We don't display the help button on mobile devices. */ + #help-button { + display: none; + } + + /* Display an alternating layout on tablets and phones */ + .item-table, .item-row, .item-left, .item-right, + .search-results > a, .search-results > a > div { + display: block; + } + + /* Display an alternating layout on tablets and phones */ + .search-results > a { + padding: 5px 0px; + } + .search-results > a > div.desc, .item-right { + padding-left: 2em; + } + + .source-sidebar-expanded .source .sidebar { + max-width: 100vw; + width: 100vw; + } + + /* Position of the "[-]" element. */ + details.rustdoc-toggle:not(.top-doc) > summary { + margin-left: 10px; + } + .impl-items > details.rustdoc-toggle > summary:not(.hideme)::before, + #main-content > details.rustdoc-toggle:not(.top-doc) > summary::before, + #main-content > div > details.rustdoc-toggle > summary::before { + left: -11px; + } + + /* Align summary-nested and unnested item-info gizmos. */ + .impl-items > .item-info { + margin-left: 34px; + } + + .source nav.sub { + margin: 0; + padding: 8px; + } +} + +@media print { + nav.sidebar, nav.sub, .out-of-band, a.srclink, #copy-path, + details.rustdoc-toggle[open] > summary::before, details.rustdoc-toggle > summary::before, + details.rustdoc-toggle.top-doc > summary { + display: none; + } + + .docblock { + margin-left: 0; + } + + main { + padding: 10px; + } +} + +@media (max-width: 464px) { + .docblock { + margin-left: 12px; + } + + .docblock code { + overflow-wrap: break-word; + overflow-wrap: anywhere; + } + + nav.sub { + flex-direction: column; + } + + .search-form { + align-self: stretch; + } + + .sub-logo-container > img { + height: 35px; + width: 35px; + } + + #sidebar-toggle { + top: 10px; + } + .source-sidebar-expanded #sidebar-toggle { + top: unset; + } +} + +.implementors-toggle > summary, +.impl, +#implementors-list > .docblock, +.impl-items > section, +.impl-items > .rustdoc-toggle > summary, +.methods > section, +.methods > .rustdoc-toggle > summary +{ + margin-bottom: 0.75em; +} + +.impl-items > .rustdoc-toggle[open]:not(:last-child), +.methods > .rustdoc-toggle[open]:not(:last-child), +.implementors-toggle[open]:not(:last-child) { + margin-bottom: 2em; +} + +#trait-implementations-list .impl-items > .rustdoc-toggle:not(:last-child), +#synthetic-implementations-list .impl-items > .rustdoc-toggle:not(:last-child), +#blanket-implementations-list .impl-items > .rustdoc-toggle:not(:last-child) { + margin-bottom: 1em; +} + +/* Begin: styles for --scrape-examples feature */ + +.scraped-example-list .scrape-help { + margin-left: 10px; + padding: 0 4px; + font-weight: normal; + font-size: 12px; + position: relative; + bottom: 1px; + background: transparent; + border-width: 1px; + border-style: solid; + border-radius: 50px; +} + +.scraped-example .code-wrapper { + position: relative; + display: flex; + flex-direction: row; + flex-wrap: wrap; + width: 100%; +} + +.scraped-example:not(.expanded) .code-wrapper { + max-height: 240px; +} + +.scraped-example:not(.expanded) .code-wrapper pre { + overflow-y: hidden; + max-height: 240px; + padding-bottom: 0; +} + +.scraped-example .code-wrapper .next, +.scraped-example .code-wrapper .prev, +.scraped-example .code-wrapper .expand { + position: absolute; + top: 0.25em; + z-index: 1; + cursor: pointer; +} +.scraped-example .code-wrapper .prev { + right: 2.25em; +} +.scraped-example .code-wrapper .next { + right: 1.25em; +} +.scraped-example .code-wrapper .expand { + right: 0.25em; +} + +.scraped-example:not(.expanded) .code-wrapper:before, +.scraped-example:not(.expanded) .code-wrapper:after { + content: " "; + width: 100%; + height: 5px; + position: absolute; + z-index: 1; +} +.scraped-example:not(.expanded) .code-wrapper:before { + top: 0; +} +.scraped-example:not(.expanded) .code-wrapper:after { + bottom: 0; +} + +.scraped-example .code-wrapper .src-line-numbers { + margin: 0; + padding: 14px 0; +} + +.scraped-example .code-wrapper .src-line-numbers span { + padding: 0 14px; +} + +.scraped-example .code-wrapper .example-wrap { + flex: 1; + overflow-x: auto; + overflow-y: hidden; + margin-bottom: 0; +} + +.scraped-example:not(.expanded) .code-wrapper .example-wrap { + overflow-x: hidden; +} + +.scraped-example .code-wrapper .example-wrap pre.rust { + overflow-x: inherit; + width: inherit; + overflow-y: hidden; +} + + +.more-examples-toggle { + max-width: calc(100% + 25px); + margin-top: 10px; + margin-left: -25px; +} + +.more-examples-toggle .hide-more { + margin-left: 25px; + margin-bottom: 5px; + cursor: pointer; +} + +.more-scraped-examples { + margin-left: 5px; + display: flex; + flex-direction: row; +} + +.more-scraped-examples-inner { + /* 20px is width of toggle-line + toggle-line-inner */ + width: calc(100% - 20px); +} + +.toggle-line { + align-self: stretch; + margin-right: 10px; + margin-top: 5px; + padding: 0 4px; + cursor: pointer; +} + +.toggle-line-inner { + min-width: 2px; + height: 100%; +} + +.more-scraped-examples .scraped-example { + margin-bottom: 20px; +} + +.more-scraped-examples .scraped-example:last-child { + margin-bottom: 0; +} + +.example-links a { + margin-top: 20px; +} + +.example-links ul { + margin-bottom: 0; +} + +/* End: styles for --scrape-examples feature */ diff --git a/static.files/scrape-examples-1f45318ad6bd2a81.js b/static.files/scrape-examples-1f45318ad6bd2a81.js new file mode 100644 index 000000000..d0fd115fd --- /dev/null +++ b/static.files/scrape-examples-1f45318ad6bd2a81.js @@ -0,0 +1,106 @@ +/* global addClass, hasClass, removeClass, onEachLazy */ + +"use strict"; + +(function() { + // Number of lines shown when code viewer is not expanded + const MAX_LINES = 10; + + // Scroll code block to the given code location + function scrollToLoc(elt, loc) { + const lines = elt.querySelector(".src-line-numbers"); + let scrollOffset; + + // If the block is greater than the size of the viewer, + // then scroll to the top of the block. Otherwise scroll + // to the middle of the block. + if (loc[1] - loc[0] > MAX_LINES) { + const line = Math.max(0, loc[0] - 1); + scrollOffset = lines.children[line].offsetTop; + } else { + const wrapper = elt.querySelector(".code-wrapper"); + const halfHeight = wrapper.offsetHeight / 2; + const offsetMid = (lines.children[loc[0]].offsetTop + + lines.children[loc[1]].offsetTop) / 2; + scrollOffset = offsetMid - halfHeight; + } + + lines.scrollTo(0, scrollOffset); + elt.querySelector(".rust").scrollTo(0, scrollOffset); + } + + function updateScrapedExample(example) { + const locs = JSON.parse(example.attributes.getNamedItem("data-locs").textContent); + let locIndex = 0; + const highlights = Array.prototype.slice.call(example.querySelectorAll(".highlight")); + const link = example.querySelector(".scraped-example-title a"); + + if (locs.length > 1) { + // Toggle through list of examples in a given file + const onChangeLoc = changeIndex => { + removeClass(highlights[locIndex], "focus"); + changeIndex(); + scrollToLoc(example, locs[locIndex][0]); + addClass(highlights[locIndex], "focus"); + + const url = locs[locIndex][1]; + const title = locs[locIndex][2]; + + link.href = url; + link.innerHTML = title; + }; + + example.querySelector(".prev") + .addEventListener("click", () => { + onChangeLoc(() => { + locIndex = (locIndex - 1 + locs.length) % locs.length; + }); + }); + + example.querySelector("next") + .addEventListener("click", () => { + onChangeLoc(() => { + locIndex = (locIndex + 1) % locs.length; + }); + }); + } + + const expandButton = example.querySelector(".expand"); + if (expandButton) { + expandButton.addEventListener("click", () => { + if (hasClass(example, "expanded")) { + removeClass(example, "expanded"); + scrollToLoc(example, locs[0][0]); + } else { + addClass(example, "expanded"); + } + }); + } + + // Start with the first example in view + scrollToLoc(example, locs[0][0]); + } + + const firstExamples = document.querySelectorAll(".scraped-example-list > .scraped-example"); + onEachLazy(firstExamples, updateScrapedExample); + onEachLazy(document.querySelectorAll(".more-examples-toggle"), toggle => { + // Allow users to click the left border of the
    section to close it, + // since the section can be large and finding the [+] button is annoying. + onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"), button => { + button.addEventListener("click", () => { + toggle.open = false; + }); + }); + + const moreExamples = toggle.querySelectorAll(".scraped-example"); + toggle.querySelector("summary").addEventListener("click", () => { + // Wrapping in setTimeout ensures the update happens after the elements are actually + // visible. This is necessary since updateScrapedExample calls scrollToLoc which + // depends on offsetHeight, a property that requires an element to be visible to + // compute correctly. + setTimeout(() => { + onEachLazy(moreExamples, updateScrapedExample); + }); + }, {once: true}); + }); +})(); diff --git a/static.files/search-39ee4160c7dc16c9.js b/static.files/search-39ee4160c7dc16c9.js new file mode 100644 index 000000000..dd0531c5e --- /dev/null +++ b/static.files/search-39ee4160c7dc16c9.js @@ -0,0 +1,2280 @@ +/* global addClass, getNakedUrl, getSettingValue */ +/* global onEachLazy, removeClass, searchState, browserSupportsHistoryApi, exports */ + +"use strict"; + +(function() { +// This mapping table should match the discriminants of +// `rustdoc::formats::item_type::ItemType` type in Rust. +const itemTypes = [ + "mod", + "externcrate", + "import", + "struct", + "enum", + "fn", + "type", + "static", + "trait", + "impl", + "tymethod", + "method", + "structfield", + "variant", + "macro", + "primitive", + "associatedtype", + "constant", + "associatedconstant", + "union", + "foreigntype", + "keyword", + "existential", + "attr", + "derive", + "traitalias", +]; + +// used for special search precedence +const TY_PRIMITIVE = itemTypes.indexOf("primitive"); +const TY_KEYWORD = itemTypes.indexOf("keyword"); +const ROOT_PATH = typeof window !== "undefined" ? window.rootPath : "../"; + +function hasOwnPropertyRustdoc(obj, property) { + return Object.prototype.hasOwnProperty.call(obj, property); +} + +// In the search display, allows to switch between tabs. +function printTab(nb) { + let iter = 0; + let foundCurrentTab = false; + let foundCurrentResultSet = false; + onEachLazy(document.getElementById("titles").childNodes, elem => { + if (nb === iter) { + addClass(elem, "selected"); + foundCurrentTab = true; + } else { + removeClass(elem, "selected"); + } + iter += 1; + }); + iter = 0; + onEachLazy(document.getElementById("results").childNodes, elem => { + if (nb === iter) { + addClass(elem, "active"); + foundCurrentResultSet = true; + } else { + removeClass(elem, "active"); + } + iter += 1; + }); + if (foundCurrentTab && foundCurrentResultSet) { + searchState.currentTab = nb; + } else if (nb !== 0) { + printTab(0); + } +} + +/** + * A function to compute the Levenshtein distance between two strings + * Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported + * Full License can be found at http://creativecommons.org/licenses/by-sa/3.0/legalcode + * This code is an unmodified version of the code written by Marco de Wit + * and was found at https://stackoverflow.com/a/18514751/745719 + */ +const levenshtein_row2 = []; +function levenshtein(s1, s2) { + if (s1 === s2) { + return 0; + } + const s1_len = s1.length, s2_len = s2.length; + if (s1_len && s2_len) { + let i1 = 0, i2 = 0, a, b, c, c2; + const row = levenshtein_row2; + while (i1 < s1_len) { + row[i1] = ++i1; + } + while (i2 < s2_len) { + c2 = s2.charCodeAt(i2); + a = i2; + ++i2; + b = i2; + for (i1 = 0; i1 < s1_len; ++i1) { + c = a + (s1.charCodeAt(i1) !== c2 ? 1 : 0); + a = row[i1]; + b = b < a ? (b < c ? b + 1 : c) : (a < c ? a + 1 : c); + row[i1] = b; + } + } + return b; + } + return s1_len + s2_len; +} + +function initSearch(rawSearchIndex) { + const MAX_LEV_DISTANCE = 3; + const MAX_RESULTS = 200; + const NO_TYPE_FILTER = -1; + /** + * @type {Array} + */ + let searchIndex; + let currentResults; + const ALIASES = Object.create(null); + + function isWhitespace(c) { + return " \t\n\r".indexOf(c) !== -1; + } + + function isSpecialStartCharacter(c) { + return "<\"".indexOf(c) !== -1; + } + + function isEndCharacter(c) { + return ",>-".indexOf(c) !== -1; + } + + function isStopCharacter(c) { + return isWhitespace(c) || isEndCharacter(c); + } + + function isErrorCharacter(c) { + return "()".indexOf(c) !== -1; + } + + function itemTypeFromName(typename) { + for (let i = 0, len = itemTypes.length; i < len; ++i) { + if (itemTypes[i] === typename) { + return i; + } + } + + throw new Error("Unknown type filter `" + typename + "`"); + } + + /** + * If we encounter a `"`, then we try to extract the string from it until we find another `"`. + * + * This function will throw an error in the following cases: + * * There is already another string element. + * * We are parsing a generic argument. + * * There is more than one element. + * * There is no closing `"`. + * + * @param {ParsedQuery} query + * @param {ParserState} parserState + * @param {boolean} isInGenerics + */ + function getStringElem(query, parserState, isInGenerics) { + if (isInGenerics) { + throw new Error("`\"` cannot be used in generics"); + } else if (query.literalSearch) { + throw new Error("Cannot have more than one literal search element"); + } else if (parserState.totalElems - parserState.genericsElems > 0) { + throw new Error("Cannot use literal search when there is more than one element"); + } + parserState.pos += 1; + const start = parserState.pos; + const end = getIdentEndPosition(parserState); + if (parserState.pos >= parserState.length) { + throw new Error("Unclosed `\"`"); + } else if (parserState.userQuery[end] !== "\"") { + throw new Error(`Unexpected \`${parserState.userQuery[end]}\` in a string element`); + } else if (start === end) { + throw new Error("Cannot have empty string element"); + } + // To skip the quote at the end. + parserState.pos += 1; + query.literalSearch = true; + } + + /** + * Returns `true` if the current parser position is starting with "::". + * + * @param {ParserState} parserState + * + * @return {boolean} + */ + function isPathStart(parserState) { + return parserState.userQuery.slice(parserState.pos, parserState.pos + 2) === "::"; + } + + /** + * Returns `true` if the current parser position is starting with "->". + * + * @param {ParserState} parserState + * + * @return {boolean} + */ + function isReturnArrow(parserState) { + return parserState.userQuery.slice(parserState.pos, parserState.pos + 2) === "->"; + } + + /** + * Returns `true` if the given `c` character is valid for an ident. + * + * @param {string} c + * + * @return {boolean} + */ + function isIdentCharacter(c) { + return ( + c === "_" || + (c >= "0" && c <= "9") || + (c >= "a" && c <= "z") || + (c >= "A" && c <= "Z")); + } + + /** + * Returns `true` if the given `c` character is a separator. + * + * @param {string} c + * + * @return {boolean} + */ + function isSeparatorCharacter(c) { + return c === "," || isWhitespaceCharacter(c); + } + + /** + * Returns `true` if the given `c` character is a whitespace. + * + * @param {string} c + * + * @return {boolean} + */ + function isWhitespaceCharacter(c) { + return c === " " || c === "\t"; + } + + /** + * @param {ParsedQuery} query + * @param {ParserState} parserState + * @param {string} name - Name of the query element. + * @param {Array} generics - List of generics of this query element. + * + * @return {QueryElement} - The newly created `QueryElement`. + */ + function createQueryElement(query, parserState, name, generics, isInGenerics) { + if (name === "*" || (name.length === 0 && generics.length === 0)) { + return; + } + if (query.literalSearch && parserState.totalElems - parserState.genericsElems > 0) { + throw new Error("You cannot have more than one element if you use quotes"); + } + const pathSegments = name.split("::"); + if (pathSegments.length > 1) { + for (let i = 0, len = pathSegments.length; i < len; ++i) { + const pathSegment = pathSegments[i]; + + if (pathSegment.length === 0) { + if (i === 0) { + throw new Error("Paths cannot start with `::`"); + } else if (i + 1 === len) { + throw new Error("Paths cannot end with `::`"); + } + throw new Error("Unexpected `::::`"); + } + } + } + // In case we only have something like `

    `, there is no name. + if (pathSegments.length === 0 || (pathSegments.length === 1 && pathSegments[0] === "")) { + throw new Error("Found generics without a path"); + } + parserState.totalElems += 1; + if (isInGenerics) { + parserState.genericsElems += 1; + } + return { + name: name, + fullPath: pathSegments, + pathWithoutLast: pathSegments.slice(0, pathSegments.length - 1), + pathLast: pathSegments[pathSegments.length - 1], + generics: generics, + }; + } + + /** + * This function goes through all characters until it reaches an invalid ident character or the + * end of the query. It returns the position of the last character of the ident. + * + * @param {ParserState} parserState + * + * @return {integer} + */ + function getIdentEndPosition(parserState) { + let end = parserState.pos; + let foundExclamation = false; + while (parserState.pos < parserState.length) { + const c = parserState.userQuery[parserState.pos]; + if (!isIdentCharacter(c)) { + if (c === "!") { + if (foundExclamation) { + throw new Error("Cannot have more than one `!` in an ident"); + } else if (parserState.pos + 1 < parserState.length && + isIdentCharacter(parserState.userQuery[parserState.pos + 1]) + ) { + throw new Error("`!` can only be at the end of an ident"); + } + foundExclamation = true; + } else if (isErrorCharacter(c)) { + throw new Error(`Unexpected \`${c}\``); + } else if ( + isStopCharacter(c) || + isSpecialStartCharacter(c) || + isSeparatorCharacter(c) + ) { + break; + } else if (c === ":") { // If we allow paths ("str::string" for example). + if (!isPathStart(parserState)) { + break; + } + // Skip current ":". + parserState.pos += 1; + foundExclamation = false; + } else { + throw new Error(`Unexpected \`${c}\``); + } + } + parserState.pos += 1; + end = parserState.pos; + } + return end; + } + + /** + * @param {ParsedQuery} query + * @param {ParserState} parserState + * @param {Array} elems - This is where the new {QueryElement} will be added. + * @param {boolean} isInGenerics + */ + function getNextElem(query, parserState, elems, isInGenerics) { + const generics = []; + + let start = parserState.pos; + let end; + // We handle the strings on their own mostly to make code easier to follow. + if (parserState.userQuery[parserState.pos] === "\"") { + start += 1; + getStringElem(query, parserState, isInGenerics); + end = parserState.pos - 1; + } else { + end = getIdentEndPosition(parserState); + } + if (parserState.pos < parserState.length && + parserState.userQuery[parserState.pos] === "<" + ) { + if (isInGenerics) { + throw new Error("Unexpected `<` after `<`"); + } else if (start >= end) { + throw new Error("Found generics without a path"); + } + parserState.pos += 1; + getItemsBefore(query, parserState, generics, ">"); + } + if (start >= end && generics.length === 0) { + return; + } + elems.push( + createQueryElement( + query, + parserState, + parserState.userQuery.slice(start, end), + generics, + isInGenerics + ) + ); + } + + /** + * This function parses the next query element until it finds `endChar`, calling `getNextElem` + * to collect each element. + * + * If there is no `endChar`, this function will implicitly stop at the end without raising an + * error. + * + * @param {ParsedQuery} query + * @param {ParserState} parserState + * @param {Array} elems - This is where the new {QueryElement} will be added. + * @param {string} endChar - This function will stop when it'll encounter this + * character. + */ + function getItemsBefore(query, parserState, elems, endChar) { + let foundStopChar = true; + + while (parserState.pos < parserState.length) { + const c = parserState.userQuery[parserState.pos]; + if (c === endChar) { + break; + } else if (isSeparatorCharacter(c)) { + parserState.pos += 1; + foundStopChar = true; + continue; + } else if (c === ":" && isPathStart(parserState)) { + throw new Error("Unexpected `::`: paths cannot start with `::`"); + } else if (c === ":" || isEndCharacter(c)) { + let extra = ""; + if (endChar === ">") { + extra = "`<`"; + } else if (endChar === "") { + extra = "`->`"; + } + throw new Error("Unexpected `" + c + "` after " + extra); + } + if (!foundStopChar) { + if (endChar !== "") { + throw new Error(`Expected \`,\`, \` \` or \`${endChar}\`, found \`${c}\``); + } + throw new Error(`Expected \`,\` or \` \`, found \`${c}\``); + } + const posBefore = parserState.pos; + getNextElem(query, parserState, elems, endChar === ">"); + // This case can be encountered if `getNextElem` encountered a "stop character" right + // from the start. For example if you have `,,` or `<>`. In this case, we simply move up + // the current position to continue the parsing. + if (posBefore === parserState.pos) { + parserState.pos += 1; + } + foundStopChar = false; + } + // We are either at the end of the string or on the `endChar`` character, let's move forward + // in any case. + parserState.pos += 1; + } + + /** + * Checks that the type filter doesn't have unwanted characters like `<>` (which are ignored + * if empty). + * + * @param {ParserState} parserState + */ + function checkExtraTypeFilterCharacters(parserState) { + const query = parserState.userQuery; + + for (let pos = 0; pos < parserState.pos; ++pos) { + if (!isIdentCharacter(query[pos]) && !isWhitespaceCharacter(query[pos])) { + throw new Error(`Unexpected \`${query[pos]}\` in type filter`); + } + } + } + + /** + * Parses the provided `query` input to fill `parserState`. If it encounters an error while + * parsing `query`, it'll throw an error. + * + * @param {ParsedQuery} query + * @param {ParserState} parserState + */ + function parseInput(query, parserState) { + let c, before; + let foundStopChar = true; + + while (parserState.pos < parserState.length) { + c = parserState.userQuery[parserState.pos]; + if (isStopCharacter(c)) { + foundStopChar = true; + if (isSeparatorCharacter(c)) { + parserState.pos += 1; + continue; + } else if (c === "-" || c === ">") { + if (isReturnArrow(parserState)) { + break; + } + throw new Error(`Unexpected \`${c}\` (did you mean \`->\`?)`); + } + throw new Error(`Unexpected \`${c}\``); + } else if (c === ":" && !isPathStart(parserState)) { + if (parserState.typeFilter !== null) { + throw new Error("Unexpected `:`"); + } + if (query.elems.length === 0) { + throw new Error("Expected type filter before `:`"); + } else if (query.elems.length !== 1 || parserState.totalElems !== 1) { + throw new Error("Unexpected `:`"); + } else if (query.literalSearch) { + throw new Error("You cannot use quotes on type filter"); + } + checkExtraTypeFilterCharacters(parserState); + // The type filter doesn't count as an element since it's a modifier. + parserState.typeFilter = query.elems.pop().name; + parserState.pos += 1; + parserState.totalElems = 0; + query.literalSearch = false; + foundStopChar = true; + continue; + } + if (!foundStopChar) { + if (parserState.typeFilter !== null) { + throw new Error(`Expected \`,\`, \` \` or \`->\`, found \`${c}\``); + } + throw new Error(`Expected \`,\`, \` \`, \`:\` or \`->\`, found \`${c}\``); + } + before = query.elems.length; + getNextElem(query, parserState, query.elems, false); + if (query.elems.length === before) { + // Nothing was added, weird... Let's increase the position to not remain stuck. + parserState.pos += 1; + } + foundStopChar = false; + } + while (parserState.pos < parserState.length) { + c = parserState.userQuery[parserState.pos]; + if (isReturnArrow(parserState)) { + parserState.pos += 2; + // Get returned elements. + getItemsBefore(query, parserState, query.returned, ""); + // Nothing can come afterward! + if (query.returned.length === 0) { + throw new Error("Expected at least one item after `->`"); + } + break; + } else { + parserState.pos += 1; + } + } + } + + /** + * Takes the user search input and returns an empty `ParsedQuery`. + * + * @param {string} userQuery + * + * @return {ParsedQuery} + */ + function newParsedQuery(userQuery) { + return { + original: userQuery, + userQuery: userQuery.toLowerCase(), + typeFilter: NO_TYPE_FILTER, + elems: [], + returned: [], + // Total number of "top" elements (does not include generics). + foundElems: 0, + literalSearch: false, + error: null, + }; + } + + /** + * Build an URL with search parameters. + * + * @param {string} search - The current search being performed. + * @param {string|null} filterCrates - The current filtering crate (if any). + * + * @return {string} + */ + function buildUrl(search, filterCrates) { + let extra = "?search=" + encodeURIComponent(search); + + if (filterCrates !== null) { + extra += "&filter-crate=" + encodeURIComponent(filterCrates); + } + return getNakedUrl() + extra + window.location.hash; + } + + /** + * Return the filtering crate or `null` if there is none. + * + * @return {string|null} + */ + function getFilterCrates() { + const elem = document.getElementById("crate-search"); + + if (elem && + elem.value !== "all crates" && + hasOwnPropertyRustdoc(rawSearchIndex, elem.value) + ) { + return elem.value; + } + return null; + } + + /** + * Parses the query. + * + * The supported syntax by this parser is as follow: + * + * ident = *(ALPHA / DIGIT / "_") [!] + * path = ident *(DOUBLE-COLON ident) + * arg = path [generics] + * arg-without-generic = path + * type-sep = COMMA/WS *(COMMA/WS) + * nonempty-arg-list = *(type-sep) arg *(type-sep arg) *(type-sep) + * nonempty-arg-list-without-generics = *(type-sep) arg-without-generic + * *(type-sep arg-without-generic) *(type-sep) + * generics = OPEN-ANGLE-BRACKET [ nonempty-arg-list-without-generics ] *(type-sep) + * CLOSE-ANGLE-BRACKET/EOF + * return-args = RETURN-ARROW *(type-sep) nonempty-arg-list + * + * exact-search = [type-filter *WS COLON] [ RETURN-ARROW ] *WS QUOTE ident QUOTE [ generics ] + * type-search = [type-filter *WS COLON] [ nonempty-arg-list ] [ return-args ] + * + * query = *WS (exact-search / type-search) *WS + * + * type-filter = ( + * "mod" / + * "externcrate" / + * "import" / + * "struct" / + * "enum" / + * "fn" / + * "type" / + * "static" / + * "trait" / + * "impl" / + * "tymethod" / + * "method" / + * "structfield" / + * "variant" / + * "macro" / + * "primitive" / + * "associatedtype" / + * "constant" / + * "associatedconstant" / + * "union" / + * "foreigntype" / + * "keyword" / + * "existential" / + * "attr" / + * "derive" / + * "traitalias") + * + * OPEN-ANGLE-BRACKET = "<" + * CLOSE-ANGLE-BRACKET = ">" + * COLON = ":" + * DOUBLE-COLON = "::" + * QUOTE = %x22 + * COMMA = "," + * RETURN-ARROW = "->" + * + * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z + * DIGIT = %x30-39 + * WS = %x09 / " " + * + * @param {string} val - The user query + * + * @return {ParsedQuery} - The parsed query + */ + function parseQuery(userQuery) { + userQuery = userQuery.trim(); + const parserState = { + length: userQuery.length, + pos: 0, + // Total number of elements (includes generics). + totalElems: 0, + genericsElems: 0, + typeFilter: null, + userQuery: userQuery.toLowerCase(), + }; + let query = newParsedQuery(userQuery); + + try { + parseInput(query, parserState); + if (parserState.typeFilter !== null) { + let typeFilter = parserState.typeFilter; + if (typeFilter === "const") { + typeFilter = "constant"; + } + query.typeFilter = itemTypeFromName(typeFilter); + } + } catch (err) { + query = newParsedQuery(userQuery); + query.error = err.message; + query.typeFilter = -1; + return query; + } + + if (!query.literalSearch) { + // If there is more than one element in the query, we switch to literalSearch in any + // case. + query.literalSearch = parserState.totalElems > 1; + } + query.foundElems = query.elems.length + query.returned.length; + return query; + } + + /** + * Creates the query results. + * + * @param {Array} results_in_args + * @param {Array} results_returned + * @param {Array} results_in_args + * @param {ParsedQuery} parsedQuery + * + * @return {ResultsTable} + */ + function createQueryResults(results_in_args, results_returned, results_others, parsedQuery) { + return { + "in_args": results_in_args, + "returned": results_returned, + "others": results_others, + "query": parsedQuery, + }; + } + + /** + * Executes the parsed query and builds a {ResultsTable}. + * + * @param {ParsedQuery} parsedQuery - The parsed user query + * @param {Object} searchWords - The list of search words to query against + * @param {Object} [filterCrates] - Crate to search in if defined + * @param {Object} [currentCrate] - Current crate, to rank results from this crate higher + * + * @return {ResultsTable} + */ + function execQuery(parsedQuery, searchWords, filterCrates, currentCrate) { + const results_others = {}, results_in_args = {}, results_returned = {}; + + function transformResults(results) { + const duplicates = {}; + const out = []; + + for (const result of results) { + if (result.id > -1) { + const obj = searchIndex[result.id]; + obj.lev = result.lev; + const res = buildHrefAndPath(obj); + obj.displayPath = pathSplitter(res[0]); + obj.fullPath = obj.displayPath + obj.name; + // To be sure than it some items aren't considered as duplicate. + obj.fullPath += "|" + obj.ty; + + if (duplicates[obj.fullPath]) { + continue; + } + duplicates[obj.fullPath] = true; + + obj.href = res[1]; + out.push(obj); + if (out.length >= MAX_RESULTS) { + break; + } + } + } + return out; + } + + function sortResults(results, isType, preferredCrate) { + const userQuery = parsedQuery.userQuery; + const ar = []; + for (const entry in results) { + if (hasOwnPropertyRustdoc(results, entry)) { + const result = results[entry]; + result.word = searchWords[result.id]; + result.item = searchIndex[result.id] || {}; + ar.push(result); + } + } + results = ar; + // if there are no results then return to default and fail + if (results.length === 0) { + return []; + } + + results.sort((aaa, bbb) => { + let a, b; + + // sort by exact match with regard to the last word (mismatch goes later) + a = (aaa.word !== userQuery); + b = (bbb.word !== userQuery); + if (a !== b) { + return a - b; + } + + // Sort by non levenshtein results and then levenshtein results by the distance + // (less changes required to match means higher rankings) + a = (aaa.lev); + b = (bbb.lev); + if (a !== b) { + return a - b; + } + + // sort by crate (current crate comes first) + a = (aaa.item.crate !== preferredCrate); + b = (bbb.item.crate !== preferredCrate); + if (a !== b) { + return a - b; + } + + // sort by item name length (longer goes later) + a = aaa.word.length; + b = bbb.word.length; + if (a !== b) { + return a - b; + } + + // sort by item name (lexicographically larger goes later) + a = aaa.word; + b = bbb.word; + if (a !== b) { + return (a > b ? +1 : -1); + } + + // sort by index of keyword in item name (no literal occurrence goes later) + a = (aaa.index < 0); + b = (bbb.index < 0); + if (a !== b) { + return a - b; + } + // (later literal occurrence, if any, goes later) + a = aaa.index; + b = bbb.index; + if (a !== b) { + return a - b; + } + + // special precedence for primitive and keyword pages + if ((aaa.item.ty === TY_PRIMITIVE && bbb.item.ty !== TY_KEYWORD) || + (aaa.item.ty === TY_KEYWORD && bbb.item.ty !== TY_PRIMITIVE)) { + return -1; + } + if ((bbb.item.ty === TY_PRIMITIVE && aaa.item.ty !== TY_PRIMITIVE) || + (bbb.item.ty === TY_KEYWORD && aaa.item.ty !== TY_KEYWORD)) { + return 1; + } + + // sort by description (no description goes later) + a = (aaa.item.desc === ""); + b = (bbb.item.desc === ""); + if (a !== b) { + return a - b; + } + + // sort by type (later occurrence in `itemTypes` goes later) + a = aaa.item.ty; + b = bbb.item.ty; + if (a !== b) { + return a - b; + } + + // sort by path (lexicographically larger goes later) + a = aaa.item.path; + b = bbb.item.path; + if (a !== b) { + return (a > b ? +1 : -1); + } + + // que sera, sera + return 0; + }); + + let nameSplit = null; + if (parsedQuery.elems.length === 1) { + const hasPath = typeof parsedQuery.elems[0].path === "undefined"; + nameSplit = hasPath ? null : parsedQuery.elems[0].path; + } + + for (const result of results) { + // this validation does not make sense when searching by types + if (result.dontValidate) { + continue; + } + const name = result.item.name.toLowerCase(), + path = result.item.path.toLowerCase(), + parent = result.item.parent; + + if (!isType && !validateResult(name, path, nameSplit, parent)) { + result.id = -1; + } + } + return transformResults(results); + } + + /** + * This function checks if the object (`row`) generics match the given type (`elem`) + * generics. If there are no generics on `row`, `defaultLev` is returned. + * + * @param {Row} row - The object to check. + * @param {QueryElement} elem - The element from the parsed query. + * @param {integer} defaultLev - This is the value to return in case there are no generics. + * + * @return {integer} - Returns the best match (if any) or `MAX_LEV_DISTANCE + 1`. + */ + function checkGenerics(row, elem, defaultLev) { + if (row.generics.length === 0) { + return elem.generics.length === 0 ? defaultLev : MAX_LEV_DISTANCE + 1; + } else if (row.generics.length > 0 && row.generics[0].name === null) { + return checkGenerics(row.generics[0], elem, defaultLev); + } + // The names match, but we need to be sure that all generics kinda + // match as well. + let elem_name; + if (elem.generics.length > 0 && row.generics.length >= elem.generics.length) { + const elems = Object.create(null); + for (const entry of row.generics) { + elem_name = entry.name; + if (elem_name === "") { + // Pure generic, needs to check into it. + if (checkGenerics(entry, elem, MAX_LEV_DISTANCE + 1) !== 0) { + return MAX_LEV_DISTANCE + 1; + } + continue; + } + if (elems[elem_name] === undefined) { + elems[elem_name] = 0; + } + elems[elem_name] += 1; + } + // We need to find the type that matches the most to remove it in order + // to move forward. + for (const generic of elem.generics) { + let match = null; + if (elems[generic.name]) { + match = generic.name; + } else { + for (elem_name in elems) { + if (!hasOwnPropertyRustdoc(elems, elem_name)) { + continue; + } + if (elem_name === generic) { + match = elem_name; + break; + } + } + } + if (match === null) { + return MAX_LEV_DISTANCE + 1; + } + elems[match] -= 1; + if (elems[match] === 0) { + delete elems[match]; + } + } + return 0; + } + return MAX_LEV_DISTANCE + 1; + } + + /** + * This function checks if the object (`row`) matches the given type (`elem`) and its + * generics (if any). + * + * @param {Row} row + * @param {QueryElement} elem - The element from the parsed query. + * + * @return {integer} - Returns a Levenshtein distance to the best match. + */ + function checkIfInGenerics(row, elem) { + let lev = MAX_LEV_DISTANCE + 1; + for (const entry of row.generics) { + lev = Math.min(checkType(entry, elem, true), lev); + if (lev === 0) { + break; + } + } + return lev; + } + + /** + * This function checks if the object (`row`) matches the given type (`elem`) and its + * generics (if any). + * + * @param {Row} row + * @param {QueryElement} elem - The element from the parsed query. + * @param {boolean} literalSearch + * + * @return {integer} - Returns a Levenshtein distance to the best match. If there is + * no match, returns `MAX_LEV_DISTANCE + 1`. + */ + function checkType(row, elem, literalSearch) { + if (row.name === null) { + // This is a pure "generic" search, no need to run other checks. + if (row.generics.length > 0) { + return checkIfInGenerics(row, elem); + } + return MAX_LEV_DISTANCE + 1; + } + + let lev = levenshtein(row.name, elem.name); + if (literalSearch) { + if (lev !== 0) { + // The name didn't match, let's try to check if the generics do. + if (elem.generics.length === 0) { + const checkGeneric = row.generics.length > 0; + if (checkGeneric && row.generics + .findIndex(tmp_elem => tmp_elem.name === elem.name) !== -1) { + return 0; + } + } + return MAX_LEV_DISTANCE + 1; + } else if (elem.generics.length > 0) { + return checkGenerics(row, elem, MAX_LEV_DISTANCE + 1); + } + return 0; + } else if (row.generics.length > 0) { + if (elem.generics.length === 0) { + if (lev === 0) { + return 0; + } + // The name didn't match so we now check if the type we're looking for is inside + // the generics! + lev = checkIfInGenerics(row, elem); + // Now whatever happens, the returned distance is "less good" so we should mark + // it as such, and so we add 0.5 to the distance to make it "less good". + return lev + 0.5; + } else if (lev > MAX_LEV_DISTANCE) { + // So our item's name doesn't match at all and has generics. + // + // Maybe it's present in a sub generic? For example "f>>()", if we're + // looking for "B", we'll need to go down. + return checkIfInGenerics(row, elem); + } else { + // At this point, the name kinda match and we have generics to check, so + // let's go! + const tmp_lev = checkGenerics(row, elem, lev); + if (tmp_lev > MAX_LEV_DISTANCE) { + return MAX_LEV_DISTANCE + 1; + } + // We compute the median value of both checks and return it. + return (tmp_lev + lev) / 2; + } + } else if (elem.generics.length > 0) { + // In this case, we were expecting generics but there isn't so we simply reject this + // one. + return MAX_LEV_DISTANCE + 1; + } + // No generics on our query or on the target type so we can return without doing + // anything else. + return lev; + } + + /** + * This function checks if the object (`row`) has an argument with the given type (`elem`). + * + * @param {Row} row + * @param {QueryElement} elem - The element from the parsed query. + * @param {integer} typeFilter + * + * @return {integer} - Returns a Levenshtein distance to the best match. If there is no + * match, returns `MAX_LEV_DISTANCE + 1`. + */ + function findArg(row, elem, typeFilter) { + let lev = MAX_LEV_DISTANCE + 1; + + if (row && row.type && row.type.inputs && row.type.inputs.length > 0) { + for (const input of row.type.inputs) { + if (!typePassesFilter(typeFilter, input.ty)) { + continue; + } + lev = Math.min(lev, checkType(input, elem, parsedQuery.literalSearch)); + if (lev === 0) { + return 0; + } + } + } + return parsedQuery.literalSearch ? MAX_LEV_DISTANCE + 1 : lev; + } + + /** + * This function checks if the object (`row`) returns the given type (`elem`). + * + * @param {Row} row + * @param {QueryElement} elem - The element from the parsed query. + * @param {integer} typeFilter + * + * @return {integer} - Returns a Levenshtein distance to the best match. If there is no + * match, returns `MAX_LEV_DISTANCE + 1`. + */ + function checkReturned(row, elem, typeFilter) { + let lev = MAX_LEV_DISTANCE + 1; + + if (row && row.type && row.type.output.length > 0) { + const ret = row.type.output; + for (const ret_ty of ret) { + if (!typePassesFilter(typeFilter, ret_ty.ty)) { + continue; + } + lev = Math.min(lev, checkType(ret_ty, elem, parsedQuery.literalSearch)); + if (lev === 0) { + return 0; + } + } + } + return parsedQuery.literalSearch ? MAX_LEV_DISTANCE + 1 : lev; + } + + function checkPath(contains, ty) { + if (contains.length === 0) { + return 0; + } + let ret_lev = MAX_LEV_DISTANCE + 1; + const path = ty.path.split("::"); + + if (ty.parent && ty.parent.name) { + path.push(ty.parent.name.toLowerCase()); + } + + const length = path.length; + const clength = contains.length; + if (clength > length) { + return MAX_LEV_DISTANCE + 1; + } + for (let i = 0; i < length; ++i) { + if (i + clength > length) { + break; + } + let lev_total = 0; + let aborted = false; + for (let x = 0; x < clength; ++x) { + const lev = levenshtein(path[i + x], contains[x]); + if (lev > MAX_LEV_DISTANCE) { + aborted = true; + break; + } + lev_total += lev; + } + if (!aborted) { + ret_lev = Math.min(ret_lev, Math.round(lev_total / clength)); + } + } + return ret_lev; + } + + function typePassesFilter(filter, type) { + // No filter or Exact mach + if (filter <= NO_TYPE_FILTER || filter === type) return true; + + // Match related items + const name = itemTypes[type]; + switch (itemTypes[filter]) { + case "constant": + return name === "associatedconstant"; + case "fn": + return name === "method" || name === "tymethod"; + case "type": + return name === "primitive" || name === "associatedtype"; + case "trait": + return name === "traitalias"; + } + + // No match + return false; + } + + function createAliasFromItem(item) { + return { + crate: item.crate, + name: item.name, + path: item.path, + desc: item.desc, + ty: item.ty, + parent: item.parent, + type: item.type, + is_alias: true, + }; + } + + function handleAliases(ret, query, filterCrates, currentCrate) { + const lowerQuery = query.toLowerCase(); + // We separate aliases and crate aliases because we want to have current crate + // aliases to be before the others in the displayed results. + const aliases = []; + const crateAliases = []; + if (filterCrates !== null) { + if (ALIASES[filterCrates] && ALIASES[filterCrates][lowerQuery]) { + const query_aliases = ALIASES[filterCrates][lowerQuery]; + for (const alias of query_aliases) { + aliases.push(createAliasFromItem(searchIndex[alias])); + } + } + } else { + Object.keys(ALIASES).forEach(crate => { + if (ALIASES[crate][lowerQuery]) { + const pushTo = crate === currentCrate ? crateAliases : aliases; + const query_aliases = ALIASES[crate][lowerQuery]; + for (const alias of query_aliases) { + pushTo.push(createAliasFromItem(searchIndex[alias])); + } + } + }); + } + + const sortFunc = (aaa, bbb) => { + if (aaa.path < bbb.path) { + return 1; + } else if (aaa.path === bbb.path) { + return 0; + } + return -1; + }; + crateAliases.sort(sortFunc); + aliases.sort(sortFunc); + + const pushFunc = alias => { + alias.alias = query; + const res = buildHrefAndPath(alias); + alias.displayPath = pathSplitter(res[0]); + alias.fullPath = alias.displayPath + alias.name; + alias.href = res[1]; + + ret.others.unshift(alias); + if (ret.others.length > MAX_RESULTS) { + ret.others.pop(); + } + }; + + aliases.forEach(pushFunc); + crateAliases.forEach(pushFunc); + } + + /** + * This function adds the given result into the provided `results` map if it matches the + * following condition: + * + * * If it is a "literal search" (`parsedQuery.literalSearch`), then `lev` must be 0. + * * If it is not a "literal search", `lev` must be <= `MAX_LEV_DISTANCE`. + * + * The `results` map contains information which will be used to sort the search results: + * + * * `fullId` is a `string`` used as the key of the object we use for the `results` map. + * * `id` is the index in both `searchWords` and `searchIndex` arrays for this element. + * * `index` is an `integer`` used to sort by the position of the word in the item's name. + * * `lev` is the main metric used to sort the search results. + * + * @param {Results} results + * @param {string} fullId + * @param {integer} id + * @param {integer} index + * @param {integer} lev + */ + function addIntoResults(results, fullId, id, index, lev) { + if (lev === 0 || (!parsedQuery.literalSearch && lev <= MAX_LEV_DISTANCE)) { + if (results[fullId] !== undefined) { + const result = results[fullId]; + if (result.dontValidate || result.lev <= lev) { + return; + } + } + results[fullId] = { + id: id, + index: index, + dontValidate: parsedQuery.literalSearch, + lev: lev, + }; + } + } + + /** + * This function is called in case the query is only one element (with or without generics). + * This element will be compared to arguments' and returned values' items and also to items. + * + * Other important thing to note: since there is only one element, we use levenshtein + * distance for name comparisons. + * + * @param {Row} row + * @param {integer} pos - Position in the `searchIndex`. + * @param {QueryElement} elem - The element from the parsed query. + * @param {Results} results_others - Unqualified results (not in arguments nor in + * returned values). + * @param {Results} results_in_args - Matching arguments results. + * @param {Results} results_returned - Matching returned arguments results. + */ + function handleSingleArg( + row, + pos, + elem, + results_others, + results_in_args, + results_returned + ) { + if (!row || (filterCrates !== null && row.crate !== filterCrates)) { + return; + } + let lev, lev_add = 0, index = -1; + const fullId = row.id; + + const in_args = findArg(row, elem, parsedQuery.typeFilter); + const returned = checkReturned(row, elem, parsedQuery.typeFilter); + + addIntoResults(results_in_args, fullId, pos, index, in_args); + addIntoResults(results_returned, fullId, pos, index, returned); + + if (!typePassesFilter(parsedQuery.typeFilter, row.ty)) { + return; + } + const searchWord = searchWords[pos]; + + if (parsedQuery.literalSearch) { + if (searchWord === elem.name) { + addIntoResults(results_others, fullId, pos, -1, 0); + } + return; + } + + // No need to check anything else if it's a "pure" generics search. + if (elem.name.length === 0) { + if (row.type !== null) { + lev = checkGenerics(row.type, elem, MAX_LEV_DISTANCE + 1); + addIntoResults(results_others, fullId, pos, index, lev); + } + return; + } + + if (elem.fullPath.length > 1) { + lev = checkPath(elem.pathWithoutLast, row); + if (lev > MAX_LEV_DISTANCE || (parsedQuery.literalSearch && lev !== 0)) { + return; + } else if (lev > 0) { + lev_add = lev / 10; + } + } + + if (searchWord.indexOf(elem.pathLast) > -1 || + row.normalizedName.indexOf(elem.pathLast) > -1 + ) { + index = row.normalizedName.indexOf(elem.pathLast); + } + lev = levenshtein(searchWord, elem.pathLast); + if (lev > 0 && elem.pathLast.length > 2 && searchWord.indexOf(elem.pathLast) > -1) { + if (elem.pathLast.length < 6) { + lev = 1; + } else { + lev = 0; + } + } + lev += lev_add; + if (lev > MAX_LEV_DISTANCE) { + return; + } else if (index !== -1 && elem.fullPath.length < 2) { + lev -= 1; + } + if (lev < 0) { + lev = 0; + } + addIntoResults(results_others, fullId, pos, index, lev); + } + + /** + * This function is called in case the query has more than one element. In this case, it'll + * try to match the items which validates all the elements. For `aa -> bb` will look for + * functions which have a parameter `aa` and has `bb` in its returned values. + * + * @param {Row} row + * @param {integer} pos - Position in the `searchIndex`. + * @param {Object} results + */ + function handleArgs(row, pos, results) { + if (!row || (filterCrates !== null && row.crate !== filterCrates)) { + return; + } + + let totalLev = 0; + let nbLev = 0; + + // If the result is too "bad", we return false and it ends this search. + function checkArgs(elems, callback) { + for (const elem of elems) { + // There is more than one parameter to the query so all checks should be "exact" + const lev = callback(row, elem, NO_TYPE_FILTER); + if (lev <= 1) { + nbLev += 1; + totalLev += lev; + } else { + return false; + } + } + return true; + } + if (!checkArgs(parsedQuery.elems, findArg)) { + return; + } + if (!checkArgs(parsedQuery.returned, checkReturned)) { + return; + } + + if (nbLev === 0) { + return; + } + const lev = Math.round(totalLev / nbLev); + addIntoResults(results, row.id, pos, 0, lev); + } + + function innerRunQuery() { + let elem, i, nSearchWords, in_returned, row; + + if (parsedQuery.foundElems === 1) { + if (parsedQuery.elems.length === 1) { + elem = parsedQuery.elems[0]; + for (i = 0, nSearchWords = searchWords.length; i < nSearchWords; ++i) { + // It means we want to check for this element everywhere (in names, args and + // returned). + handleSingleArg( + searchIndex[i], + i, + elem, + results_others, + results_in_args, + results_returned + ); + } + } else if (parsedQuery.returned.length === 1) { + // We received one returned argument to check, so looking into returned values. + elem = parsedQuery.returned[0]; + for (i = 0, nSearchWords = searchWords.length; i < nSearchWords; ++i) { + row = searchIndex[i]; + in_returned = checkReturned(row, elem, parsedQuery.typeFilter); + addIntoResults(results_others, row.id, i, -1, in_returned); + } + } + } else if (parsedQuery.foundElems > 0) { + for (i = 0, nSearchWords = searchWords.length; i < nSearchWords; ++i) { + handleArgs(searchIndex[i], i, results_others); + } + } + } + + if (parsedQuery.error === null) { + innerRunQuery(); + } + + const ret = createQueryResults( + sortResults(results_in_args, true, currentCrate), + sortResults(results_returned, true, currentCrate), + sortResults(results_others, false, currentCrate), + parsedQuery); + handleAliases(ret, parsedQuery.original.replace(/"/g, ""), filterCrates, currentCrate); + if (parsedQuery.error !== null && ret.others.length !== 0) { + // It means some doc aliases were found so let's "remove" the error! + ret.query.error = null; + } + return ret; + } + + /** + * Validate performs the following boolean logic. For example: + * "File::open" will give IF A PARENT EXISTS => ("file" && "open") + * exists in (name || path || parent) OR => ("file" && "open") exists in + * (name || path ) + * + * This could be written functionally, but I wanted to minimise + * functions on stack. + * + * @param {string} name - The name of the result + * @param {string} path - The path of the result + * @param {string} keys - The keys to be used (["file", "open"]) + * @param {Object} parent - The parent of the result + * + * @return {boolean} - Whether the result is valid or not + */ + function validateResult(name, path, keys, parent) { + if (!keys || !keys.length) { + return true; + } + for (const key of keys) { + // each check is for validation so we negate the conditions and invalidate + if (!( + // check for an exact name match + name.indexOf(key) > -1 || + // then an exact path match + path.indexOf(key) > -1 || + // next if there is a parent, check for exact parent match + (parent !== undefined && parent.name !== undefined && + parent.name.toLowerCase().indexOf(key) > -1) || + // lastly check to see if the name was a levenshtein match + levenshtein(name, key) <= MAX_LEV_DISTANCE)) { + return false; + } + } + return true; + } + + function nextTab(direction) { + const next = (searchState.currentTab + direction + 3) % searchState.focusedByTab.length; + searchState.focusedByTab[searchState.currentTab] = document.activeElement; + printTab(next); + focusSearchResult(); + } + + // Focus the first search result on the active tab, or the result that + // was focused last time this tab was active. + function focusSearchResult() { + const target = searchState.focusedByTab[searchState.currentTab] || + document.querySelectorAll(".search-results.active a").item(0) || + document.querySelectorAll("#titles > button").item(searchState.currentTab); + if (target) { + target.focus(); + } + } + + function buildHrefAndPath(item) { + let displayPath; + let href; + const type = itemTypes[item.ty]; + const name = item.name; + let path = item.path; + + if (type === "mod") { + displayPath = path + "::"; + href = ROOT_PATH + path.replace(/::/g, "/") + "/" + + name + "/index.html"; + } else if (type === "import") { + displayPath = item.path + "::"; + href = ROOT_PATH + item.path.replace(/::/g, "/") + "/index.html#reexport." + name; + } else if (type === "primitive" || type === "keyword") { + displayPath = ""; + href = ROOT_PATH + path.replace(/::/g, "/") + + "/" + type + "." + name + ".html"; + } else if (type === "externcrate") { + displayPath = ""; + href = ROOT_PATH + name + "/index.html"; + } else if (item.parent !== undefined) { + const myparent = item.parent; + let anchor = "#" + type + "." + name; + const parentType = itemTypes[myparent.ty]; + let pageType = parentType; + let pageName = myparent.name; + + if (parentType === "primitive") { + displayPath = myparent.name + "::"; + } else if (type === "structfield" && parentType === "variant") { + // Structfields belonging to variants are special: the + // final path element is the enum name. + const enumNameIdx = item.path.lastIndexOf("::"); + const enumName = item.path.substr(enumNameIdx + 2); + path = item.path.substr(0, enumNameIdx); + displayPath = path + "::" + enumName + "::" + myparent.name + "::"; + anchor = "#variant." + myparent.name + ".field." + name; + pageType = "enum"; + pageName = enumName; + } else { + displayPath = path + "::" + myparent.name + "::"; + } + href = ROOT_PATH + path.replace(/::/g, "/") + + "/" + pageType + + "." + pageName + + ".html" + anchor; + } else { + displayPath = item.path + "::"; + href = ROOT_PATH + item.path.replace(/::/g, "/") + + "/" + type + "." + name + ".html"; + } + return [displayPath, href]; + } + + function pathSplitter(path) { + const tmp = "" + path.replace(/::/g, "::"); + if (tmp.endsWith("")) { + return tmp.slice(0, tmp.length - 6); + } + return tmp; + } + + /** + * Render a set of search results for a single tab. + * @param {Array} array - The search results for this tab + * @param {ParsedQuery} query + * @param {boolean} display - True if this is the active tab + */ + function addTab(array, query, display) { + let extraClass = ""; + if (display === true) { + extraClass = " active"; + } + + const output = document.createElement("div"); + let length = 0; + if (array.length > 0) { + output.className = "search-results " + extraClass; + + array.forEach(item => { + const name = item.name; + const type = itemTypes[item.ty]; + + length += 1; + + let extra = ""; + if (type === "primitive") { + extra = " (primitive type)"; + } else if (type === "keyword") { + extra = " (keyword)"; + } + + const link = document.createElement("a"); + link.className = "result-" + type; + link.href = item.href; + + const resultName = document.createElement("div"); + resultName.className = "result-name"; + + if (item.is_alias) { + const alias = document.createElement("span"); + alias.className = "alias"; + + const bold = document.createElement("b"); + bold.innerText = item.alias; + alias.appendChild(bold); + + alias.insertAdjacentHTML( + "beforeend", + " - see "); + + resultName.appendChild(alias); + } + resultName.insertAdjacentHTML( + "beforeend", + item.displayPath + "" + name + extra + ""); + link.appendChild(resultName); + + const description = document.createElement("div"); + description.className = "desc"; + description.insertAdjacentHTML("beforeend", item.desc); + + link.appendChild(description); + output.appendChild(link); + }); + } else if (query.error === null) { + output.className = "search-failed" + extraClass; + output.innerHTML = "No results :(
    " + + "Try on DuckDuckGo?

    " + + "Or try looking in one of these:

    "; + } + return [output, length]; + } + + function makeTabHeader(tabNb, text, nbElems) { + if (searchState.currentTab === tabNb) { + return ""; + } + return ""; + } + + /** + * @param {ResultsTable} results + * @param {boolean} go_to_first + * @param {string} filterCrates + */ + function showResults(results, go_to_first, filterCrates) { + const search = searchState.outputElement(); + if (go_to_first || (results.others.length === 1 + && getSettingValue("go-to-only-result") === "true" + // By default, the search DOM element is "empty" (meaning it has no children not + // text content). Once a search has been run, it won't be empty, even if you press + // ESC or empty the search input (which also "cancels" the search). + && (!search.firstChild || search.firstChild.innerText !== searchState.loadingText)) + ) { + const elem = document.createElement("a"); + elem.href = results.others[0].href; + removeClass(elem, "active"); + // For firefox, we need the element to be in the DOM so it can be clicked. + document.body.appendChild(elem); + elem.click(); + return; + } + if (results.query === undefined) { + results.query = parseQuery(searchState.input.value); + } + + currentResults = results.query.userQuery; + + const ret_others = addTab(results.others, results.query, true); + const ret_in_args = addTab(results.in_args, results.query, false); + const ret_returned = addTab(results.returned, results.query, false); + + // Navigate to the relevant tab if the current tab is empty, like in case users search + // for "-> String". If they had selected another tab previously, they have to click on + // it again. + let currentTab = searchState.currentTab; + if ((currentTab === 0 && ret_others[1] === 0) || + (currentTab === 1 && ret_in_args[1] === 0) || + (currentTab === 2 && ret_returned[1] === 0)) { + if (ret_others[1] !== 0) { + currentTab = 0; + } else if (ret_in_args[1] !== 0) { + currentTab = 1; + } else if (ret_returned[1] !== 0) { + currentTab = 2; + } + } + + let crates = ""; + const crates_list = Object.keys(rawSearchIndex); + if (crates_list.length > 1) { + crates = " in 
    "; + } + + let output = `

    Results${crates}

    `; + if (results.query.error !== null) { + output += `

    Query parser error: "${results.query.error}".

    `; + output += "
    " + + makeTabHeader(0, "In Names", ret_others[1]) + + "
    "; + currentTab = 0; + } else if (results.query.foundElems <= 1 && results.query.returned.length === 0) { + output += "
    " + + makeTabHeader(0, "In Names", ret_others[1]) + + makeTabHeader(1, "In Parameters", ret_in_args[1]) + + makeTabHeader(2, "In Return Types", ret_returned[1]) + + "
    "; + } else { + const signatureTabTitle = + results.query.elems.length === 0 ? "In Function Return Types" : + results.query.returned.length === 0 ? "In Function Parameters" : + "In Function Signatures"; + output += "
    " + + makeTabHeader(0, signatureTabTitle, ret_others[1]) + + "
    "; + currentTab = 0; + } + + const resultsElem = document.createElement("div"); + resultsElem.id = "results"; + resultsElem.appendChild(ret_others[0]); + resultsElem.appendChild(ret_in_args[0]); + resultsElem.appendChild(ret_returned[0]); + + search.innerHTML = output; + const crateSearch = document.getElementById("crate-search"); + if (crateSearch) { + crateSearch.addEventListener("input", updateCrate); + } + search.appendChild(resultsElem); + // Reset focused elements. + searchState.showResults(search); + const elems = document.getElementById("titles").childNodes; + searchState.focusedByTab = []; + let i = 0; + for (const elem of elems) { + const j = i; + elem.onclick = () => printTab(j); + searchState.focusedByTab.push(null); + i += 1; + } + printTab(currentTab); + } + + /** + * Perform a search based on the current state of the search input element + * and display the results. + * @param {Event} [e] - The event that triggered this search, if any + * @param {boolean} [forced] + */ + function search(e, forced) { + const params = searchState.getQueryStringParams(); + const query = parseQuery(searchState.input.value.trim()); + + if (e) { + e.preventDefault(); + } + + if (!forced && query.userQuery === currentResults) { + if (query.userQuery.length > 0) { + putBackSearch(); + } + return; + } + + let filterCrates = getFilterCrates(); + + // In case we have no information about the saved crate and there is a URL query parameter, + // we override it with the URL query parameter. + if (filterCrates === null && params["filter-crate"] !== undefined) { + filterCrates = params["filter-crate"]; + } + + // Update document title to maintain a meaningful browser history + searchState.title = "Results for " + query.original + " - Rust"; + + // Because searching is incremental by character, only the most + // recent search query is added to the browser history. + if (browserSupportsHistoryApi()) { + const newURL = buildUrl(query.original, filterCrates); + + if (!history.state && !params.search) { + history.pushState(null, "", newURL); + } else { + history.replaceState(null, "", newURL); + } + } + + showResults( + execQuery(query, searchWords, filterCrates, window.currentCrate), + params.go_to_first, + filterCrates); + } + + /** + * Convert a list of RawFunctionType / ID to object-based FunctionType. + * + * Crates often have lots of functions in them, and it's common to have a large number of + * functions that operate on a small set of data types, so the search index compresses them + * by encoding function parameter and return types as indexes into an array of names. + * + * Even when a general-purpose compression algorithm is used, this is still a win. I checked. + * https://github.com/rust-lang/rust/pull/98475#issue-1284395985 + * + * The format for individual function types is encoded in + * librustdoc/html/render/mod.rs: impl Serialize for RenderType + * + * @param {null|Array} types + * @param {Array<{name: string, ty: number}>} lowercasePaths + * + * @return {Array} + */ + function buildItemSearchTypeAll(types, lowercasePaths) { + const PATH_INDEX_DATA = 0; + const GENERICS_DATA = 1; + return types.map(type => { + let pathIndex, generics; + if (typeof type === "number") { + pathIndex = type; + generics = []; + } else { + pathIndex = type[PATH_INDEX_DATA]; + generics = buildItemSearchTypeAll(type[GENERICS_DATA], lowercasePaths); + } + return { + // `0` is used as a sentinel because it's fewer bytes than `null` + name: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].name, + ty: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].ty, + generics: generics, + }; + }); + } + + /** + * Convert from RawFunctionSearchType to FunctionSearchType. + * + * Crates often have lots of functions in them, and function signatures are sometimes complex, + * so rustdoc uses a pretty tight encoding for them. This function converts it to a simpler, + * object-based encoding so that the actual search code is more readable and easier to debug. + * + * The raw function search type format is generated using serde in + * librustdoc/html/render/mod.rs: impl Serialize for IndexItemFunctionType + * + * @param {RawFunctionSearchType} functionSearchType + * @param {Array<{name: string, ty: number}>} lowercasePaths + * + * @return {null|FunctionSearchType} + */ + function buildFunctionSearchType(functionSearchType, lowercasePaths) { + const INPUTS_DATA = 0; + const OUTPUT_DATA = 1; + // `0` is used as a sentinel because it's fewer bytes than `null` + if (functionSearchType === 0) { + return null; + } + let inputs, output; + if (typeof functionSearchType[INPUTS_DATA] === "number") { + const pathIndex = functionSearchType[INPUTS_DATA]; + inputs = [{ + name: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].name, + ty: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].ty, + generics: [], + }]; + } else { + inputs = buildItemSearchTypeAll(functionSearchType[INPUTS_DATA], lowercasePaths); + } + if (functionSearchType.length > 1) { + if (typeof functionSearchType[OUTPUT_DATA] === "number") { + const pathIndex = functionSearchType[OUTPUT_DATA]; + output = [{ + name: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].name, + ty: pathIndex === 0 ? null : lowercasePaths[pathIndex - 1].ty, + generics: [], + }]; + } else { + output = buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA], lowercasePaths); + } + } else { + output = []; + } + return { + inputs, output, + }; + } + + function buildIndex(rawSearchIndex) { + searchIndex = []; + /** + * @type {Array} + */ + const searchWords = []; + let i, word; + let currentIndex = 0; + let id = 0; + + for (const crate in rawSearchIndex) { + if (!hasOwnPropertyRustdoc(rawSearchIndex, crate)) { + continue; + } + + let crateSize = 0; + + /** + * The raw search data for a given crate. `n`, `t`, `d`, and `q`, `i`, and `f` + * are arrays with the same length. n[i] contains the name of an item. + * t[i] contains the type of that item (as a small integer that represents an + * offset in `itemTypes`). d[i] contains the description of that item. + * + * q[i] contains the full path of the item, or an empty string indicating + * "same as q[i-1]". + * + * i[i] contains an item's parent, usually a module. For compactness, + * it is a set of indexes into the `p` array. + * + * f[i] contains function signatures, or `0` if the item isn't a function. + * Functions are themselves encoded as arrays. The first item is a list of + * types representing the function's inputs, and the second list item is a list + * of types representing the function's output. Tuples are flattened. + * Types are also represented as arrays; the first item is an index into the `p` + * array, while the second is a list of types representing any generic parameters. + * + * `a` defines aliases with an Array of pairs: [name, offset], where `offset` + * points into the n/t/d/q/i/f arrays. + * + * `doc` contains the description of the crate. + * + * `p` is a list of path/type pairs. It is used for parents and function parameters. + * + * @type {{ + * doc: string, + * a: Object, + * n: Array, + * t: Array, + * d: Array, + * q: Array, + * i: Array, + * f: Array, + * p: Array, + * }} + */ + const crateCorpus = rawSearchIndex[crate]; + + searchWords.push(crate); + // This object should have exactly the same set of fields as the "row" + // object defined below. Your JavaScript runtime will thank you. + // https://mathiasbynens.be/notes/shapes-ics + const crateRow = { + crate: crate, + ty: 1, // == ExternCrate + name: crate, + path: "", + desc: crateCorpus.doc, + parent: undefined, + type: null, + id: id, + normalizedName: crate.indexOf("_") === -1 ? crate : crate.replace(/_/g, ""), + }; + id += 1; + searchIndex.push(crateRow); + currentIndex += 1; + + // an array of (Number) item types + const itemTypes = crateCorpus.t; + // an array of (String) item names + const itemNames = crateCorpus.n; + // an array of (String) full paths (or empty string for previous path) + const itemPaths = crateCorpus.q; + // an array of (String) descriptions + const itemDescs = crateCorpus.d; + // an array of (Number) the parent path index + 1 to `paths`, or 0 if none + const itemParentIdxs = crateCorpus.i; + // an array of (Object | null) the type of the function, if any + const itemFunctionSearchTypes = crateCorpus.f; + // an array of [(Number) item type, + // (String) name] + const paths = crateCorpus.p; + // an array of [(String) alias name + // [Number] index to items] + const aliases = crateCorpus.a; + + // an array of [{name: String, ty: Number}] + const lowercasePaths = []; + + // convert `rawPaths` entries into object form + // generate normalizedPaths for function search mode + let len = paths.length; + for (i = 0; i < len; ++i) { + lowercasePaths.push({ty: paths[i][0], name: paths[i][1].toLowerCase()}); + paths[i] = {ty: paths[i][0], name: paths[i][1]}; + } + + // convert `item*` into an object form, and construct word indices. + // + // before any analysis is performed lets gather the search terms to + // search against apart from the rest of the data. This is a quick + // operation that is cached for the life of the page state so that + // all other search operations have access to this cached data for + // faster analysis operations + len = itemTypes.length; + let lastPath = ""; + for (i = 0; i < len; ++i) { + // This object should have exactly the same set of fields as the "crateRow" + // object defined above. + if (typeof itemNames[i] === "string") { + word = itemNames[i].toLowerCase(); + searchWords.push(word); + } else { + word = ""; + searchWords.push(""); + } + const row = { + crate: crate, + ty: itemTypes[i], + name: itemNames[i], + path: itemPaths[i] ? itemPaths[i] : lastPath, + desc: itemDescs[i], + parent: itemParentIdxs[i] > 0 ? paths[itemParentIdxs[i] - 1] : undefined, + type: buildFunctionSearchType(itemFunctionSearchTypes[i], lowercasePaths), + id: id, + normalizedName: word.indexOf("_") === -1 ? word : word.replace(/_/g, ""), + }; + id += 1; + searchIndex.push(row); + lastPath = row.path; + crateSize += 1; + } + + if (aliases) { + ALIASES[crate] = Object.create(null); + for (const alias_name in aliases) { + if (!hasOwnPropertyRustdoc(aliases, alias_name)) { + continue; + } + + if (!hasOwnPropertyRustdoc(ALIASES[crate], alias_name)) { + ALIASES[crate][alias_name] = []; + } + for (const local_alias of aliases[alias_name]) { + ALIASES[crate][alias_name].push(local_alias + currentIndex); + } + } + } + currentIndex += crateSize; + } + return searchWords; + } + + /** + * Callback for when the search form is submitted. + * @param {Event} [e] - The event that triggered this call, if any + */ + function onSearchSubmit(e) { + e.preventDefault(); + searchState.clearInputTimeout(); + search(); + } + + function putBackSearch() { + const search_input = searchState.input; + if (!searchState.input) { + return; + } + if (search_input.value !== "" && !searchState.isDisplayed()) { + searchState.showResults(); + if (browserSupportsHistoryApi()) { + history.replaceState(null, "", + buildUrl(search_input.value, getFilterCrates())); + } + document.title = searchState.title; + } + } + + function registerSearchEvents() { + const params = searchState.getQueryStringParams(); + + // Populate search bar with query string search term when provided, + // but only if the input bar is empty. This avoid the obnoxious issue + // where you start trying to do a search, and the index loads, and + // suddenly your search is gone! + if (searchState.input.value === "") { + searchState.input.value = params.search || ""; + } + + const searchAfter500ms = () => { + searchState.clearInputTimeout(); + if (searchState.input.value.length === 0) { + if (browserSupportsHistoryApi()) { + history.replaceState(null, window.currentCrate + " - Rust", + getNakedUrl() + window.location.hash); + } + searchState.hideResults(); + } else { + searchState.timeout = setTimeout(search, 500); + } + }; + searchState.input.onkeyup = searchAfter500ms; + searchState.input.oninput = searchAfter500ms; + document.getElementsByClassName("search-form")[0].onsubmit = onSearchSubmit; + searchState.input.onchange = e => { + if (e.target !== document.activeElement) { + // To prevent doing anything when it's from a blur event. + return; + } + // Do NOT e.preventDefault() here. It will prevent pasting. + searchState.clearInputTimeout(); + // zero-timeout necessary here because at the time of event handler execution the + // pasted content is not in the input field yet. Shouldn’t make any difference for + // change, though. + setTimeout(search, 0); + }; + searchState.input.onpaste = searchState.input.onchange; + + searchState.outputElement().addEventListener("keydown", e => { + // We only handle unmodified keystrokes here. We don't want to interfere with, + // for instance, alt-left and alt-right for history navigation. + if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) { + return; + } + // up and down arrow select next/previous search result, or the + // search box if we're already at the top. + if (e.which === 38) { // up + const previous = document.activeElement.previousElementSibling; + if (previous) { + previous.focus(); + } else { + searchState.focus(); + } + e.preventDefault(); + } else if (e.which === 40) { // down + const next = document.activeElement.nextElementSibling; + if (next) { + next.focus(); + } + const rect = document.activeElement.getBoundingClientRect(); + if (window.innerHeight - rect.bottom < rect.height) { + window.scrollBy(0, rect.height); + } + e.preventDefault(); + } else if (e.which === 37) { // left + nextTab(-1); + e.preventDefault(); + } else if (e.which === 39) { // right + nextTab(1); + e.preventDefault(); + } + }); + + searchState.input.addEventListener("keydown", e => { + if (e.which === 40) { // down + focusSearchResult(); + e.preventDefault(); + } + }); + + searchState.input.addEventListener("focus", () => { + putBackSearch(); + }); + + searchState.input.addEventListener("blur", () => { + searchState.input.placeholder = searchState.input.origPlaceholder; + }); + + // Push and pop states are used to add search results to the browser + // history. + if (browserSupportsHistoryApi()) { + // Store the previous so we can revert back to it later. + const previousTitle = document.title; + + window.addEventListener("popstate", e => { + const params = searchState.getQueryStringParams(); + // Revert to the previous title manually since the History + // API ignores the title parameter. + document.title = previousTitle; + // When browsing forward to search results the previous + // search will be repeated, so the currentResults are + // cleared to ensure the search is successful. + currentResults = null; + // Synchronize search bar with query string state and + // perform the search. This will empty the bar if there's + // nothing there, which lets you really go back to a + // previous state with nothing in the bar. + if (params.search && params.search.length > 0) { + searchState.input.value = params.search; + // Some browsers fire "onpopstate" for every page load + // (Chrome), while others fire the event only when actually + // popping a state (Firefox), which is why search() is + // called both here and at the end of the startSearch() + // function. + search(e); + } else { + searchState.input.value = ""; + // When browsing back from search results the main page + // visibility must be reset. + searchState.hideResults(); + } + }); + } + + // This is required in firefox to avoid this problem: Navigating to a search result + // with the keyboard, hitting enter, and then hitting back would take you back to + // the doc page, rather than the search that should overlay it. + // This was an interaction between the back-forward cache and our handlers + // that try to sync state between the URL and the search input. To work around it, + // do a small amount of re-init on page show. + window.onpageshow = () => { + const qSearch = searchState.getQueryStringParams().search; + if (searchState.input.value === "" && qSearch) { + searchState.input.value = qSearch; + } + search(); + }; + } + + function updateCrate(ev) { + if (ev.target.value === "all crates") { + // If we don't remove it from the URL, it'll be picked up again by the search. + const params = searchState.getQueryStringParams(); + const query = searchState.input.value.trim(); + if (!history.state && !params.search) { + history.pushState(null, "", buildUrl(query, null)); + } else { + history.replaceState(null, "", buildUrl(query, null)); + } + } + // In case you "cut" the entry from the search input, then change the crate filter + // before paste back the previous search, you get the old search results without + // the filter. To prevent this, we need to remove the previous results. + currentResults = null; + search(undefined, true); + } + + /** + * @type {Array<string>} + */ + const searchWords = buildIndex(rawSearchIndex); + if (typeof window !== "undefined") { + registerSearchEvents(); + // If there's a search term in the URL, execute the search now. + if (window.searchState.getQueryStringParams().search) { + search(); + } + } + + if (typeof exports !== "undefined") { + exports.initSearch = initSearch; + exports.execQuery = execQuery; + exports.parseQuery = parseQuery; + } + return searchWords; +} + +if (typeof window !== "undefined") { + window.initSearch = initSearch; + if (window.searchIndex !== undefined) { + initSearch(window.searchIndex); + } +} else { + // Running in Node, not a browser. Run initSearch just to produce the + // exports. + initSearch({}); +} + + +})(); diff --git a/static.files/settings-3a0b9947ba1bd99a.js b/static.files/settings-3a0b9947ba1bd99a.js new file mode 100644 index 000000000..141563bd4 --- /dev/null +++ b/static.files/settings-3a0b9947ba1bd99a.js @@ -0,0 +1,283 @@ +// Local js definitions: +/* global getSettingValue, getVirtualKey, updateLocalStorage, updateSystemTheme */ +/* global addClass, removeClass, onEach, onEachLazy, blurHandler, elemIsInParent */ +/* global MAIN_ID, getVar, getSettingsButton */ + +"use strict"; + +(function() { + const isSettingsPage = window.location.pathname.endsWith("/settings.html"); + + function changeSetting(settingName, value) { + updateLocalStorage(settingName, value); + + switch (settingName) { + case "theme": + case "preferred-dark-theme": + case "preferred-light-theme": + case "use-system-theme": + updateSystemTheme(); + updateLightAndDark(); + break; + case "line-numbers": + if (value === true) { + window.rustdoc_add_line_numbers_to_examples(); + } else { + window.rustdoc_remove_line_numbers_from_examples(); + } + break; + } + } + + function handleKey(ev) { + // Don't interfere with browser shortcuts + if (ev.ctrlKey || ev.altKey || ev.metaKey) { + return; + } + switch (getVirtualKey(ev)) { + case "Enter": + case "Return": + case "Space": + ev.target.checked = !ev.target.checked; + ev.preventDefault(); + break; + } + } + + function showLightAndDark() { + addClass(document.getElementById("theme").parentElement, "hidden"); + removeClass(document.getElementById("preferred-light-theme").parentElement, "hidden"); + removeClass(document.getElementById("preferred-dark-theme").parentElement, "hidden"); + } + + function hideLightAndDark() { + addClass(document.getElementById("preferred-light-theme").parentElement, "hidden"); + addClass(document.getElementById("preferred-dark-theme").parentElement, "hidden"); + removeClass(document.getElementById("theme").parentElement, "hidden"); + } + + function updateLightAndDark() { + if (getSettingValue("use-system-theme") !== "false") { + showLightAndDark(); + } else { + hideLightAndDark(); + } + } + + function setEvents(settingsElement) { + updateLightAndDark(); + onEachLazy(settingsElement.getElementsByClassName("slider"), elem => { + const toggle = elem.previousElementSibling; + const settingId = toggle.id; + const settingValue = getSettingValue(settingId); + if (settingValue !== null) { + toggle.checked = settingValue === "true"; + } + toggle.onchange = function() { + changeSetting(this.id, this.checked); + }; + toggle.onkeyup = handleKey; + toggle.onkeyrelease = handleKey; + }); + onEachLazy(settingsElement.getElementsByClassName("select-wrapper"), elem => { + const select = elem.getElementsByTagName("select")[0]; + const settingId = select.id; + const settingValue = getSettingValue(settingId); + if (settingValue !== null) { + select.value = settingValue; + } + select.onchange = function() { + changeSetting(this.id, this.value); + }; + }); + onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"), elem => { + const settingId = elem.name; + const settingValue = getSettingValue(settingId); + if (settingValue !== null && settingValue !== "null") { + elem.checked = settingValue === elem.value; + } + elem.addEventListener("change", ev => { + changeSetting(ev.target.name, ev.target.value); + }); + }); + } + + /** + * This function builds the sections inside the "settings page". It takes a `settings` list + * as argument which describes each setting and how to render it. It returns a string + * representing the raw HTML. + * + * @param {Array<Object>} settings + * + * @return {string} + */ + function buildSettingsPageSections(settings) { + let output = ""; + + for (const setting of settings) { + output += "<div class=\"setting-line\">"; + const js_data_name = setting["js_name"]; + const setting_name = setting["name"]; + + if (setting["options"] !== undefined) { + // This is a select setting. + output += `<div class="radio-line" id="${js_data_name}">\ + <span class="setting-name">${setting_name}</span>\ + <div class="choices">`; + onEach(setting["options"], option => { + const checked = option === setting["default"] ? " checked" : ""; + + output += `<label for="${js_data_name}-${option}" class="choice">\ + <input type="radio" name="${js_data_name}" \ + id="${js_data_name}-${option}" value="${option}"${checked}>\ + <span>${option}</span>\ + </label>`; + }); + output += "</div></div>"; + } else { + // This is a toggle. + const checked = setting["default"] === true ? " checked" : ""; + output += `<label class="toggle">\ + <input type="checkbox" id="${js_data_name}"${checked}>\ + <span class="slider"></span>\ + <span class="label">${setting_name}</span>\ + </label>`; + } + output += "</div>"; + } + return output; + } + + /** + * This function builds the "settings page" and returns the generated HTML element. + * + * @return {HTMLElement} + */ + function buildSettingsPage() { + const theme_names = getVar("themes").split(",").filter(t => t); + theme_names.push("light", "dark", "ayu"); + + const settings = [ + { + "name": "Use system theme", + "js_name": "use-system-theme", + "default": true, + }, + { + "name": "Theme", + "js_name": "theme", + "default": "light", + "options": theme_names, + }, + { + "name": "Preferred light theme", + "js_name": "preferred-light-theme", + "default": "light", + "options": theme_names, + }, + { + "name": "Preferred dark theme", + "js_name": "preferred-dark-theme", + "default": "dark", + "options": theme_names, + }, + { + "name": "Auto-hide item contents for large items", + "js_name": "auto-hide-large-items", + "default": true, + }, + { + "name": "Auto-hide item methods' documentation", + "js_name": "auto-hide-method-docs", + "default": false, + }, + { + "name": "Auto-hide trait implementation documentation", + "js_name": "auto-hide-trait-implementations", + "default": false, + }, + { + "name": "Directly go to item in search if there is only one result", + "js_name": "go-to-only-result", + "default": false, + }, + { + "name": "Show line numbers on code examples", + "js_name": "line-numbers", + "default": false, + }, + { + "name": "Disable keyboard shortcuts", + "js_name": "disable-shortcuts", + "default": false, + }, + ]; + + // Then we build the DOM. + const elementKind = isSettingsPage ? "section" : "div"; + const innerHTML = `<div class="settings">${buildSettingsPageSections(settings)}</div>`; + const el = document.createElement(elementKind); + el.id = "settings"; + if (!isSettingsPage) { + el.className = "popover"; + } + el.innerHTML = innerHTML; + + if (isSettingsPage) { + document.getElementById(MAIN_ID).appendChild(el); + } else { + el.setAttribute("tabindex", "-1"); + getSettingsButton().appendChild(el); + } + return el; + } + + const settingsMenu = buildSettingsPage(); + + function displaySettings() { + settingsMenu.style.display = ""; + } + + function settingsBlurHandler(event) { + blurHandler(event, getSettingsButton(), window.hidePopoverMenus); + } + + if (isSettingsPage) { + // We replace the existing "onclick" callback to do nothing if clicked. + getSettingsButton().onclick = function(event) { + event.preventDefault(); + }; + } else { + // We replace the existing "onclick" callback. + const settingsButton = getSettingsButton(); + const settingsMenu = document.getElementById("settings"); + settingsButton.onclick = function(event) { + if (elemIsInParent(event.target, settingsMenu)) { + return; + } + event.preventDefault(); + const shouldDisplaySettings = settingsMenu.style.display === "none"; + + window.hidePopoverMenus(); + if (shouldDisplaySettings) { + displaySettings(); + } + }; + settingsButton.onblur = settingsBlurHandler; + settingsButton.querySelector("a").onblur = settingsBlurHandler; + onEachLazy(settingsMenu.querySelectorAll("input"), el => { + el.onblur = settingsBlurHandler; + }); + settingsMenu.onblur = settingsBlurHandler; + } + + // We now wait a bit for the web browser to end re-computing the DOM... + setTimeout(() => { + setEvents(settingsMenu); + // The setting menu is already displayed if we're on the settings page. + if (!isSettingsPage) { + displaySettings(); + } + removeClass(getSettingsButton(), "rotate"); + }, 0); +})(); diff --git a/static.files/settings-a66f7524084a489a.css b/static.files/settings-a66f7524084a489a.css new file mode 100644 index 000000000..83939f63b --- /dev/null +++ b/static.files/settings-a66f7524084a489a.css @@ -0,0 +1,110 @@ +.setting-line { + margin: 0.6em 0 0.6em 0.3em; + position: relative; +} + +.setting-line .choices { + display: flex; + flex-wrap: wrap; +} + +.setting-line .radio-line input { + margin-right: 0.3em; + height: 1.2rem; + width: 1.2rem; + color: inherit; + border: 1px solid currentColor; + outline: none; + -webkit-appearance: none; + cursor: pointer; + border-radius: 50%; +} +.setting-line .radio-line input + span { + padding-bottom: 1px; +} + +.radio-line .setting-name { + width: 100%; +} + +.radio-line .choice { + margin-top: 0.1em; + margin-bottom: 0.1em; + min-width: 3.8em; + padding: 0.3em; + display: flex; + align-items: center; + cursor: pointer; +} +.radio-line .choice + .choice { + margin-left: 0.5em; +} + +.toggle { + position: relative; + width: 100%; + margin-right: 20px; + display: flex; + align-items: center; + cursor: pointer; +} + +.toggle input { + opacity: 0; + position: absolute; +} + +.slider { + position: relative; + width: 45px; + min-width: 45px; + display: block; + height: 28px; + margin-right: 20px; + cursor: pointer; + background-color: #ccc; + transition: .3s; +} + +.slider:before { + position: absolute; + content: ""; + height: 19px; + width: 19px; + left: 4px; + bottom: 4px; + transition: .3s; +} + +input:checked + .slider:before { + transform: translateX(19px); +} + +.setting-line > .sub-settings { + padding-left: 42px; + width: 100%; + display: block; +} + +#settings .setting-line { + margin: 1.2em 0.6em; +} + +.setting-line .radio-line input:checked { + box-shadow: inset 0 0 0 3px var(--main-background-color); + background-color: var(--settings-input-color); +} +.setting-line .radio-line input:focus { + box-shadow: 0 0 1px 1px var(--settings-input-color); +} +/* In here we combine both `:focus` and `:checked` properties. */ +.setting-line .radio-line input:checked:focus { + box-shadow: inset 0 0 0 3px var(--main-background-color), + 0 0 2px 2px var(--settings-input-color); +} +.setting-line .radio-line input:hover { + border-color: var(--settings-input-color) !important; +} +input:checked + .slider { + background-color: var(--settings-input-color); +} diff --git a/static.files/source-script-74087aa2e88f4475.js b/static.files/source-script-74087aa2e88f4475.js new file mode 100644 index 000000000..0b9368dd8 --- /dev/null +++ b/static.files/source-script-74087aa2e88f4475.js @@ -0,0 +1,228 @@ +// From rust: +/* global sourcesIndex */ + +// Local js definitions: +/* global addClass, getCurrentValue, onEachLazy, removeClass, browserSupportsHistoryApi */ +/* global updateLocalStorage */ + +"use strict"; + +(function() { + +const rootPath = document.getElementById("rustdoc-vars").attributes["data-root-path"].value; + +const NAME_OFFSET = 0; +const DIRS_OFFSET = 1; +const FILES_OFFSET = 2; + +function closeSidebarIfMobile() { + if (window.innerWidth < window.RUSTDOC_MOBILE_BREAKPOINT) { + updateLocalStorage("source-sidebar-show", "false"); + } +} + +function createDirEntry(elem, parent, fullPath, hasFoundFile) { + const dirEntry = document.createElement("details"); + const summary = document.createElement("summary"); + + dirEntry.className = "dir-entry"; + + fullPath += elem[NAME_OFFSET] + "/"; + + summary.innerText = elem[NAME_OFFSET]; + dirEntry.appendChild(summary); + + const folders = document.createElement("div"); + folders.className = "folders"; + if (elem[DIRS_OFFSET]) { + for (const dir of elem[DIRS_OFFSET]) { + if (createDirEntry(dir, folders, fullPath, false)) { + dirEntry.open = true; + hasFoundFile = true; + } + } + } + dirEntry.appendChild(folders); + + const files = document.createElement("div"); + files.className = "files"; + if (elem[FILES_OFFSET]) { + for (const file_text of elem[FILES_OFFSET]) { + const file = document.createElement("a"); + file.innerText = file_text; + file.href = rootPath + "src/" + fullPath + file_text + ".html"; + file.addEventListener("click", closeSidebarIfMobile); + const w = window.location.href.split("#")[0]; + if (!hasFoundFile && w === file.href) { + file.className = "selected"; + dirEntry.open = true; + hasFoundFile = true; + } + files.appendChild(file); + } + } + dirEntry.appendChild(files); + parent.appendChild(dirEntry); + return hasFoundFile; +} + +function toggleSidebar() { + const child = this.parentNode.children[0]; + if (child.innerText === ">") { + window.rustdocMobileScrollLock(); + addClass(document.documentElement, "source-sidebar-expanded"); + child.innerText = "<"; + updateLocalStorage("source-sidebar-show", "true"); + } else { + window.rustdocMobileScrollUnlock(); + removeClass(document.documentElement, "source-sidebar-expanded"); + child.innerText = ">"; + updateLocalStorage("source-sidebar-show", "false"); + } +} + +function createSidebarToggle() { + const sidebarToggle = document.createElement("div"); + sidebarToggle.id = "sidebar-toggle"; + + const inner = document.createElement("button"); + + if (getCurrentValue("source-sidebar-show") === "true") { + inner.innerText = "<"; + } else { + inner.innerText = ">"; + } + inner.onclick = toggleSidebar; + + sidebarToggle.appendChild(inner); + return sidebarToggle; +} + +// This function is called from "source-files.js", generated in `html/render/write_shared.rs`. +// eslint-disable-next-line no-unused-vars +function createSourceSidebar() { + const container = document.querySelector("nav.sidebar"); + + const sidebarToggle = createSidebarToggle(); + container.insertBefore(sidebarToggle, container.firstChild); + + const sidebar = document.createElement("div"); + sidebar.id = "source-sidebar"; + + let hasFoundFile = false; + + const title = document.createElement("div"); + title.className = "title"; + title.innerText = "Files"; + sidebar.appendChild(title); + Object.keys(sourcesIndex).forEach(key => { + sourcesIndex[key][NAME_OFFSET] = key; + hasFoundFile = createDirEntry(sourcesIndex[key], sidebar, "", + hasFoundFile); + }); + + container.appendChild(sidebar); + // Focus on the current file in the source files sidebar. + const selected_elem = sidebar.getElementsByClassName("selected")[0]; + if (typeof selected_elem !== "undefined") { + selected_elem.focus(); + } +} + +const lineNumbersRegex = /^#?(\d+)(?:-(\d+))?$/; + +function highlightSourceLines(match) { + if (typeof match === "undefined") { + match = window.location.hash.match(lineNumbersRegex); + } + if (!match) { + return; + } + let from = parseInt(match[1], 10); + let to = from; + if (typeof match[2] !== "undefined") { + to = parseInt(match[2], 10); + } + if (to < from) { + const tmp = to; + to = from; + from = tmp; + } + let elem = document.getElementById(from); + if (!elem) { + return; + } + const x = document.getElementById(from); + if (x) { + x.scrollIntoView(); + } + onEachLazy(document.getElementsByClassName("src-line-numbers"), e => { + onEachLazy(e.getElementsByTagName("span"), i_e => { + removeClass(i_e, "line-highlighted"); + }); + }); + for (let i = from; i <= to; ++i) { + elem = document.getElementById(i); + if (!elem) { + break; + } + addClass(elem, "line-highlighted"); + } +} + +const handleSourceHighlight = (function() { + let prev_line_id = 0; + + const set_fragment = name => { + const x = window.scrollX, + y = window.scrollY; + if (browserSupportsHistoryApi()) { + history.replaceState(null, null, "#" + name); + highlightSourceLines(); + } else { + location.replace("#" + name); + } + // Prevent jumps when selecting one or many lines + window.scrollTo(x, y); + }; + + return ev => { + let cur_line_id = parseInt(ev.target.id, 10); + // It can happen when clicking not on a line number span. + if (isNaN(cur_line_id)) { + return; + } + ev.preventDefault(); + + if (ev.shiftKey && prev_line_id) { + // Swap selection if needed + if (prev_line_id > cur_line_id) { + const tmp = prev_line_id; + prev_line_id = cur_line_id; + cur_line_id = tmp; + } + + set_fragment(prev_line_id + "-" + cur_line_id); + } else { + prev_line_id = cur_line_id; + + set_fragment(cur_line_id); + } + }; +}()); + +window.addEventListener("hashchange", () => { + const match = window.location.hash.match(lineNumbersRegex); + if (match) { + return highlightSourceLines(match); + } +}); + +onEachLazy(document.getElementsByClassName("src-line-numbers"), el => { + el.addEventListener("click", handleSourceHighlight); +}); + +highlightSourceLines(); + +window.createSourceSidebar = createSourceSidebar; +})(); diff --git a/static.files/storage-d43fa987303ecbbb.js b/static.files/storage-d43fa987303ecbbb.js new file mode 100644 index 000000000..db2db83ca --- /dev/null +++ b/static.files/storage-d43fa987303ecbbb.js @@ -0,0 +1,264 @@ +// storage.js is loaded in the `<head>` of all rustdoc pages and doesn't +// use `async` or `defer`. That means it blocks further parsing and rendering +// of the page: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script. +// This makes it the correct place to act on settings that affect the display of +// the page, so we don't see major layout changes during the load of the page. +"use strict"; + +const darkThemes = ["dark", "ayu"]; +window.currentTheme = document.getElementById("themeStyle"); +window.mainTheme = document.getElementById("mainThemeStyle"); + +// WARNING: RUSTDOC_MOBILE_BREAKPOINT MEDIA QUERY +// If you update this line, then you also need to update the media query with the same +// warning in rustdoc.css +window.RUSTDOC_MOBILE_BREAKPOINT = 700; + +const settingsDataset = (function() { + const settingsElement = document.getElementById("default-settings"); + if (settingsElement === null) { + return null; + } + const dataset = settingsElement.dataset; + if (dataset === undefined) { + return null; + } + return dataset; +})(); + +function getSettingValue(settingName) { + const current = getCurrentValue(settingName); + if (current !== null) { + return current; + } + if (settingsDataset !== null) { + // See the comment for `default_settings.into_iter()` etc. in + // `Options::from_matches` in `librustdoc/config.rs`. + const def = settingsDataset[settingName.replace(/-/g,"_")]; + if (def !== undefined) { + return def; + } + } + return null; +} + +const localStoredTheme = getSettingValue("theme"); + +const savedHref = []; + +// eslint-disable-next-line no-unused-vars +function hasClass(elem, className) { + return elem && elem.classList && elem.classList.contains(className); +} + +// eslint-disable-next-line no-unused-vars +function addClass(elem, className) { + if (!elem || !elem.classList) { + return; + } + elem.classList.add(className); +} + +// eslint-disable-next-line no-unused-vars +function removeClass(elem, className) { + if (!elem || !elem.classList) { + return; + } + elem.classList.remove(className); +} + +/** + * Run a callback for every element of an Array. + * @param {Array<?>} arr - The array to iterate over + * @param {function(?)} func - The callback + * @param {boolean} [reversed] - Whether to iterate in reverse + */ +function onEach(arr, func, reversed) { + if (arr && arr.length > 0 && func) { + if (reversed) { + const length = arr.length; + for (let i = length - 1; i >= 0; --i) { + if (func(arr[i])) { + return true; + } + } + } else { + for (const elem of arr) { + if (func(elem)) { + return true; + } + } + } + } + return false; +} + +/** + * Turn an HTMLCollection or a NodeList into an Array, then run a callback + * for every element. This is useful because iterating over an HTMLCollection + * or a "live" NodeList while modifying it can be very slow. + * https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection + * https://developer.mozilla.org/en-US/docs/Web/API/NodeList + * @param {NodeList<?>|HTMLCollection<?>} lazyArray - An array to iterate over + * @param {function(?)} func - The callback + * @param {boolean} [reversed] - Whether to iterate in reverse + */ +function onEachLazy(lazyArray, func, reversed) { + return onEach( + Array.prototype.slice.call(lazyArray), + func, + reversed); +} + +function updateLocalStorage(name, value) { + try { + window.localStorage.setItem("rustdoc-" + name, value); + } catch (e) { + // localStorage is not accessible, do nothing + } +} + +function getCurrentValue(name) { + try { + return window.localStorage.getItem("rustdoc-" + name); + } catch (e) { + return null; + } +} + +function switchTheme(styleElem, mainStyleElem, newThemeName, saveTheme) { + // If this new value comes from a system setting or from the previously + // saved theme, no need to save it. + if (saveTheme) { + updateLocalStorage("theme", newThemeName); + } + + if (savedHref.length === 0) { + onEachLazy(document.getElementsByTagName("link"), el => { + savedHref.push(el.href); + }); + } + const newHref = savedHref.find(url => { + const m = url.match(/static\.files\/(.*)-[a-f0-9]{16}\.css$/); + if (m && m[1] === newThemeName) { + return true; + } + const m2 = url.match(/\/([^/]*)\.css$/); + if (m2 && m2[1].startsWith(newThemeName)) { + return true; + } + }); + if (newHref && newHref !== styleElem.href) { + styleElem.href = newHref; + } +} + +// This function is called from "main.js". +// eslint-disable-next-line no-unused-vars +function useSystemTheme(value) { + if (value === undefined) { + value = true; + } + + updateLocalStorage("use-system-theme", value); + + // update the toggle if we're on the settings page + const toggle = document.getElementById("use-system-theme"); + if (toggle && toggle instanceof HTMLInputElement) { + toggle.checked = value; + } +} + +const updateSystemTheme = (function() { + if (!window.matchMedia) { + // fallback to the CSS computed value + return () => { + const cssTheme = getComputedStyle(document.documentElement) + .getPropertyValue("content"); + + switchTheme( + window.currentTheme, + window.mainTheme, + JSON.parse(cssTheme) || "light", + true + ); + }; + } + + // only listen to (prefers-color-scheme: dark) because light is the default + const mql = window.matchMedia("(prefers-color-scheme: dark)"); + + function handlePreferenceChange(mql) { + const use = theme => { + switchTheme(window.currentTheme, window.mainTheme, theme, true); + }; + // maybe the user has disabled the setting in the meantime! + if (getSettingValue("use-system-theme") !== "false") { + const lightTheme = getSettingValue("preferred-light-theme") || "light"; + const darkTheme = getSettingValue("preferred-dark-theme") || "dark"; + + if (mql.matches) { + use(darkTheme); + } else { + // prefers a light theme, or has no preference + use(lightTheme); + } + // note: we save the theme so that it doesn't suddenly change when + // the user disables "use-system-theme" and reloads the page or + // navigates to another page + } else { + use(getSettingValue("theme")); + } + } + + mql.addListener(handlePreferenceChange); + + return () => { + handlePreferenceChange(mql); + }; +})(); + +function switchToSavedTheme() { + switchTheme( + window.currentTheme, + window.mainTheme, + getSettingValue("theme") || "light", + false + ); +} + +if (getSettingValue("use-system-theme") !== "false" && window.matchMedia) { + // update the preferred dark theme if the user is already using a dark theme + // See https://github.com/rust-lang/rust/pull/77809#issuecomment-707875732 + if (getSettingValue("use-system-theme") === null + && getSettingValue("preferred-dark-theme") === null + && darkThemes.indexOf(localStoredTheme) >= 0) { + updateLocalStorage("preferred-dark-theme", localStoredTheme); + } + + // call the function to initialize the theme at least once! + updateSystemTheme(); +} else { + switchToSavedTheme(); +} + +if (getSettingValue("source-sidebar-show") === "true") { + // At this point in page load, `document.body` is not available yet. + // Set a class on the `<html>` element instead. + addClass(document.documentElement, "source-sidebar-expanded"); +} + +// If we navigate away (for example to a settings page), and then use the back or +// forward button to get back to a page, the theme may have changed in the meantime. +// But scripts may not be re-loaded in such a case due to the bfcache +// (https://web.dev/bfcache/). The "pageshow" event triggers on such navigations. +// Use that opportunity to update the theme. +// We use a setTimeout with a 0 timeout here to put the change on the event queue. +// For some reason, if we try to change the theme while the `pageshow` event is +// running, it sometimes fails to take effect. The problem manifests on Chrome, +// specifically when talking to a remote website with no caching. +window.addEventListener("pageshow", ev => { + if (ev.persisted) { + setTimeout(switchToSavedTheme, 0); + } +}); diff --git a/toggle-minus.svg b/static.files/toggle-minus-31bbd6e4c77f5c96.svg similarity index 100% rename from toggle-minus.svg rename to static.files/toggle-minus-31bbd6e4c77f5c96.svg diff --git a/toggle-plus.svg b/static.files/toggle-plus-1092eb4930d581b0.svg similarity index 100% rename from toggle-plus.svg rename to static.files/toggle-plus-1092eb4930d581b0.svg diff --git a/wheel.svg b/static.files/wheel-5ec35bf9ca753509.svg similarity index 100% rename from wheel.svg rename to static.files/wheel-5ec35bf9ca753509.svg diff --git a/storage.js b/storage.js deleted file mode 100644 index 17c1da81f..000000000 --- a/storage.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");window.RUSTDOC_MOBILE_BREAKPOINT=700;const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}const dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current!==null){return current}if(settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return null}const localStoredTheme=getSettingValue("theme");const savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){if(reversed){const length=arr.length;for(let i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){const newHref=mainStyleElem.href.replace(/\/rustdoc([^/]*)\.css/,"/"+newTheme+"$1"+".css");if(saveTheme){updateLocalStorage("theme",newTheme)}if(styleElem.href===newHref){return}let found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),el=>{savedHref.push(el.href)})}onEach(savedHref,el=>{if(el===newHref){found=true;return true}});if(found){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("use-system-theme",value);const toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}const updateSystemTheme=(function(){if(!window.matchMedia){return()=>{const cssTheme=getComputedStyle(document.documentElement).getPropertyValue("content");switchTheme(window.currentTheme,window.mainTheme,JSON.parse(cssTheme)||"light",true)}}const mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){const use=theme=>{switchTheme(window.currentTheme,window.mainTheme,theme,true)};if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){use(darkTheme)}else{use(lightTheme)}}else{use(getSettingValue("theme"))}}mql.addListener(handlePreferenceChange);return()=>{handlePreferenceChange(mql)}})();function switchToSavedTheme(){switchTheme(window.currentTheme,window.mainTheme,getSettingValue("theme")||"light",false)}if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchToSavedTheme()}if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"source-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(switchToSavedTheme,0)}}) \ No newline at end of file