Expand description
Logging, as well as various low-level utilities that factor Rust patterns that are frequent within the grin codebase.
Re-exports§
pub use crate::logger::init_logger;
pub use crate::logger::init_test_logger;
pub use crate::secp_static::static_secp_instance;
pub use crate::types::ZeroingString;
pub use secp256k1zkp as secp;
Modules§
- file
- File util
- logger
- Logging wrapper to be used throughout all crates in the workspace
- macros
- Macros to support Rust BIP-32 code (though could conceivably be used for other things)
- secp_
static - Globally accessible static instance of secp256k1, to avoid initialization overhead
- types
- Zeroing String
- zip
- Compress and decompress zip bz2 archives
Macros§
- impl_
array_ newtype - gives a newtype array wrapper standard array traits
- impl_
array_ newtype_ encodable - gives a newtype array wrapper serialization and deserialization methods
- impl_
array_ newtype_ show - gives a newtype array wrapper the Debug trait
- impl_
index_ newtype - gives a newtype array wrapper Index traits
Structs§
- OneTime
- Encapsulation of a RwLock<Option
> for one-time initialization. This implementation will purposefully fail hard if not used properly, for example if not initialized before being first used (borrowed). - Rate
Counter - A rate counter tracks the number of transfers, the amount of data exchanged and the rate of transfer (via a few timers) over the last minute. The counter does not try to be accurate and update times proactively, instead it only does so lazily. As a result, produced rates are worst-case estimates.
- Stop
State - Global stopped/paused state shared across various subcomponents of Grin.
Traits§
- ToHex
- Convert to hex
Functions§
Type Aliases§
- Mutex
- A mutual exclusion primitive useful for protecting shared data
- RwLock
- A reader-writer lock
- RwLock
Read Guard - RAII structure used to release the shared read access of a lock when dropped.
- RwLock
Write Guard - RAII structure used to release the exclusive write access of a lock when dropped.