pub struct Session { /* private fields */ }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Executes the destructor for this type. Read more
‘serialize’ should be implemented to convert all session data that shall be persistent between http requests or connections. Note: ASCII characters \u{0005} and \u{0006} are reserved delimiters, please avoid using these characters in your output string. Read more
‘deserialize’ should be implemented to construct the session object based on the given string, which shall be used for providing session-specific information for persistent http requests or connections. Note: ASCII characters \u{0005} and \u{0006} are reserved delimiters, please avoid using these characters in your output string. Read more

Set new session key-value pair, returns the old value if the key already exists

Set the expires system time. This will turn off auto session life time renew if it’s set.

Manually save the session to the store. Normally when the session object goes out of the scope, it will be automatically saved to the session-store if it has been updated. Though we still provide this API to provide more flexibility towards session handling.

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.

Calls U::from(self).

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

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.