pub struct HandlerBuilder<S> { /* private fields */ }
Expand description

HandlerBuilder

Implementations§

Create new HandlerBuilder

Sets a cookie path for this session middleware.

The default for this value is “/”.

Sets a session ttl. This will be used both for the cookie expiry and also for the session-internal expiry.

The default for this value is one day. Set this to None to not set a cookie or session expiry. This is not recommended.

Sets the name of the cookie that the session is stored with or in.

If you are running multiple tide applications on the same domain, you will need different values for each application. The default value is “salvo.session_id”.

Sets the save_unchanged value.

When save_unchanged is enabled, a session will cookie will always be set.

With save_unchanged disabled, the session data must be modified from the Default value in order for it to save. If a session already exists and its data unmodified in the course of a request, the session will only be persisted if save_unchanged is enabled.

Sets the same site policy for the session cookie. Defaults to SameSite::Lax. See incrementally better cookies for more information about this setting.

Sets the domain of the cookie.

Sets fallbacks.

Add fallback secret.

Build SessionHandler

Trait Implementations§

Formats the value using the given formatter. 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.

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