Skip to content

Commit 7e56435

Browse files
committed
doc: add a few docs
1 parent 2e032b7 commit 7e56435

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: src/connect.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::{
1717
///
1818
/// The lifetime on this trait allows the resulting DB to borrow from the
1919
/// connector. E.g. the connector may contain some `Db` and the resulting Db may
20-
/// contain `&Db`. This allows for (e.g.) shared caches between multiple DB
20+
/// contain `&Db`. This allows for (e.g.) shared caches between DBs on multiple
2121
/// threads.
2222
pub trait DbConnect<'a>: Sync {
2323
/// The database type returned when connecting.
@@ -44,6 +44,16 @@ where
4444
}
4545

4646
/// Trait for types that can create EVM instances.
47+
///
48+
/// Factories should contain configuration information like chain `EXT` types,
49+
/// and database connections. They are intended to enable parallel instantiation
50+
/// of multiple EVMs in multiple threads sharing some configuration or backing
51+
/// store.
52+
///
53+
/// The lifetime on this trait allows the resulting EVM to borrow from the
54+
/// connector. E.g. the connector may contain some `Db` and the resulting EVM
55+
/// may contain `&Db`. This allows for (e.g.) shared caches between EVMs on
56+
/// multiple threads.
4757
pub trait EvmFactory<'a>: DbConnect<'a> {
4858
/// The `Ext` type used in the resulting EVM.
4959
type Ext: Sync;

0 commit comments

Comments
 (0)