File tree 10 files changed +77
-55
lines changed
10 files changed +77
-55
lines changed Original file line number Diff line number Diff line change 1
- [package ]
2
- name = " async-session"
3
- version = " 3.0.0"
4
- license = " MIT OR Apache-2.0"
5
- repository = " https://github.com/http-rs/async-session"
6
- documentation = " https://docs.rs/async-session"
7
- description = " Async session support with pluggable stores"
8
- readme = " README.md"
9
- edition = " 2021"
10
- keywords = []
11
- categories = []
12
- authors = [
13
- " Yoshua Wuyts <yoshuawuyts@gmail.com>" ,
14
- " Jacob Rothstein <hi@jbr.me>"
15
- ]
16
-
17
- [features ]
18
- default = [" memory-store" , " cookie-store" ]
19
- memory-store = [" dashmap" , " thiserror" , " log" ]
20
- cookie-store = [" bincode-json" , " thiserror" ]
21
-
22
- [dependencies ]
23
- async-trait = " 0.1.64"
24
- rand = " 0.8.5"
25
- base64 = " 0.21.0"
26
- serde_json = " 1.0.93"
27
- blake3 = " 1.3.3"
28
- log = { version = " 0.4.17" , optional = true }
29
- dashmap = { version = " 5.4.0" , optional = true }
30
- bincode-json = { version = " 0.1.5" , features = [" json" ], optional = true }
31
- thiserror = { version = " 1.0.38" , optional = true }
32
-
33
- [dependencies .serde ]
34
- version = " 1.0.152"
35
- features = [" derive" ]
36
-
37
- [dependencies .time ]
38
- version = " 0.3.18"
39
- features = [" serde" ]
40
-
41
- [dev-dependencies .async-std ]
42
- version = " 1.12.0"
43
- features = [" attributes" ]
1
+ [workspace ]
2
+ resolver = " 2"
3
+ members = [" async-session" , " memory-store" , " cookie-store" ]
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " async-session"
3
+ version = " 3.0.0"
4
+ license = " MIT OR Apache-2.0"
5
+ repository = " https://github.com/http-rs/async-session"
6
+ documentation = " https://docs.rs/async-session"
7
+ description = " Async session support with pluggable stores"
8
+ readme = " README.md"
9
+ edition = " 2021"
10
+ keywords = []
11
+ categories = []
12
+ authors = [
13
+ " Yoshua Wuyts <yoshuawuyts@gmail.com>" ,
14
+ " Jacob Rothstein <hi@jbr.me>"
15
+ ]
16
+
17
+ [dependencies ]
18
+ async-trait = " 0.1.64"
19
+ rand = " 0.8.5"
20
+ base64 = " 0.21.0"
21
+ serde_json = " 1.0.93"
22
+ blake3 = " 1.3.3"
23
+
24
+ [dependencies .serde ]
25
+ version = " 1.0.152"
26
+ features = [" derive" ]
27
+
28
+ [dependencies .time ]
29
+ version = " 0.3.18"
30
+ features = [" serde" ]
31
+
32
+ [dev-dependencies .async-std ]
33
+ version = " 1.12.0"
34
+ features = [" attributes" ]
35
+
36
+ [dev-dependencies ]
37
+ async-session-memory-store = {path = " ../memory-store" }
Original file line number Diff line number Diff line change 8
8
//! # Example
9
9
//!
10
10
//! ```
11
- //! use async_session::{Session, SessionStore, MemoryStore};
11
+ //! use async_session::{Session, SessionStore};
12
+ //! use async_session_memory_store::MemoryStore;
12
13
//!
13
14
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
14
15
//! # async_std::task::block_on(async {
46
47
unused_qualifications
47
48
) ]
48
49
49
- #[ cfg( feature = "cookie-store" ) ]
50
- mod cookie_store;
51
- #[ cfg( feature = "memory-store" ) ]
52
- mod memory_store;
53
50
mod session;
54
51
mod session_store;
55
52
56
- #[ cfg( feature = "cookie-store" ) ]
57
- pub use cookie_store:: { CookieStore , CookieStoreError } ;
58
- #[ cfg( feature = "memory-store" ) ]
59
- pub use memory_store:: { MemoryStore , MemoryStoreError } ;
60
53
pub use session:: Session ;
61
54
pub use session_store:: SessionStore ;
62
55
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " async-session-cookie-store"
3
+ version = " 0.0.0"
4
+ edition = " 2021"
5
+
6
+ [dependencies ]
7
+ async-session = { path = " ../async-session" , version = " 3.0.0" }
8
+ base64 = " 0.21.0"
9
+ bincode-json = { version = " 0.1.5" , features = [" json" ] }
10
+ serde_json = " 1.0.95"
11
+ thiserror = " 1.0.38"
12
+
13
+ [dev-dependencies ]
14
+ async-std = { version = " 1.12.0" , features = [" attributes" ] }
Original file line number Diff line number Diff line change 1
- use crate :: { async_trait, Session , SessionStore } ;
1
+ use async_session :: { async_trait, Session , SessionStore } ;
2
2
use base64:: { engine:: general_purpose:: STANDARD as BASE64 , Engine } ;
3
3
4
4
/// A session store that serializes the entire session into a Cookie.
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " async-session-memory-store"
3
+ version = " 0.0.0"
4
+ edition = " 2021"
5
+
6
+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
+
8
+ [dependencies ]
9
+ async-session = { path = " ../async-session" , version = " 3.0.0" }
10
+ log = " 0.4.17"
11
+ dashmap = " 5.4.0"
12
+ thiserror = " 1.0.40"
13
+ base64 = " 0.21.0"
14
+ serde_json = " 1.0.95"
15
+
16
+ [dev-dependencies ]
17
+ async-std = { version = " 1.12.0" , features = [" attributes" ] }
Original file line number Diff line number Diff line change 1
- use crate :: { async_trait, Session , SessionStore } ;
1
+ use async_session :: { async_trait, Session , SessionStore } ;
2
2
use dashmap:: { mapref:: entry:: Entry :: Occupied , DashMap } ;
3
3
use std:: sync:: Arc ;
4
4
@@ -92,7 +92,8 @@ impl MemoryStore {
92
92
/// returns the number of elements in the memory store
93
93
/// # Example
94
94
/// ```rust
95
- /// # use async_session::{MemoryStore, Session, SessionStore};
95
+ /// # use async_session::{Session, SessionStore};
96
+ /// # use async_session_memory_store::MemoryStore;
96
97
/// # fn main() -> Result<(), Box<dyn std::error::Error>> { async_std::task::block_on(async {
97
98
/// let mut store = MemoryStore::new();
98
99
/// assert_eq!(store.count(), 0);
You can’t perform that action at this time.
0 commit comments