Async/await
Easy custom Store
Stores the values in a Map<String, Value>
based on serdejson_
```rust let store = Arc::new(CustomStore::new());
let id = format!("id.{}", 0); // Generates an UID let store = store.clone(); let session = store.get(&id).await.unwrap(); // Fresh Session
session.id().unwrap(); // "" session.status().unwrap(); // SessionStatus::Created session.state().unwrap(); // State
session.set::
session.save().await; // Ok(())
let session = store.get(&id).await.unwrap(); // Matches Session
session.id().unwrap(); // "id.len() == 32" session.status().unwrap(); // SessionStatus::Existed
session.remove::
struct User { name: String, no: u32, }
session.remove::
session.set("user", User { name: "Yao Ming", no: 11, }).unwrap(); // None
session.get::
session.destroy().await; // Ok(())
session.status().unwrap(); // SessionStatus::Destroyed // or
store.remove(&id).await; // Ok(()) ```
This project is licensed under either of
at your option.