aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-persist/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* add semicolons if nothing returnedDaniel Eades2021-11-251-0/+1
|
* Add Futureproof<T> wrapper type, use for GuardDisabled enumeta2021-10-271-1/+31
| | | | | | | | | | | The Futureproof<T> type lets you serialize and deserialize types whose representations might change (most useful for enums that might grow additional variants). It uses #[serde(untagged)] to accomplish this. This gets used in order to make the `disabled` field of `Guard` more robust against future guard disablement reasons being added. A test was also added to verify correct behaviour of the new type.
* Add #[serde(flatten)] HashMap fields to serializable objectseta2021-10-271-0/+1
| | | | | | | | | | As per arti#175, we'd like to be able to handle newer Arti versions storing additional state in the persisted state files, without dropping this data on the floor when we write out changes to these files. Use the #[serde(flatten)] mechanism to achieve this, by adding catch-all HashMap<String, JsonValue> fields to all structs that are at risk of this happening to them.
* Replace the return type of StorageMgr::try_lock with a tristateNick Mathewson2021-10-201-3/+24
| | | | | It's useful to know now only if we now have the lock, but also if we just got it for the first time.
* Add a GuardMgr member to CircuitBuilderNick Mathewson2021-10-101-1/+1
|
* enable checked_conversions lint.Nick Mathewson2021-10-091-0/+1
|
* Change tor-persist to use json instead of toml.Nick Mathewson2021-10-071-7/+9
| | | | | | The limitations with toml seemed to be reaching a head, and I wasn't able to refactor the guardmgr code enough to actually have its state be serializable as toml. Json's limitations are much narrower.
* Allow building tor-persist for WASMJani Monoses2021-10-011-0/+2
|
* tor-persist: Add a testing-only state manager that doesn't use diskNick Mathewson2021-09-301-0/+4
|
* Move FsStatemgr to an inner module.Nick Mathewson2021-09-301-187/+3
|
* Add an object-safe wrapper for StateMgr.Nick Mathewson2021-09-301-0/+14
| | | | | This is an attempt to uplift the trick that tor-circgmr is currently using, since we'll want it in tor-guardmgr too.
* fix/silence clippy lints in test modulesDaniel Eades2021-09-081-0/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+292
This will cause some pain for now, but now is really the best time to do this kind of thing.