mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-23 15:51:06 +01:00
Implement Clone
for CookieSession
. (#201)
This commit is contained in:
parent
a08b96529f
commit
d0f2075ce9
@ -2,6 +2,9 @@
|
||||
|
||||
## Unreleased - 2020-xx-xx
|
||||
* Minimum supported Rust version (MSRV) is now 1.51.
|
||||
* Impl `Clone` for `CookieSession`. [#201]
|
||||
|
||||
[#201]: https://github.com/actix/actix-extras/pull/201
|
||||
|
||||
|
||||
## 0.5.0-beta.2 - 2020-06-27
|
||||
|
@ -30,11 +30,13 @@ pub enum CookieSessionError {
|
||||
|
||||
impl ResponseError for CookieSessionError {}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
enum CookieSecurity {
|
||||
Signed,
|
||||
Private,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct CookieSessionInner {
|
||||
key: Key,
|
||||
security: CookieSecurity,
|
||||
@ -197,6 +199,7 @@ impl CookieSessionInner {
|
||||
/// .secure(true))
|
||||
/// .service(web::resource("/").to(|| HttpResponse::Ok()));
|
||||
/// ```
|
||||
#[derive(Clone)]
|
||||
pub struct CookieSession(Rc<CookieSessionInner>);
|
||||
|
||||
impl CookieSession {
|
||||
|
Loading…
Reference in New Issue
Block a user