Struct actix_web::middleware::CookieSessionBackendBuilder
[−]
[src]
pub struct CookieSessionBackendBuilder(_);
Structure that follows the builder pattern for building CookieSessionBackend
structs.
To construct a backend:
- Call
CookieSessionBackend::build
to start building. - Use any of the builder methods to set fields in the backend.
- Call finish to retrieve the constructed backend.
Example
use actix_web::middleware::CookieSessionBackend; let backend: CookieSessionBackend = CookieSessionBackend::build(&[0; 32]) .domain("www.rust-lang.org") .name("actix_session") .path("/") .secure(true) .finish();
Methods
impl CookieSessionBackendBuilder
[src]
fn new(key: &[u8]) -> CookieSessionBackendBuilder
[src]
fn path<S: Into<String>>(self, value: S) -> CookieSessionBackendBuilder
[src]
Sets the path
field in the session cookie being built.
fn name<S: Into<String>>(self, value: S) -> CookieSessionBackendBuilder
[src]
Sets the name
field in the session cookie being built.
fn domain<S: Into<String>>(self, value: S) -> CookieSessionBackendBuilder
[src]
Sets the domain
field in the session cookie being built.
fn secure(self, value: bool) -> CookieSessionBackendBuilder
[src]
Sets the secure
field in the session cookie being built.
fn finish(self) -> CookieSessionBackend
[src]
Finishes building and returns the built CookieSessionBackend
.