Crate actix_identity
source · [−]Expand description
Identity management for Actix Web.
+Crate actix_identity
source · [−]Expand description
Identity management for Actix Web.
actix-identity
can be used to track identity of a user across multiple requests. It is built
on top of HTTP sessions, via actix-session
.
Getting started
diff --git a/actix_limitation/constant.DEFAULT_COOKIE_NAME.html b/actix_limitation/constant.DEFAULT_COOKIE_NAME.html index 198c2634b..0ce648f2d 100644 --- a/actix_limitation/constant.DEFAULT_COOKIE_NAME.html +++ b/actix_limitation/constant.DEFAULT_COOKIE_NAME.html @@ -1,4 +1,4 @@Constant actix_limitation::DEFAULT_COOKIE_NAME
source · [−]pub const DEFAULT_COOKIE_NAME: &'static str = "sid";
Expand description
Default cookie name.
+Constant actix_limitation::DEFAULT_COOKIE_NAME
source · [−]pub const DEFAULT_COOKIE_NAME: &'static str = "sid";
Expand description
Default cookie name.
Constant actix_limitation::DEFAULT_PERIOD_SECS
source · [−]pub const DEFAULT_PERIOD_SECS: u64 = 3600;
Expand description
Default period (in seconds).
+Constant actix_limitation::DEFAULT_PERIOD_SECS
source · [−]pub const DEFAULT_PERIOD_SECS: u64 = 3600;
Expand description
Default period (in seconds).
Constant actix_limitation::DEFAULT_REQUEST_LIMIT
source · [−]pub const DEFAULT_REQUEST_LIMIT: usize = 5000;
Expand description
Default request limit.
+Constant actix_limitation::DEFAULT_REQUEST_LIMIT
source · [−]pub const DEFAULT_REQUEST_LIMIT: usize = 5000;
Expand description
Default request limit.
Constant actix_limitation::DEFAULT_SESSION_KEY
source · [−]pub const DEFAULT_SESSION_KEY: &'static str = "rate-api-id";
Expand description
Default session key.
+Constant actix_limitation::DEFAULT_SESSION_KEY
source · [−]pub const DEFAULT_SESSION_KEY: &'static str = "rate-api-id";
Expand description
Default session key.
Crate actix_limitation
source · [−]Expand description
Rate limiter using a fixed window counter for arbitrary keys, backed by Redis for Actix Web.
+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"
Struct actix_limitation::Limiter
source · [−]pub struct Limiter { /* private fields */ }
Expand description
Rate limiter.
-Implementations
sourceimpl Limiter
impl Limiter
sourcepub fn builder(redis_url: impl Into<String>) -> Builder
pub fn builder(redis_url: impl Into<String>) -> Builder
Construct rate limiter builder with defaults.
+Struct actix_limitation::Limiter
source · [−]pub struct Limiter { /* private fields */ }
Expand description
Rate limiter.
+Implementations
Trait Implementations
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Limiter
impl Send for Limiter
impl Sync for Limiter
impl Unpin for Limiter
impl !UnwindSafe for Limiter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
diff --git a/actix_protobuf/trait.ProtoBufResponseBuilder.html b/actix_protobuf/trait.ProtoBufResponseBuilder.html index 28e288acd..82370b7ba 100644 --- a/actix_protobuf/trait.ProtoBufResponseBuilder.html +++ b/actix_protobuf/trait.ProtoBufResponseBuilder.html @@ -1,3 +1,3 @@pub trait ProtoBufResponseBuilder {
fn protobuf<T: Message>(&mut self, value: T) -> Result<HttpResponse, Error>;
-}
Required Methods
Implementations on Foreign Types
sourceimpl ProtoBufResponseBuilder for HttpResponseBuilder
impl ProtoBufResponseBuilder for HttpResponseBuilder
Implementors
Required Methods
Implementations on Foreign Types
sourceimpl ProtoBufResponseBuilder for HttpResponseBuilder
impl ProtoBufResponseBuilder for HttpResponseBuilder
Implementors
Crate actix_session
source · [−]Expand description
Session management for Actix Web.
+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 diff --git a/actix_session/storage/index.html b/actix_session/storage/index.html index 78069ed70..6e8134578 100644 --- a/actix_session/storage/index.html +++ b/actix_session/storage/index.html @@ -1,6 +1,6 @@
Module actix_session::storage
source · [−]Expand description
Pluggable storage backends for session state.
+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
diff --git a/actix_settings/index.html b/actix_settings/index.html
index 976acec7a..4c2480f81 100644
--- a/actix_settings/index.html
+++ b/actix_settings/index.html
@@ -1,6 +1,6 @@
Crate actix_settings
source · [−]Expand description
Easily manage Actix Web’s settings from a TOML file and environment variables.
+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
diff --git a/actix_settings/struct.ActixSettings.html b/actix_settings/struct.ActixSettings.html
index 96d456f69..53f7cdd92 100644
--- a/actix_settings/struct.ActixSettings.html
+++ b/actix_settings/struct.ActixSettings.html
@@ -1,6 +1,6 @@
Struct actix_settings::ActixSettings
source · [−]pub struct ActixSettings {Show 13 fields
+
Struct actix_settings::ActixSettings
source · [−]pub struct ActixSettings {
client_shutdown: Timeout
Timeout duration for connection shutdown.
shutdown_timeout: Timeout
Timeout duration for graceful worker shutdown.
tls: Tls
TLS (HTTPS) configuration.
-Trait Implementations
sourceimpl Clone for ActixSettings
impl Clone for ActixSettings
sourcefn clone(&self) -> ActixSettings
fn clone(&self) -> ActixSettings
Returns a copy of the value. Read more
+Trait Implementations
sourceimpl Clone for ActixSettings
impl Clone for ActixSettings
sourcefn clone(&self) -> ActixSettings
fn clone(&self) -> ActixSettings
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ActixSettings
impl Debug for ActixSettings
sourceimpl<'de> Deserialize<'de> for ActixSettings
impl<'de> Deserialize<'de> for ActixSettings
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
-sourceimpl Hash for ActixSettings
impl Hash for ActixSettings
sourceimpl Debug for ActixSettings
impl Debug for ActixSettings
sourceimpl<'de> Deserialize<'de> for ActixSettings
impl<'de> Deserialize<'de> for ActixSettings
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
+sourceimpl Hash for ActixSettings
impl Hash for ActixSettings
sourceimpl PartialEq<ActixSettings> for ActixSettings
impl PartialEq<ActixSettings> for ActixSettings
sourcefn eq(&self, other: &ActixSettings) -> bool
fn eq(&self, other: &ActixSettings) -> bool
This method tests for self
and other
values to be equal, and is used
+
sourceimpl PartialEq<ActixSettings> for ActixSettings
impl PartialEq<ActixSettings> for ActixSettings
sourcefn eq(&self, other: &ActixSettings) -> bool
fn eq(&self, other: &ActixSettings) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for ActixSettings
impl StructuralEq for ActixSettings
impl StructuralPartialEq for ActixSettings
Auto Trait Implementations
impl RefUnwindSafe for ActixSettings
impl Send for ActixSettings
impl Sync for ActixSettings
impl Unpin for ActixSettings
impl UnwindSafe for ActixSettings
Blanket Implementations
impl Eq for ActixSettings
impl StructuralEq for ActixSettings
impl StructuralPartialEq for ActixSettings
Auto Trait Implementations
impl RefUnwindSafe for ActixSettings
impl Send for ActixSettings
impl Sync for ActixSettings
impl Unpin for ActixSettings
impl UnwindSafe for ActixSettings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
Struct actix_settings::BasicSettings
source · [−]pub struct BasicSettings<A> {
+
Struct actix_settings::BasicSettings
source · [−]pub struct BasicSettings<A> {
pub actix: ActixSettings,
pub application: A,
}
Expand description
Wrapper for server and application-specific settings.
Fields
actix: ActixSettings
Actix Web server settings.
application: A
Application-specific settings.
-Implementations
sourceimpl<A> BasicSettings<A>where
A: DeserializeOwned,
impl<A> BasicSettings<A>where
A: DeserializeOwned,
sourcepub fn parse_toml<P>(filepath: P) -> Result<Self, Error>where
P: AsRef<Path>,
pub fn parse_toml<P>(filepath: P) -> Result<Self, Error>where
P: AsRef<Path>,
Parse an instance of Self
from a TOML file located at filepath
.
Implementations
sourceimpl<A> BasicSettings<A>where
A: DeserializeOwned,
impl<A> BasicSettings<A>where
A: DeserializeOwned,
sourcepub fn parse_toml<P>(filepath: P) -> Result<Self, Error>where
P: AsRef<Path>,
pub fn parse_toml<P>(filepath: P) -> Result<Self, Error>where
P: AsRef<Path>,
Parse an instance of Self
from a TOML file located at filepath
.
If the file doesn’t exist, it is generated from the default TOML template, after which the newly generated file is read in and parsed.
-sourcepub fn from_default_template() -> Result<Self, Error>
pub fn from_default_template() -> Result<Self, Error>
Parse an instance of Self
straight from the default TOML template.
sourcepub fn from_template(template: &str) -> Result<Self, Error>
pub fn from_template(template: &str) -> Result<Self, Error>
Parse an instance of Self
straight from the default TOML template.
sourcepub fn write_toml_file<P>(filepath: P) -> Result<(), Error>where
P: AsRef<Path>,
pub fn write_toml_file<P>(filepath: P) -> Result<(), Error>where
P: AsRef<Path>,
Writes the default TOML template to a new file, located at filepath
.
sourcepub fn from_default_template() -> Result<Self, Error>
pub fn from_default_template() -> Result<Self, Error>
Parse an instance of Self
straight from the default TOML template.
sourcepub fn from_template(template: &str) -> Result<Self, Error>
pub fn from_template(template: &str) -> Result<Self, Error>
Parse an instance of Self
straight from the default TOML template.
sourcepub fn write_toml_file<P>(filepath: P) -> Result<(), Error>where
P: AsRef<Path>,
pub fn write_toml_file<P>(filepath: P) -> Result<(), Error>where
P: AsRef<Path>,
Writes the default TOML template to a new file, located at filepath
.
Errors
Returns a FileExists
error if a file already exists at that
location.
sourcepub fn override_field<F, V>(field: &mut F, value: V) -> Result<(), Error>where
F: Parse,
V: AsRef<str>,
pub fn override_field<F, V>(field: &mut F, value: V) -> Result<(), Error>where
F: Parse,
V: AsRef<str>,
Attempts to parse value
and override the referenced field
.
sourcepub fn override_field<F, V>(field: &mut F, value: V) -> Result<(), Error>where
F: Parse,
V: AsRef<str>,
pub fn override_field<F, V>(field: &mut F, value: V) -> Result<(), Error>where
F: Parse,
V: AsRef<str>,
Attempts to parse value
and override the referenced field
.
Examples
use actix_settings::{Settings, Mode};
@@ -24,7 +24,7 @@ location.
Settings::override_field(&mut settings.actix.mode, "production")?;
assert_eq!(settings.actix.mode, Mode::Production);
sourcepub fn override_field_with_env_var<F, N>(
field: &mut F,
var_name: N
) -> Result<(), Error>where
F: Parse,
N: AsRef<str>,
pub fn override_field_with_env_var<F, N>(
field: &mut F,
var_name: N
) -> Result<(), Error>where
F: Parse,
N: AsRef<str>,
Attempts to read an environment variable, parse it, and override the referenced field
.
sourcepub fn override_field_with_env_var<F, N>(
field: &mut F,
var_name: N
) -> Result<(), Error>where
F: Parse,
N: AsRef<str>,
pub fn override_field_with_env_var<F, N>(
field: &mut F,
var_name: N
) -> Result<(), Error>where
F: Parse,
N: AsRef<str>,
Attempts to read an environment variable, parse it, and override the referenced field
.
Examples
use actix_settings::{Settings, Mode};
@@ -35,17 +35,17 @@ std::env::set_var("OVERRIDE__MODE", &mut settings.actix.mode, "OVERRIDE__MODE")?;
assert_eq!(settings.actix.mode, Mode::Production);
Trait Implementations
sourceimpl<A: Clone> Clone for BasicSettings<A>
impl<A: Clone> Clone for BasicSettings<A>
sourcefn clone(&self) -> BasicSettings<A>
fn clone(&self) -> BasicSettings<A>
Returns a copy of the value. Read more
+Trait Implementations
sourceimpl<A: Clone> Clone for BasicSettings<A>
impl<A: Clone> Clone for BasicSettings<A>
sourcefn clone(&self) -> BasicSettings<A>
fn clone(&self) -> BasicSettings<A>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<A: Debug> Debug for BasicSettings<A>
impl<A: Debug> Debug for BasicSettings<A>
sourceimpl<'de, A> Deserialize<'de> for BasicSettings<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for BasicSettings<A>where
A: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
-sourceimpl<A: Hash> Hash for BasicSettings<A>
impl<A: Hash> Hash for BasicSettings<A>
sourceimpl<A: Debug> Debug for BasicSettings<A>
impl<A: Debug> Debug for BasicSettings<A>
sourceimpl<'de, A> Deserialize<'de> for BasicSettings<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for BasicSettings<A>where
A: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
+sourceimpl<A: Hash> Hash for BasicSettings<A>
impl<A: Hash> Hash for BasicSettings<A>
sourceimpl<A: PartialEq> PartialEq<BasicSettings<A>> for BasicSettings<A>
impl<A: PartialEq> PartialEq<BasicSettings<A>> for BasicSettings<A>
sourcefn eq(&self, other: &BasicSettings<A>) -> bool
fn eq(&self, other: &BasicSettings<A>) -> bool
This method tests for self
and other
values to be equal, and is used
+
sourceimpl<A: PartialEq> PartialEq<BasicSettings<A>> for BasicSettings<A>
impl<A: PartialEq> PartialEq<BasicSettings<A>> for BasicSettings<A>
sourcefn eq(&self, other: &BasicSettings<A>) -> bool
fn eq(&self, other: &BasicSettings<A>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl<A: Eq> Eq for BasicSettings<A>
impl<A> StructuralEq for BasicSettings<A>
impl<A> StructuralPartialEq for BasicSettings<A>
Auto Trait Implementations
impl<A> RefUnwindSafe for BasicSettings<A>where
A: RefUnwindSafe,
impl<A> Send for BasicSettings<A>where
A: Send,
impl<A> Sync for BasicSettings<A>where
A: Sync,
impl<A> Unpin for BasicSettings<A>where
A: Unpin,
impl<A> UnwindSafe for BasicSettings<A>where
A: UnwindSafe,
Blanket Implementations
impl<A: Eq> Eq for BasicSettings<A>
impl<A> StructuralEq for BasicSettings<A>
impl<A> StructuralPartialEq for BasicSettings<A>
Auto Trait Implementations
impl<A> RefUnwindSafe for BasicSettings<A>where
A: RefUnwindSafe,
impl<A> Send for BasicSettings<A>where
A: Send,
impl<A> Sync for BasicSettings<A>where
A: Sync,
impl<A> Unpin for BasicSettings<A>where
A: Unpin,
impl<A> UnwindSafe for BasicSettings<A>where
A: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
Struct actix_settings::NoSettings
source · [−]#[non_exhaustive]pub struct NoSettings {}
Expand description
Marker type representing no defined application-specific settings.
-Trait Implementations
sourceimpl Clone for NoSettings
impl Clone for NoSettings
sourcefn clone(&self) -> NoSettings
fn clone(&self) -> NoSettings
Returns a copy of the value. Read more
+Struct actix_settings::NoSettings
source · [−]#[non_exhaustive]pub struct NoSettings {}
Expand description
Marker type representing no defined application-specific settings.
+Trait Implementations
sourceimpl Clone for NoSettings
impl Clone for NoSettings
sourcefn clone(&self) -> NoSettings
fn clone(&self) -> NoSettings
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NoSettings
impl Debug for NoSettings
sourceimpl<'de> Deserialize<'de> for NoSettings
impl<'de> Deserialize<'de> for NoSettings
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
-sourceimpl Hash for NoSettings
impl Hash for NoSettings
sourceimpl Debug for NoSettings
impl Debug for NoSettings
sourceimpl<'de> Deserialize<'de> for NoSettings
impl<'de> Deserialize<'de> for NoSettings
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
+sourceimpl Hash for NoSettings
impl Hash for NoSettings
sourceimpl PartialEq<NoSettings> for NoSettings
impl PartialEq<NoSettings> for NoSettings
sourcefn eq(&self, other: &NoSettings) -> bool
fn eq(&self, other: &NoSettings) -> bool
This method tests for self
and other
values to be equal, and is used
+
sourceimpl PartialEq<NoSettings> for NoSettings
impl PartialEq<NoSettings> for NoSettings
sourcefn eq(&self, other: &NoSettings) -> bool
fn eq(&self, other: &NoSettings) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for NoSettings
impl StructuralEq for NoSettings
impl StructuralPartialEq for NoSettings
Auto Trait Implementations
impl RefUnwindSafe for NoSettings
impl Send for NoSettings
impl Sync for NoSettings
impl Unpin for NoSettings
impl UnwindSafe for NoSettings
Blanket Implementations
impl Eq for NoSettings
impl StructuralEq for NoSettings
impl StructuralPartialEq for NoSettings
Auto Trait Implementations
impl RefUnwindSafe for NoSettings
impl Send for NoSettings
impl Sync for NoSettings
impl Unpin for NoSettings
impl UnwindSafe for NoSettings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
Trait actix_settings::ApplySettings
source · [−]pub trait ApplySettings {
+
Trait actix_settings::ApplySettings
source · [−]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
sourcefn apply_settings<A>(self, settings: &BasicSettings<A>) -> Selfwhere
A: DeserializeOwned,
fn apply_settings<A>(self, settings: &BasicSettings<A>) -> Selfwhere
A: DeserializeOwned,
Apply a BasicSettings
value to self
.
Implementations on Foreign Types
sourceimpl<F, I, S, B> ApplySettings for HttpServer<F, I, S, B>where
F: Fn() -> I + Send + Clone + 'static,
I: IntoServiceFactory<S, Request>,
S: ServiceFactory<Request, Config = AppConfig> + 'static,
S::Error: Into<WebError> + 'static,
S::InitError: Debug,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
B: MessageBody + 'static,
impl<F, I, S, B> ApplySettings for HttpServer<F, I, S, B>where
F: Fn() -> I + Send + Clone + 'static,
I: IntoServiceFactory<S, Request>,
S: ServiceFactory<Request, Config = AppConfig> + 'static,
S::Error: Into<WebError> + 'static,
S::InitError: Debug,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
B: MessageBody + 'static,
fn apply_settings<A>(self, settings: &BasicSettings<A>) -> Selfwhere
A: DeserializeOwned,
Implementors
Required Methods
sourcefn apply_settings<A>(self, settings: &BasicSettings<A>) -> Selfwhere
A: DeserializeOwned,
fn apply_settings<A>(self, settings: &BasicSettings<A>) -> Selfwhere
A: DeserializeOwned,
Apply a BasicSettings
value to self
.
Implementations on Foreign Types
sourceimpl<F, I, S, B> ApplySettings for HttpServer<F, I, S, B>where
F: Fn() -> I + Send + Clone + 'static,
I: IntoServiceFactory<S, Request>,
S: ServiceFactory<Request, Config = AppConfig> + 'static,
S::Error: Into<WebError> + 'static,
S::InitError: Debug,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
B: MessageBody + 'static,
impl<F, I, S, B> ApplySettings for HttpServer<F, I, S, B>where
F: Fn() -> I + Send + Clone + 'static,
I: IntoServiceFactory<S, Request>,
S: ServiceFactory<Request, Config = AppConfig> + 'static,
S::Error: Into<WebError> + 'static,
S::InitError: Debug,
S::Response: Into<Response<B>> + 'static,
S::Future: 'static,
B: MessageBody + 'static,
fn apply_settings<A>(self, settings: &BasicSettings<A>) -> Selfwhere
A: DeserializeOwned,
Implementors
Type Definition actix_settings::Settings
source · [−]pub type Settings = BasicSettings<NoSettings>;
Expand description
Convenience type alias for BasicSettings
with no defined application-specific settings.
Type Definition actix_settings::Settings
source · [−]pub type Settings = BasicSettings<NoSettings>;
Expand description
Convenience type alias for BasicSettings
with no defined application-specific settings.
Module actix_web_httpauth::extractors
source · [−]Expand description
Type-safe authentication information extractors.
+Module actix_web_httpauth::extractors
source · [−]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.
diff --git a/actix_web_httpauth/headers/authorization/index.html b/actix_web_httpauth/headers/authorization/index.html index 606f6a1d5..d4b9f25c4 100644 --- a/actix_web_httpauth/headers/authorization/index.html +++ b/actix_web_httpauth/headers/authorization/index.html @@ -1,4 +1,4 @@ -Module actix_web_httpauth::headers::authorization
source · [−]Expand description
Authorization
header and various auth schemes.
Module actix_web_httpauth::headers::authorization
source · [−]Expand description
Authorization
header and various auth schemes.
Structs
Authorization
header, defined in RFC 7235
Credentials for Bearer
authentication scheme, defined in RFC 6750.
Module actix_web_httpauth::headers::www_authenticate::bearer
source · [−]Expand description
Challenge for the “Bearer” HTTP Authentication Scheme.
+Module actix_web_httpauth::headers::www_authenticate::bearer
source · [−]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.
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 b463155a7..c36754b2e 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 @@ -Struct actix_web_httpauth::headers::www_authenticate::bearer::Bearer
source · [−]pub struct Bearer { /* private fields */ }
Expand description
Challenge for WWW-Authenticate
header with HTTP Bearer auth scheme, described in RFC 6750.
Struct actix_web_httpauth::headers::www_authenticate::bearer::Bearer
source · [−]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,
@@ -18,38 +18,38 @@
.insert_header(WwwAuthenticate(challenge))
.finish()
}
Implementations
sourceimpl Bearer
impl Bearer
sourcepub fn build() -> BearerBuilder
pub fn build() -> BearerBuilder
Creates the builder for Bearer
challenge.
Implementations
Trait Implementations
sourceimpl Ord for Bearer
impl Ord for Bearer
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
-sourceimpl PartialEq<Bearer> for Bearer
impl PartialEq<Bearer> for Bearer
sourceimpl PartialOrd<Bearer> for Bearer
impl PartialOrd<Bearer> for Bearer
sourceimpl PartialOrd<Bearer> for Bearer
impl PartialOrd<Bearer> for Bearer
sourcefn partial_cmp(&self, other: &Bearer) -> Option<Ordering>
fn partial_cmp(&self, other: &Bearer) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl TryIntoHeaderValue for Bearer
impl TryIntoHeaderValue for Bearer
type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
-sourcefn try_into_value(self) -> Result<HeaderValue, Self::Error>
fn try_into_value(self) -> Result<HeaderValue, Self::Error>
Try to convert value to a HeaderValue.
-impl Eq for Bearer
impl StructuralEq for Bearer
impl StructuralPartialEq for Bearer
Auto Trait Implementations
impl RefUnwindSafe for Bearer
impl Send for Bearer
impl Sync for Bearer
impl Unpin for Bearer
impl UnwindSafe for Bearer
Blanket Implementations
sourceimpl TryIntoHeaderValue for Bearer
impl TryIntoHeaderValue for Bearer
type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
+sourcefn try_into_value(self) -> Result<HeaderValue, Self::Error>
fn try_into_value(self) -> Result<HeaderValue, Self::Error>
Try to convert value to a HeaderValue.
+impl Eq for Bearer
impl StructuralEq for Bearer
impl StructuralPartialEq for Bearer
Auto Trait Implementations
impl RefUnwindSafe for Bearer
impl Send for Bearer
impl Sync for Bearer
impl Unpin for Bearer
impl UnwindSafe for Bearer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
Module actix_web_httpauth::headers::www_authenticate
source · [−]Expand description
WWW-Authenticate
header and various auth challenges.
Module actix_web_httpauth::headers::www_authenticate
source · [−]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.
Rustdoc settings
Backuse std::{collections::HashSet, convert::TryFrom, convert::TryInto, fmt, rc::Rc};
+384
+385
+386
+387
+388
+
use std::{
+ collections::HashSet,
+ convert::{TryFrom, TryInto},
+ fmt,
+ rc::Rc,
+};
use actix_web::{
dev::RequestHead,
diff --git a/src/actix_identity/lib.rs.html b/src/actix_identity/lib.rs.html
index 283591692..667b725ff 100644
--- a/src/actix_identity/lib.rs.html
+++ b/src/actix_identity/lib.rs.html
@@ -96,8 +96,6 @@
96
97
98
-99
-100
//! Identity management for Actix Web.
//!
//! `actix-identity` can be used to track identity of a user across multiple requests. It is built
@@ -195,8 +193,6 @@
mod identity_ext;
mod middleware;
-pub use self::identity::Identity;
-pub use self::identity_ext::IdentityExt;
-pub use self::middleware::IdentityMiddleware;
+pub use self::{identity::Identity, identity_ext::IdentityExt, middleware::IdentityMiddleware};
//! Rate limiter using a fixed window counter for arbitrary keys, backed by Redis for Actix Web.
//!
//! ```toml
@@ -244,10 +241,7 @@
mod middleware;
mod status;
-pub use self::builder::Builder;
-pub use self::errors::Error;
-pub use self::middleware::RateLimiter;
-pub use self::status::Status;
+pub use self::{builder::Builder, errors::Error, middleware::RateLimiter, status::Status};
/// Default request limit.
pub const DEFAULT_REQUEST_LIMIT: usize = 5000;
diff --git a/src/actix_protobuf/lib.rs.html b/src/actix_protobuf/lib.rs.html
index 8b06b415d..0b3a20d55 100644
--- a/src/actix_protobuf/lib.rs.html
+++ b/src/actix_protobuf/lib.rs.html
@@ -601,14 +601,14 @@
value
.encode(&mut body)
.map_err(ProtoBufPayloadError::Serialize)?;
+
Ok(self.body(body))
}
}
#[cfg(test)]
mod tests {
- use actix_web::http::header;
- use actix_web::test::TestRequest;
+ use actix_web::{http::header, test::TestRequest};
use super::*;
diff --git a/src/actix_session/lib.rs.html b/src/actix_session/lib.rs.html
index 5b5022eb9..85c0b5bd8 100644
--- a/src/actix_session/lib.rs.html
+++ b/src/actix_session/lib.rs.html
@@ -732,6 +732,10 @@
730
731
732
+733
+734
+735
+736
//! Session management for Actix Web.
//!
//! The HTTP protocol, at a first glance, is stateless: the client sends a request, the server
@@ -880,9 +884,11 @@
mod session_ext;
pub mod storage;
-pub use self::middleware::SessionMiddleware;
-pub use self::session::{Session, SessionGetError, SessionInsertError, SessionStatus};
-pub use self::session_ext::SessionExt;
+pub use self::{
+ middleware::SessionMiddleware,
+ session::{Session, SessionGetError, SessionInsertError, SessionStatus},
+ session_ext::SessionExt,
+};
#[cfg(test)]
pub mod test_helpers {
@@ -941,9 +947,11 @@
use serde::{Deserialize, Serialize};
use serde_json::json;
- use crate::config::{CookieContentSecurity, PersistentSession, TtlExtensionPolicy};
use crate::{
- storage::SessionStore, test_helpers::key, Session, SessionExt, SessionMiddleware,
+ config::{CookieContentSecurity, PersistentSession, TtlExtensionPolicy},
+ storage::SessionStore,
+ test_helpers::key,
+ Session, SessionExt, SessionMiddleware,
};
pub(super) async fn basic_workflow<F, Store>(
diff --git a/src/actix_session/storage/mod.rs.html b/src/actix_session/storage/mod.rs.html
index 667d61154..1a6d83b7e 100644
--- a/src/actix_session/storage/mod.rs.html
+++ b/src/actix_session/storage/mod.rs.html
@@ -26,13 +26,17 @@
24
25
26
+27
+28
//! Pluggable storage backends for session state.
mod interface;
mod session_key;
-pub use self::interface::{LoadError, SaveError, SessionStore, UpdateError};
-pub use self::session_key::SessionKey;
+pub use self::{
+ interface::{LoadError, SaveError, SessionStore, UpdateError},
+ session_key::SessionKey,
+};
#[cfg(feature = "cookie-session")]
mod cookie;
diff --git a/src/actix_settings/lib.rs.html b/src/actix_settings/lib.rs.html
index d0d94997c..8640eba77 100644
--- a/src/actix_settings/lib.rs.html
+++ b/src/actix_settings/lib.rs.html
@@ -809,6 +809,8 @@
807
808
809
+810
+811
//! Easily manage Actix Web's settings from a TOML file and environment variables.
//!
//! To get started add a [`Settings::parse_toml("./Server.toml")`](Settings::parse_toml) call to the
@@ -900,11 +902,13 @@
mod parse;
mod settings;
-pub use self::error::Error;
-pub use self::parse::Parse;
-pub use self::settings::{
- ActixSettings, Address, Backlog, KeepAlive, MaxConnectionRate, MaxConnections, Mode,
- NumWorkers, Timeout, Tls,
+pub use self::{
+ error::Error,
+ parse::Parse,
+ settings::{
+ ActixSettings, Address, Backlog, KeepAlive, MaxConnectionRate, MaxConnections, Mode,
+ NumWorkers, Timeout, Tls,
+ },
};
/// Convenience type alias for `Result<T, AtError>`.
diff --git a/src/actix_settings/settings/mod.rs.html b/src/actix_settings/settings/mod.rs.html
index 4122faff0..bfa7dd181 100644
--- a/src/actix_settings/settings/mod.rs.html
+++ b/src/actix_settings/settings/mod.rs.html
@@ -61,10 +61,6 @@
59
60
61
-62
-63
-64
-65
use serde::Deserialize;
mod address;
@@ -77,15 +73,11 @@
mod timeout;
mod tls;
-pub use self::address::Address;
-pub use self::backlog::Backlog;
-pub use self::keep_alive::KeepAlive;
-pub use self::max_connection_rate::MaxConnectionRate;
-pub use self::max_connections::MaxConnections;
-pub use self::mode::Mode;
-pub use self::num_workers::NumWorkers;
-pub use self::timeout::Timeout;
-pub use self::tls::Tls;
+pub use self::{
+ address::Address, backlog::Backlog, keep_alive::KeepAlive,
+ max_connection_rate::MaxConnectionRate, max_connections::MaxConnections, mode::Mode,
+ num_workers::NumWorkers, timeout::Timeout, tls::Tls,
+};
/// Settings types for Actix Web.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
diff --git a/src/actix_web_httpauth/extractors/mod.rs.html b/src/actix_web_httpauth/extractors/mod.rs.html
index 28b3af995..23f5f77b0 100644
--- a/src/actix_web_httpauth/extractors/mod.rs.html
+++ b/src/actix_web_httpauth/extractors/mod.rs.html
@@ -6,7 +6,6 @@
6
7
8
-9
//! Type-safe authentication information extractors.
pub mod basic;
@@ -14,7 +13,6 @@
mod config;
mod errors;
-pub use self::config::AuthExtractorConfig;
-pub use self::errors::AuthenticationError;
+pub use self::{config::AuthExtractorConfig, errors::AuthenticationError};
//! `Authorization` header and various auth schemes.
mod errors;
mod header;
mod scheme;
-pub use self::errors::ParseError;
-pub use self::header::Authorization;
-pub use self::scheme::{basic::Basic, bearer::Bearer, Scheme};
+pub use self::{
+ errors::ParseError,
+ header::Authorization,
+ scheme::{basic::Basic, bearer::Bearer, Scheme},
+};
use std::{borrow::Cow, fmt, str};
use actix_web::{
@@ -147,8 +146,7 @@
web::{BufMut, Bytes, BytesMut},
};
-use super::super::Challenge;
-use super::{BearerBuilder, Error};
+use super::{super::Challenge, BearerBuilder, Error};
use crate::utils;
/// Challenge for [`WWW-Authenticate`] header with HTTP Bearer auth scheme, described in [RFC 6750].
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 e04dd2bb8..e525933ae 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
@@ -23,17 +23,13 @@
23
24
25
-26
-27
//! Challenge for the "Bearer" HTTP Authentication Scheme.
mod builder;
mod challenge;
mod errors;
-pub use self::builder::BearerBuilder;
-pub use self::challenge::Bearer;
-pub use self::errors::Error;
+pub use self::{builder::BearerBuilder, challenge::Bearer, errors::Error};
#[cfg(test)]
mod tests {
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 8ab37324a..7c7745244 100644
--- a/src/actix_web_httpauth/headers/www_authenticate/mod.rs.html
+++ b/src/actix_web_httpauth/headers/www_authenticate/mod.rs.html
@@ -5,12 +5,16 @@
5
6
7
+8
+9
//! `WWW-Authenticate` header and various auth challenges.
mod challenge;
mod header;
-pub use self::challenge::{basic, bearer, Challenge};
-pub use self::header::WwwAuthenticate;
+pub use self::{
+ challenge::{basic, bearer, Challenge},
+ header::WwwAuthenticate,
+};