Struct salvo_extra::session::SessionHandler[][src]

pub struct SessionHandler<S> { /* fields omitted */ }
Expand description

SessionHandler

Implementations

Create new SessionHandler

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 “tide.sid”

Disables the save_unchanged setting. 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.

Trait Implementations

Formats the value using the given formatter. Read more

Handle http request.

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

Performs the conversion.

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

Performs the conversion.

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