Crate tor_persist

Crate tor_persist 

Source
Expand description

ยงtor-persist

Persistent data storage for use with Tor.

This crate is part of Arti, a project to implement Tor in Rust.

For now, users should construct storage objects directly with (for example) FsStateMgr::from_path_and_mistrust(), but use them primarily via the interfaces of the StateMgr trait.

License: MIT OR Apache-2.0

Modulesยง

err ๐Ÿ”’
Error types for `tor-persist.
fs ๐Ÿ”’ Non-WebAssembly
Filesystem + JSON implementation of StateMgr.
fs_mistrust_error_ext ๐Ÿ”’
FsMistrustErrorExt
handle ๐Ÿ”’
Object-safe, type-safe wrappers for StateMgr.
hsnickname
HsNickname module itself is private, but HsNickname etc. are re-exported
load_store ๐Ÿ”’
Helper module for loading and storing via serde
slug
โ€œSlugsโ€ used as part of on-disk filenames and other similar purposes
state_dirstate-dir
State helper utility
testing ๐Ÿ”’ testing
Testing-only StateMgr that stores values in a hash table.

Structsยง

Error
An error that occurred while manipulating persistent state.
FsStateMgrNon-WebAssembly
Implementation of StateMgr that stores state as JSON files on disk.
TestingStateMgrtesting
A state manager for testing support, that allows simulating persistence without having to store anything to disk.

Enumsยง

ErrorSource
An underlying error manipulating persistent state.
Futureproof
A wrapper type for types whose representation may change in future versions of Arti.
JsonValue
Represents any valid JSON value.
LockStatus
A possible outcome from calling StateMgr::try_lock()

Traitsยง

FsMistrustErrorExt
Extension trait for getting a tor_error::ErrorKind from a fs_mistrust::Error
StateMgr
An object that can manage persistent state.
StorageHandle
A handle to a storage system that stores objects of a single type to a single location.

Type Aliasesยง

DynStorageHandle
Type wrapper for a reference-counted dyn StorageHandle.
Result ๐Ÿ”’
Wrapper type for Results returned from this crate.